Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add missing domain and proto type re-exports #1041

Merged
merged 5 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-data-types] Re-export clients' domain type from `ibc-data-types`
([\#1041](https://github.com/cosmos/ibc-rs/pull/1041)).
2 changes: 1 addition & 1 deletion ibc-clients/ics07-tendermint/src/client_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use ibc_client_tendermint_types::error::Error;
use ibc_client_tendermint_types::proto::v1::ClientState as RawTmClientState;
use ibc_client_tendermint_types::proto::{Any, Protobuf};
use ibc_client_tendermint_types::{
client_type as tm_client_type, ClientState as ClientStateType,
ConsensusState as ConsensusStateType, Header as TmHeader, Misbehaviour as TmMisbehaviour,
Expand All @@ -32,6 +31,7 @@ use ibc_core_host::types::path::{
};
use ibc_core_host::ExecutionContext;
use ibc_primitives::prelude::*;
use ibc_primitives::proto::{Any, Protobuf};
use ibc_primitives::ToVec;

use super::consensus_state::ConsensusState as TmConsensusState;
Expand Down
5 changes: 1 addition & 4 deletions ibc-clients/ics07-tendermint/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ pub use trust_threshold::*;

pub mod error;

/// Re-exports necessary proto types for Tendermint light client implementation
/// from `ibc-proto` crate.
/// Re-exports ICS-07 Tendermint light client from `ibc-proto` crate.
pub mod proto {
pub use ibc_proto::google::protobuf::Any;
pub use ibc_proto::ibc::lightclients::tendermint::*;
pub use ibc_proto::Protobuf;
}

pub const TENDERMINT_CLIENT_TYPE: &str = "07-tendermint";
Expand Down
5 changes: 5 additions & 0 deletions ibc-clients/ics08-wasm/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ use ibc_core_host_types::identifiers::ClientType;
use ibc_primitives::prelude::Vec;
pub type Bytes = Vec<u8>;

/// Re-exports ICS-08 Wasm light client proto types from `ibc-proto` crate.
pub mod proto {
pub use ibc_proto::ibc::lightclients::wasm::*;
}

pub static SUBJECT_PREFIX: &[u8] = b"subject/";
pub static SUBSTITUTE_PREFIX: &[u8] = b"substitute/";

Expand Down
35 changes: 24 additions & 11 deletions ibc-data-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ repository = { workspace = true }
keywords = ["blockchain", "cosmos", "ibc"]
readme = "README.md"
description = """
Maintained by `ibc-rs`, delineates standard data structures and domain types of the Inter-Blockchain Communication (IBC) protocol.
Maintained by `ibc-rs`, delineates standard data structures and domain types of the Inter-Blockchain Communication (IBC) protocol.
Designed for universal application, enabling diverse projects across IBC ecosystem to build using a shared language.
"""

[package.metadata.docs.rs]
all-features = true

[dependencies]
ibc-app-transfer-types = { workspace = true }
ibc-core-client-types = { workspace = true }
ibc-core-connection-types = { workspace = true }
ibc-core-channel-types = { workspace = true }
ibc-core-commitment-types = { workspace = true }
ibc-core-host-types = { workspace = true }
ibc-core-router-types = { workspace = true }
ibc-core-handler-types = { workspace = true }
ibc-primitives = { workspace = true }
ibc-app-transfer-types = { workspace = true }
ibc-core-client-types = { workspace = true }
ibc-core-connection-types = { workspace = true }
ibc-core-channel-types = { workspace = true }
ibc-core-commitment-types = { workspace = true }
ibc-core-host-types = { workspace = true }
ibc-core-router-types = { workspace = true }
ibc-core-handler-types = { workspace = true }
ibc-client-tendermint-types = { workspace = true }
ibc-client-wasm-types = { workspace = true }
ibc-primitives = { workspace = true }

[features]
default = ["std"]
Expand All @@ -38,6 +40,8 @@ std = [
"ibc-core-host-types/std",
"ibc-core-router-types/std",
"ibc-core-handler-types/std",
"ibc-client-tendermint-types/std",
"ibc-client-wasm-types/std",
"ibc-primitives/std",
]
serde = [
Expand All @@ -49,6 +53,8 @@ serde = [
"ibc-core-host-types/serde",
"ibc-core-router-types/serde",
"ibc-core-handler-types/serde",
"ibc-client-tendermint-types/serde",
"ibc-client-wasm-types/serde",
"ibc-primitives/serde",
]
borsh = [
Expand All @@ -59,6 +65,7 @@ borsh = [
"ibc-core-host-types/borsh",
"ibc-core-router-types/borsh",
"ibc-core-handler-types/borsh",
"ibc-client-tendermint-types/borsh",
"ibc-primitives/borsh",
]
schema = [
Expand All @@ -69,6 +76,8 @@ schema = [
"ibc-core-host-types/schema",
"ibc-core-router-types/schema",
"ibc-core-handler-types/schema",
"ibc-client-tendermint-types/schema",
"ibc-client-wasm-types/schema",
"ibc-primitives/schema",
]
parity-scale-codec = [
Expand All @@ -79,5 +88,9 @@ parity-scale-codec = [
"ibc-core-host-types/parity-scale-codec",
"ibc-core-router-types/parity-scale-codec",
"ibc-core-handler-types/parity-scale-codec",
"ibc-client-tendermint-types/parity-scale-codec",
"ibc-primitives/parity-scale-codec",
]
Farhad-Shabani marked this conversation as resolved.
Show resolved Hide resolved
]
cosmwasm = [
"ibc-client-wasm-types/cosmwasm",
]
15 changes: 15 additions & 0 deletions ibc-data-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,21 @@ pub mod core {
}
}

pub mod clients {
/// Re-exports ICS-07 tendermint client data structures from the
/// `ibc-client-tendermint-types` crate
pub mod tendermint {
#[doc(inline)]
pub use ibc_client_tendermint_types::*;
}
/// Re-exports ICS-08 wasm client data structures from the
/// `ibc-client-wasm-types` crate
pub mod wasm {
#[doc(inline)]
pub use ibc_client_wasm_types::*;
}
}

/// Re-exports data structures of various IBC applications
pub mod apps {
/// Re-exports ICS-27 client update data structures from the
Expand Down
Loading