Skip to content
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
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ members = [
"crates/ibc-types-core-client",
"crates/ibc-types-core-connection",
"crates/ibc-types-core-channel",
#"crates/ibc-types-lightclients-tendermint",
"crates/ibc-types-core-commitment",
"crates/ibc-types-lightclients-tendermint",
]

exclude = [
Expand Down
26 changes: 0 additions & 26 deletions crates/ibc-types-core-channel/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,19 +319,6 @@ impl From<Counterparty> for RawCounterparty {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Order {
None = 0isize,
Expand Down Expand Up @@ -390,19 +377,6 @@ impl FromStr for Order {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum State {
Uninitialized = 0isize,
Expand Down
143 changes: 0 additions & 143 deletions crates/ibc-types-core-channel/src/events/packet_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ const PKT_ACK_ATTRIBUTE_KEY: &str = "packet_ack";
const PKT_ACK_HEX_ATTRIBUTE_KEY: &str = "packet_ack_hex";
const PKT_CONNECTION_ID_ATTRIBUTE_KEY: &str = "packet_connection";

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct PacketDataAttribute {
pub packet_data: Vec<u8>,
Expand All @@ -71,19 +58,6 @@ impl TryFrom<PacketDataAttribute> for Vec<abci::EventAttribute> {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct TimeoutHeightAttribute {
pub timeout_height: TimeoutHeight,
Expand All @@ -100,19 +74,6 @@ impl From<TimeoutHeightAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct TimeoutTimestampAttribute {
pub timeout_timestamp: Timestamp,
Expand All @@ -128,19 +89,6 @@ impl From<TimeoutTimestampAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct SequenceAttribute {
pub sequence: Sequence,
Expand All @@ -152,19 +100,6 @@ impl From<SequenceAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct SrcPortIdAttribute {
pub src_port_id: PortId,
Expand All @@ -176,19 +111,6 @@ impl From<SrcPortIdAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct SrcChannelIdAttribute {
pub src_channel_id: ChannelId,
Expand All @@ -200,19 +122,6 @@ impl From<SrcChannelIdAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct DstPortIdAttribute {
pub dst_port_id: PortId,
Expand All @@ -224,19 +133,6 @@ impl From<DstPortIdAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct DstChannelIdAttribute {
pub dst_channel_id: ChannelId,
Expand All @@ -248,19 +144,6 @@ impl From<DstChannelIdAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct ChannelOrderingAttribute {
pub order: Order,
Expand All @@ -272,19 +155,6 @@ impl From<ChannelOrderingAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct PacketConnectionIdAttribute {
pub connection_id: ConnectionId,
Expand All @@ -296,19 +166,6 @@ impl From<PacketConnectionIdAttribute> for abci::EventAttribute {
}
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, From, PartialEq, Eq)]
pub struct AcknowledgementAttribute {
pub acknowledgement: Acknowledgement,
Expand Down
13 changes: 0 additions & 13 deletions crates/ibc-types-core-channel/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ pub enum PacketMsgType {
TimeoutOnClose,
}

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[derive(Clone, Debug)]
pub enum Receipt {
Ok,
}
Expand Down
13 changes: 0 additions & 13 deletions crates/ibc-types-core-channel/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,6 @@ use crate::prelude::*;
/// This field is opaque to the core IBC protocol.
/// No explicit validation is necessary, and the
/// spec (v1) currently allows empty strings.
#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Version(pub String);

Expand Down
1 change: 1 addition & 0 deletions crates/ibc-types-core-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive"
borsh = {version = "0.10.0", default-features = false, optional = true }
parking_lot = { version = "0.12.1", default-features = false, optional = true }
cfg-if = { version = "1.0.0", optional = true }
anyhow = "1"

[dependencies.tendermint]
version = "0.31.1"
Expand Down
13 changes: 0 additions & 13 deletions crates/ibc-types-core-client/src/client_type.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
use crate::prelude::*;
use core::fmt::{Display, Error as FmtError, Formatter};

#[cfg_attr(
feature = "parity-scale-codec",
derive(
parity_scale_codec::Encode,
parity_scale_codec::Decode,
scale_info::TypeInfo
)
)]
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
/// Type of the client, depending on the specific consensus algorithm.
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ClientType(pub String);
Expand Down
4 changes: 0 additions & 4 deletions crates/ibc-types-core-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ mod client_id;
mod client_type;
mod error;
mod height;
mod trust_threshold;

mod prelude;

Expand All @@ -20,9 +19,6 @@ pub use client_id::ClientId;
pub use client_type::ClientType;
pub use error::Error;
pub use height::{Height, HeightParseError};
// TODO: TrustThreshold is a domain type for a tendermint-light-client proto type, does it belong here?
// it's not used elsewhere in the crate...
pub use trust_threshold::TrustThreshold;

#[cfg(any(test, feature = "mocks", feature = "mocks-no-std"))]
pub mod mock;
Loading