diff --git a/src/IBC_GO_COMMIT b/src/IBC_GO_COMMIT index 960f7110..5a5a9e99 100644 --- a/src/IBC_GO_COMMIT +++ b/src/IBC_GO_COMMIT @@ -1 +1 @@ -e1df7a6948d1dd94b7d2dadd226bee23d3e1e667 \ No newline at end of file +57fcdb9a9a9db9b206f7df2f955866dc4e10fef4 \ No newline at end of file diff --git a/src/prost/ibc.applications.fee.v1.rs b/src/prost/ibc.applications.fee.v1.rs index 1dcf4340..9d798dce 100644 --- a/src/prost/ibc.applications.fee.v1.rs +++ b/src/prost/ibc.applications.fee.v1.rs @@ -163,7 +163,7 @@ pub struct MsgPayPacketFee { /// the source port unique identifier #[prost(string, tag = "2")] pub source_port_id: ::prost::alloc::string::String, - /// the source channel unique identifier + /// the source channel unique identifer #[prost(string, tag = "3")] pub source_channel_id: ::prost::alloc::string::String, /// account address to refund fee if necessary @@ -910,7 +910,7 @@ pub struct ForwardRelayerAddress { /// the forward relayer address #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, - /// unique packet identifier comprised of the channel ID, port ID and sequence + /// unique packet identifer comprised of the channel ID, port ID and sequence #[prost(message, optional, tag = "2")] pub packet_id: ::core::option::Option< super::super::super::core::channel::v1::PacketId, diff --git a/src/prost/ibc.applications.transfer.v1.rs b/src/prost/ibc.applications.transfer.v1.rs index 70c3a6c7..0c84ba34 100644 --- a/src/prost/ibc.applications.transfer.v1.rs +++ b/src/prost/ibc.applications.transfer.v1.rs @@ -1434,10 +1434,6 @@ pub struct Allocation { /// allow list of receivers, an empty allow list permits any receiver address #[prost(string, repeated, tag = "4")] pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// allow list of packet data keys, an empty list prohibits all packet data keys; - /// a list only with "*" permits any packet data key - #[prost(string, repeated, tag = "5")] - pub allowed_packet_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } impl ::prost::Name for Allocation { const NAME: &'static str = "Allocation"; diff --git a/src/prost/ibc.applications.transfer.v1.serde.rs b/src/prost/ibc.applications.transfer.v1.serde.rs index 2daf7aae..23d490a8 100644 --- a/src/prost/ibc.applications.transfer.v1.serde.rs +++ b/src/prost/ibc.applications.transfer.v1.serde.rs @@ -18,9 +18,6 @@ impl serde::Serialize for Allocation { if true { len += 1; } - if true { - len += 1; - } let mut struct_ser = serializer.serialize_struct("ibc.applications.transfer.v1.Allocation", len)?; if true { struct_ser.serialize_field("sourcePort", &self.source_port)?; @@ -34,9 +31,6 @@ impl serde::Serialize for Allocation { if true { struct_ser.serialize_field("allowList", &self.allow_list)?; } - if true { - struct_ser.serialize_field("allowedPacketData", &self.allowed_packet_data)?; - } struct_ser.end() } } @@ -55,8 +49,6 @@ impl<'de> serde::Deserialize<'de> for Allocation { "spendLimit", "allow_list", "allowList", - "allowed_packet_data", - "allowedPacketData", ]; #[allow(clippy::enum_variant_names)] @@ -65,7 +57,6 @@ impl<'de> serde::Deserialize<'de> for Allocation { SourceChannel, SpendLimit, AllowList, - AllowedPacketData, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -91,7 +82,6 @@ impl<'de> serde::Deserialize<'de> for Allocation { "sourceChannel" | "source_channel" => Ok(GeneratedField::SourceChannel), "spendLimit" | "spend_limit" => Ok(GeneratedField::SpendLimit), "allowList" | "allow_list" => Ok(GeneratedField::AllowList), - "allowedPacketData" | "allowed_packet_data" => Ok(GeneratedField::AllowedPacketData), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -115,7 +105,6 @@ impl<'de> serde::Deserialize<'de> for Allocation { let mut source_channel__ = None; let mut spend_limit__ = None; let mut allow_list__ = None; - let mut allowed_packet_data__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::SourcePort => { @@ -142,12 +131,6 @@ impl<'de> serde::Deserialize<'de> for Allocation { } allow_list__ = Some(map_.next_value()?); } - GeneratedField::AllowedPacketData => { - if allowed_packet_data__.is_some() { - return Err(serde::de::Error::duplicate_field("allowedPacketData")); - } - allowed_packet_data__ = Some(map_.next_value()?); - } } } Ok(Allocation { @@ -155,7 +138,6 @@ impl<'de> serde::Deserialize<'de> for Allocation { source_channel: source_channel__.unwrap_or_default(), spend_limit: spend_limit__.unwrap_or_default(), allow_list: allow_list__.unwrap_or_default(), - allowed_packet_data: allowed_packet_data__.unwrap_or_default(), }) } } diff --git a/src/prost/ibc.core.channel.v1.rs b/src/prost/ibc.core.channel.v1.rs index aeafba50..b354e656 100644 --- a/src/prost/ibc.core.channel.v1.rs +++ b/src/prost/ibc.core.channel.v1.rs @@ -24,10 +24,6 @@ pub struct Channel { /// opaque channel version, which is agreed upon during the handshake #[prost(string, tag = "5")] pub version: ::prost::alloc::string::String, - /// upgrade sequence indicates the latest upgrade attempt performed by this channel - /// the value of 0 indicates the channel has never been upgraded - #[prost(uint64, tag = "6")] - pub upgrade_sequence: u64, } impl ::prost::Name for Channel { const NAME: &'static str = "Channel"; @@ -63,10 +59,6 @@ pub struct IdentifiedChannel { /// channel identifier #[prost(string, tag = "7")] pub channel_id: ::prost::alloc::string::String, - /// upgrade sequence indicates the latest upgrade attempt performed by this channel - /// the value of 0 indicates the channel has never been upgraded - #[prost(uint64, tag = "8")] - pub upgrade_sequence: u64, } impl ::prost::Name for IdentifiedChannel { const NAME: &'static str = "IdentifiedChannel"; @@ -162,7 +154,7 @@ impl ::prost::Name for PacketState { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// PacketId is an identifier for a unique Packet +/// PacketId is an identifer for a unique Packet /// Source chains refer to packets by source port/channel /// Destination chains refer to packets by destination port/channel #[allow(clippy::derive_partial_eq_without_eq)] @@ -238,23 +230,8 @@ impl ::prost::Name for Timeout { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// Params defines the set of IBC channel parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// the relative timeout after which channel upgrades will time out. - #[prost(message, optional, tag = "1")] - pub upgrade_timeout: ::core::option::Option, -} -impl ::prost::Name for Params { - const NAME: &'static str = "Params"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} /// State defines if a channel is in one of the following states: -/// CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED. +/// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum State { @@ -270,10 +247,6 @@ pub enum State { /// A channel has been closed and can no longer be used to send or receive /// packets. Closed = 4, - /// A channel has just accepted the upgrade handshake attempt and is flushing in-flight packets. - Flushing = 5, - /// A channel has just completed flushing any in-flight packets. - Flushcomplete = 6, } impl State { /// String value of the enum field names used in the ProtoBuf definition. @@ -287,8 +260,6 @@ impl State { State::Tryopen => "STATE_TRYOPEN", State::Open => "STATE_OPEN", State::Closed => "STATE_CLOSED", - State::Flushing => "STATE_FLUSHING", - State::Flushcomplete => "STATE_FLUSHCOMPLETE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -299,8 +270,6 @@ impl State { "STATE_TRYOPEN" => Some(Self::Tryopen), "STATE_OPEN" => Some(Self::Open), "STATE_CLOSED" => Some(Self::Closed), - "STATE_FLUSHING" => Some(Self::Flushing), - "STATE_FLUSHCOMPLETE" => Some(Self::Flushcomplete), _ => None, } } @@ -360,8 +329,6 @@ pub struct GenesisState { /// the sequence for the next generated channel identifier #[prost(uint64, tag = "8")] pub next_channel_sequence: u64, - #[prost(message, optional, tag = "9")] - pub params: ::core::option::Option, } impl ::prost::Name for GenesisState { const NAME: &'static str = "GenesisState"; @@ -389,67 +356,6 @@ impl ::prost::Name for PacketSequence { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// Upgrade is a verifiable type which contains the relevant information -/// for an attempted upgrade. It provides the proposed changes to the channel -/// end, the timeout for this upgrade attempt and the next packet sequence -/// which allows the counterparty to efficiently know the highest sequence it has received. -/// The next sequence send is used for pruning and upgrading from unordered to ordered channels. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Upgrade { - #[prost(message, optional, tag = "1")] - pub fields: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub timeout: ::core::option::Option, - #[prost(uint64, tag = "3")] - pub next_sequence_send: u64, -} -impl ::prost::Name for Upgrade { - const NAME: &'static str = "Upgrade"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// UpgradeFields are the fields in a channel end which may be changed -/// during a channel upgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpgradeFields { - #[prost(enumeration = "Order", tag = "1")] - pub ordering: i32, - #[prost(string, repeated, tag = "2")] - pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, tag = "3")] - pub version: ::prost::alloc::string::String, -} -impl ::prost::Name for UpgradeFields { - const NAME: &'static str = "UpgradeFields"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the -/// upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the -/// next sequence. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ErrorReceipt { - /// the channel upgrade sequence - #[prost(uint64, tag = "1")] - pub sequence: u64, - /// the error message detailing the cause of failure - #[prost(string, tag = "2")] - pub message: ::prost::alloc::string::String, -} -impl ::prost::Name for ErrorReceipt { - const NAME: &'static str = "ErrorReceipt"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} /// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It /// is called by a relayer on Chain A. #[allow(clippy::derive_partial_eq_without_eq)] @@ -650,8 +556,6 @@ pub struct MsgChannelCloseConfirm { pub proof_height: ::core::option::Option, #[prost(string, tag = "5")] pub signer: ::prost::alloc::string::String, - #[prost(uint64, tag = "6")] - pub counterparty_upgrade_sequence: u64, } impl ::prost::Name for MsgChannelCloseConfirm { const NAME: &'static str = "MsgChannelCloseConfirm"; @@ -758,8 +662,6 @@ pub struct MsgTimeoutOnClose { pub next_sequence_recv: u64, #[prost(string, tag = "6")] pub signer: ::prost::alloc::string::String, - #[prost(uint64, tag = "7")] - pub counterparty_upgrade_sequence: u64, } impl ::prost::Name for MsgTimeoutOnClose { const NAME: &'static str = "MsgTimeoutOnClose"; @@ -818,406 +720,60 @@ impl ::prost::Name for MsgAcknowledgementResponse { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelUpgradeInit defines the request type for the ChannelUpgradeInit rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeInit { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub fields: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgChannelUpgradeInit { - const NAME: &'static str = "MsgChannelUpgradeInit"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeInitResponse defines the MsgChannelUpgradeInit response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeInitResponse { - #[prost(message, optional, tag = "1")] - pub upgrade: ::core::option::Option, - #[prost(uint64, tag = "2")] - pub upgrade_sequence: u64, -} -impl ::prost::Name for MsgChannelUpgradeInitResponse { - const NAME: &'static str = "MsgChannelUpgradeInitResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeTry defines the request type for the ChannelUpgradeTry rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeTry { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "3")] - pub proposed_upgrade_connection_hops: ::prost::alloc::vec::Vec< - ::prost::alloc::string::String, - >, - #[prost(message, optional, tag = "4")] - pub counterparty_upgrade_fields: ::core::option::Option, - #[prost(uint64, tag = "5")] - pub counterparty_upgrade_sequence: u64, - #[prost(bytes = "vec", tag = "6")] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "7")] - pub proof_upgrade: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "8")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "9")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgChannelUpgradeTry { - const NAME: &'static str = "MsgChannelUpgradeTry"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeTryResponse defines the MsgChannelUpgradeTry response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeTryResponse { - #[prost(message, optional, tag = "1")] - pub upgrade: ::core::option::Option, - #[prost(uint64, tag = "2")] - pub upgrade_sequence: u64, - #[prost(enumeration = "ResponseResultType", tag = "3")] - pub result: i32, -} -impl ::prost::Name for MsgChannelUpgradeTryResponse { - const NAME: &'static str = "MsgChannelUpgradeTryResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeAck defines the request type for the ChannelUpgradeAck rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeAck { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub counterparty_upgrade: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "5")] - pub proof_upgrade: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgChannelUpgradeAck { - const NAME: &'static str = "MsgChannelUpgradeAck"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeAckResponse defines MsgChannelUpgradeAck response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeAckResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, -} -impl ::prost::Name for MsgChannelUpgradeAckResponse { - const NAME: &'static str = "MsgChannelUpgradeAckResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeConfirm defines the request type for the ChannelUpgradeConfirm rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeConfirm { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(enumeration = "State", tag = "3")] - pub counterparty_channel_state: i32, - #[prost(message, optional, tag = "4")] - pub counterparty_upgrade: ::core::option::Option, - #[prost(bytes = "vec", tag = "5")] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "6")] - pub proof_upgrade: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "7")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "8")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgChannelUpgradeConfirm { - const NAME: &'static str = "MsgChannelUpgradeConfirm"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeConfirmResponse defines MsgChannelUpgradeConfirm response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeConfirmResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, -} -impl ::prost::Name for MsgChannelUpgradeConfirmResponse { - const NAME: &'static str = "MsgChannelUpgradeConfirmResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeOpen defines the request type for the ChannelUpgradeOpen rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeOpen { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(enumeration = "State", tag = "3")] - pub counterparty_channel_state: i32, - #[prost(bytes = "vec", tag = "4")] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, +/// ResponseResultType defines the possible outcomes of the execution of a message +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ResponseResultType { + /// Default zero value enumeration + Unspecified = 0, + /// The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + Noop = 1, + /// The message was executed successfully + Success = 2, } -impl ::prost::Name for MsgChannelUpgradeOpen { - const NAME: &'static str = "MsgChannelUpgradeOpen"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) +impl ResponseResultType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ResponseResultType::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED", + ResponseResultType::Noop => "RESPONSE_RESULT_TYPE_NOOP", + ResponseResultType::Success => "RESPONSE_RESULT_TYPE_SUCCESS", + } } -} -/// MsgChannelUpgradeOpenResponse defines the MsgChannelUpgradeOpen response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeOpenResponse {} -impl ::prost::Name for MsgChannelUpgradeOpenResponse { - const NAME: &'static str = "MsgChannelUpgradeOpenResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RESPONSE_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "RESPONSE_RESULT_TYPE_NOOP" => Some(Self::Noop), + "RESPONSE_RESULT_TYPE_SUCCESS" => Some(Self::Success), + _ => None, + } } } -/// MsgChannelUpgradeTimeout defines the request type for the ChannelUpgradeTimeout rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeTimeout { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub counterparty_channel: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgChannelUpgradeTimeout { - const NAME: &'static str = "MsgChannelUpgradeTimeout"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the ibc/channel Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, } -} -/// MsgChannelUpgradeTimeoutRepsonse defines the MsgChannelUpgradeTimeout response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeTimeoutResponse {} -impl ::prost::Name for MsgChannelUpgradeTimeoutResponse { - const NAME: &'static str = "MsgChannelUpgradeTimeoutResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeCancel defines the request type for the ChannelUpgradeCancel rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeCancel { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub error_receipt: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - pub proof_error_receipt: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgChannelUpgradeCancel { - const NAME: &'static str = "MsgChannelUpgradeCancel"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgChannelUpgradeCancelResponse defines the MsgChannelUpgradeCancel response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelUpgradeCancelResponse {} -impl ::prost::Name for MsgChannelUpgradeCancelResponse { - const NAME: &'static str = "MsgChannelUpgradeCancelResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgUpdateParams is the MsgUpdateParams request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the channel parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgPruneAcknowledgements defines the request type for the PruneAcknowledgements rpc. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPruneAcknowledgements { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - pub limit: u64, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgPruneAcknowledgements { - const NAME: &'static str = "MsgPruneAcknowledgements"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgPruneAcknowledgementsResponse defines the response type for the PruneAcknowledgements rpc. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPruneAcknowledgementsResponse { - /// Number of sequences pruned (includes both packet acknowledgements and packet receipts where appropriate). - #[prost(uint64, tag = "1")] - pub total_pruned_sequences: u64, - /// Number of sequences left after pruning. - #[prost(uint64, tag = "2")] - pub total_remaining_sequences: u64, -} -impl ::prost::Name for MsgPruneAcknowledgementsResponse { - const NAME: &'static str = "MsgPruneAcknowledgementsResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// ResponseResultType defines the possible outcomes of the execution of a message -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ResponseResultType { - /// Default zero value enumeration - Unspecified = 0, - /// The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - Noop = 1, - /// The message was executed successfully - Success = 2, - /// The message was executed unsuccessfully - Failure = 3, -} -impl ResponseResultType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ResponseResultType::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED", - ResponseResultType::Noop => "RESPONSE_RESULT_TYPE_NOOP", - ResponseResultType::Success => "RESPONSE_RESULT_TYPE_SUCCESS", - ResponseResultType::Failure => "RESPONSE_RESULT_TYPE_FAILURE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "RESPONSE_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "RESPONSE_RESULT_TYPE_NOOP" => Some(Self::Noop), - "RESPONSE_RESULT_TYPE_SUCCESS" => Some(Self::Success), - "RESPONSE_RESULT_TYPE_FAILURE" => Some(Self::Failure), - _ => None, - } - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the ibc/channel Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } } impl MsgClient where @@ -1549,311 +1105,63 @@ pub mod msg_client { .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Acknowledgement")); self.inner.unary(req, path, codec).await } - /// ChannelUpgradeInit defines a rpc handler method for MsgChannelUpgradeInit. - pub async fn channel_upgrade_init( - &mut self, - request: impl tonic::IntoRequest, + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. + async fn channel_open_init( + &self, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelUpgradeInit", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeInit"), - ); - self.inner.unary(req, path, codec).await - } - /// ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. - pub async fn channel_upgrade_try( - &mut self, - request: impl tonic::IntoRequest, + >; + /// ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. + async fn channel_open_try( + &self, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelUpgradeTry", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeTry")); - self.inner.unary(req, path, codec).await - } - /// ChannelUpgradeAck defines a rpc handler method for MsgChannelUpgradeAck. - pub async fn channel_upgrade_ack( - &mut self, - request: impl tonic::IntoRequest, + >; + /// ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. + async fn channel_open_ack( + &self, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelUpgradeAck", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeAck")); - self.inner.unary(req, path, codec).await - } - /// ChannelUpgradeConfirm defines a rpc handler method for MsgChannelUpgradeConfirm. - pub async fn channel_upgrade_confirm( - &mut self, - request: impl tonic::IntoRequest, + >; + /// ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. + async fn channel_open_confirm( + &self, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelUpgradeConfirm", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeConfirm"), - ); - self.inner.unary(req, path, codec).await - } - /// ChannelUpgradeOpen defines a rpc handler method for MsgChannelUpgradeOpen. - pub async fn channel_upgrade_open( - &mut self, - request: impl tonic::IntoRequest, + >; + /// ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. + async fn channel_close_init( + &self, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelUpgradeOpen", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeOpen"), - ); - self.inner.unary(req, path, codec).await - } - /// ChannelUpgradeTimeout defines a rpc handler method for MsgChannelUpgradeTimeout. - pub async fn channel_upgrade_timeout( - &mut self, - request: impl tonic::IntoRequest, + >; + /// ChannelCloseConfirm defines a rpc handler method for + /// MsgChannelCloseConfirm. + async fn channel_close_confirm( + &self, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelUpgradeTimeout", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeTimeout"), - ); - self.inner.unary(req, path, codec).await - } - /// ChannelUpgradeCancel defines a rpc handler method for MsgChannelUpgradeCancel. - pub async fn channel_upgrade_cancel( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelUpgradeCancel", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelUpgradeCancel"), - ); - self.inner.unary(req, path, codec).await - } - /// UpdateChannelParams defines a rpc handler method for MsgUpdateParams. - pub async fn update_channel_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/UpdateChannelParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "UpdateChannelParams"), - ); - self.inner.unary(req, path, codec).await - } - /// PruneAcknowledgements defines a rpc handler method for MsgPruneAcknowledgements. - pub async fn prune_acknowledgements( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/PruneAcknowledgements", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "PruneAcknowledgements"), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. - async fn channel_open_init( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. - async fn channel_open_try( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. - async fn channel_open_ack( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. - async fn channel_open_confirm( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. - async fn channel_close_init( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelCloseConfirm defines a rpc handler method for - /// MsgChannelCloseConfirm. - async fn channel_close_confirm( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; /// RecvPacket defines a rpc handler method for MsgRecvPacket. @@ -1888,78 +1196,6 @@ pub mod msg_server { tonic::Response, tonic::Status, >; - /// ChannelUpgradeInit defines a rpc handler method for MsgChannelUpgradeInit. - async fn channel_upgrade_init( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. - async fn channel_upgrade_try( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelUpgradeAck defines a rpc handler method for MsgChannelUpgradeAck. - async fn channel_upgrade_ack( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelUpgradeConfirm defines a rpc handler method for MsgChannelUpgradeConfirm. - async fn channel_upgrade_confirm( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelUpgradeOpen defines a rpc handler method for MsgChannelUpgradeOpen. - async fn channel_upgrade_open( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelUpgradeTimeout defines a rpc handler method for MsgChannelUpgradeTimeout. - async fn channel_upgrade_timeout( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelUpgradeCancel defines a rpc handler method for MsgChannelUpgradeCancel. - async fn channel_upgrade_cancel( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UpdateChannelParams defines a rpc handler method for MsgUpdateParams. - async fn update_channel_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// PruneAcknowledgements defines a rpc handler method for MsgPruneAcknowledgements. - async fn prune_acknowledgements( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } /// Msg defines the ibc/channel Msg service. #[derive(Debug)] @@ -1968,408 +1204,96 @@ pub mod msg_server { accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl MsgServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for MsgServer - where - T: Msg, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/ibc.core.channel.v1.Msg/ChannelOpenInit" => { - #[allow(non_camel_case_types)] - struct ChannelOpenInitSvc(pub Arc); - impl tonic::server::UnaryService - for ChannelOpenInitSvc { - type Response = super::MsgChannelOpenInitResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_open_init(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelOpenInitSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/ChannelOpenTry" => { - #[allow(non_camel_case_types)] - struct ChannelOpenTrySvc(pub Arc); - impl tonic::server::UnaryService - for ChannelOpenTrySvc { - type Response = super::MsgChannelOpenTryResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_open_try(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelOpenTrySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/ChannelOpenAck" => { - #[allow(non_camel_case_types)] - struct ChannelOpenAckSvc(pub Arc); - impl tonic::server::UnaryService - for ChannelOpenAckSvc { - type Response = super::MsgChannelOpenAckResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_open_ack(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelOpenAckSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/ChannelOpenConfirm" => { - #[allow(non_camel_case_types)] - struct ChannelOpenConfirmSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for ChannelOpenConfirmSvc { - type Response = super::MsgChannelOpenConfirmResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_open_confirm(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelOpenConfirmSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/ChannelCloseInit" => { - #[allow(non_camel_case_types)] - struct ChannelCloseInitSvc(pub Arc); - impl tonic::server::UnaryService - for ChannelCloseInitSvc { - type Response = super::MsgChannelCloseInitResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_close_init(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelCloseInitSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/ChannelCloseConfirm" => { - #[allow(non_camel_case_types)] - struct ChannelCloseConfirmSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for ChannelCloseConfirmSvc { - type Response = super::MsgChannelCloseConfirmResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_close_confirm(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelCloseConfirmSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/RecvPacket" => { - #[allow(non_camel_case_types)] - struct RecvPacketSvc(pub Arc); - impl tonic::server::UnaryService - for RecvPacketSvc { - type Response = super::MsgRecvPacketResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::recv_packet(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = RecvPacketSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/Timeout" => { + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/ibc.core.channel.v1.Msg/ChannelOpenInit" => { #[allow(non_camel_case_types)] - struct TimeoutSvc(pub Arc); - impl tonic::server::UnaryService - for TimeoutSvc { - type Response = super::MsgTimeoutResponse; + struct ChannelOpenInitSvc(pub Arc); + impl tonic::server::UnaryService + for ChannelOpenInitSvc { + type Response = super::MsgChannelOpenInitResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::timeout(&inner, request).await + ::channel_open_init(&inner, request).await }; Box::pin(fut) } @@ -2381,7 +1305,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = TimeoutSvc(inner); + let method = ChannelOpenInitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2397,23 +1321,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/TimeoutOnClose" => { + "/ibc.core.channel.v1.Msg/ChannelOpenTry" => { #[allow(non_camel_case_types)] - struct TimeoutOnCloseSvc(pub Arc); - impl tonic::server::UnaryService - for TimeoutOnCloseSvc { - type Response = super::MsgTimeoutOnCloseResponse; + struct ChannelOpenTrySvc(pub Arc); + impl tonic::server::UnaryService + for ChannelOpenTrySvc { + type Response = super::MsgChannelOpenTryResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::timeout_on_close(&inner, request).await + ::channel_open_try(&inner, request).await }; Box::pin(fut) } @@ -2425,7 +1349,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = TimeoutOnCloseSvc(inner); + let method = ChannelOpenTrySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2441,23 +1365,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/Acknowledgement" => { + "/ibc.core.channel.v1.Msg/ChannelOpenAck" => { #[allow(non_camel_case_types)] - struct AcknowledgementSvc(pub Arc); - impl tonic::server::UnaryService - for AcknowledgementSvc { - type Response = super::MsgAcknowledgementResponse; + struct ChannelOpenAckSvc(pub Arc); + impl tonic::server::UnaryService + for ChannelOpenAckSvc { + type Response = super::MsgChannelOpenAckResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::acknowledgement(&inner, request).await + ::channel_open_ack(&inner, request).await }; Box::pin(fut) } @@ -2469,7 +1393,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = AcknowledgementSvc(inner); + let method = ChannelOpenAckSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2485,113 +1409,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelUpgradeInit" => { + "/ibc.core.channel.v1.Msg/ChannelOpenConfirm" => { #[allow(non_camel_case_types)] - struct ChannelUpgradeInitSvc(pub Arc); + struct ChannelOpenConfirmSvc(pub Arc); impl< T: Msg, - > tonic::server::UnaryService - for ChannelUpgradeInitSvc { - type Response = super::MsgChannelUpgradeInitResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_upgrade_init(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelUpgradeInitSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/ChannelUpgradeTry" => { - #[allow(non_camel_case_types)] - struct ChannelUpgradeTrySvc(pub Arc); - impl tonic::server::UnaryService - for ChannelUpgradeTrySvc { - type Response = super::MsgChannelUpgradeTryResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_upgrade_try(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelUpgradeTrySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Msg/ChannelUpgradeAck" => { - #[allow(non_camel_case_types)] - struct ChannelUpgradeAckSvc(pub Arc); - impl tonic::server::UnaryService - for ChannelUpgradeAckSvc { - type Response = super::MsgChannelUpgradeAckResponse; + > tonic::server::UnaryService + for ChannelOpenConfirmSvc { + type Response = super::MsgChannelOpenConfirmResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_upgrade_ack(&inner, request).await + ::channel_open_confirm(&inner, request).await }; Box::pin(fut) } @@ -2603,7 +1439,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelUpgradeAckSvc(inner); + let method = ChannelOpenConfirmSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2619,25 +1455,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelUpgradeConfirm" => { + "/ibc.core.channel.v1.Msg/ChannelCloseInit" => { #[allow(non_camel_case_types)] - struct ChannelUpgradeConfirmSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for ChannelUpgradeConfirmSvc { - type Response = super::MsgChannelUpgradeConfirmResponse; + struct ChannelCloseInitSvc(pub Arc); + impl tonic::server::UnaryService + for ChannelCloseInitSvc { + type Response = super::MsgChannelCloseInitResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_upgrade_confirm(&inner, request).await + ::channel_close_init(&inner, request).await }; Box::pin(fut) } @@ -2649,7 +1483,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelUpgradeConfirmSvc(inner); + let method = ChannelCloseInitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2665,25 +1499,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelUpgradeOpen" => { + "/ibc.core.channel.v1.Msg/ChannelCloseConfirm" => { #[allow(non_camel_case_types)] - struct ChannelUpgradeOpenSvc(pub Arc); + struct ChannelCloseConfirmSvc(pub Arc); impl< T: Msg, - > tonic::server::UnaryService - for ChannelUpgradeOpenSvc { - type Response = super::MsgChannelUpgradeOpenResponse; + > tonic::server::UnaryService + for ChannelCloseConfirmSvc { + type Response = super::MsgChannelCloseConfirmResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_upgrade_open(&inner, request).await + ::channel_close_confirm(&inner, request).await }; Box::pin(fut) } @@ -2695,7 +1529,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelUpgradeOpenSvc(inner); + let method = ChannelCloseConfirmSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2711,25 +1545,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelUpgradeTimeout" => { + "/ibc.core.channel.v1.Msg/RecvPacket" => { #[allow(non_camel_case_types)] - struct ChannelUpgradeTimeoutSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for ChannelUpgradeTimeoutSvc { - type Response = super::MsgChannelUpgradeTimeoutResponse; + struct RecvPacketSvc(pub Arc); + impl tonic::server::UnaryService + for RecvPacketSvc { + type Response = super::MsgRecvPacketResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_upgrade_timeout(&inner, request).await + ::recv_packet(&inner, request).await }; Box::pin(fut) } @@ -2741,7 +1573,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelUpgradeTimeoutSvc(inner); + let method = RecvPacketSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2757,25 +1589,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelUpgradeCancel" => { + "/ibc.core.channel.v1.Msg/Timeout" => { #[allow(non_camel_case_types)] - struct ChannelUpgradeCancelSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for ChannelUpgradeCancelSvc { - type Response = super::MsgChannelUpgradeCancelResponse; + struct TimeoutSvc(pub Arc); + impl tonic::server::UnaryService + for TimeoutSvc { + type Response = super::MsgTimeoutResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_upgrade_cancel(&inner, request).await + ::timeout(&inner, request).await }; Box::pin(fut) } @@ -2787,7 +1617,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelUpgradeCancelSvc(inner); + let method = TimeoutSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2803,23 +1633,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/UpdateChannelParams" => { + "/ibc.core.channel.v1.Msg/TimeoutOnClose" => { #[allow(non_camel_case_types)] - struct UpdateChannelParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateChannelParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct TimeoutOnCloseSvc(pub Arc); + impl tonic::server::UnaryService + for TimeoutOnCloseSvc { + type Response = super::MsgTimeoutOnCloseResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_channel_params(&inner, request).await + ::timeout_on_close(&inner, request).await }; Box::pin(fut) } @@ -2831,7 +1661,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateChannelParamsSvc(inner); + let method = TimeoutOnCloseSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2847,25 +1677,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/PruneAcknowledgements" => { + "/ibc.core.channel.v1.Msg/Acknowledgement" => { #[allow(non_camel_case_types)] - struct PruneAcknowledgementsSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for PruneAcknowledgementsSvc { - type Response = super::MsgPruneAcknowledgementsResponse; + struct AcknowledgementSvc(pub Arc); + impl tonic::server::UnaryService + for AcknowledgementSvc { + type Response = super::MsgAcknowledgementResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::prune_acknowledgements(&inner, request).await + ::acknowledgement(&inner, request).await }; Box::pin(fut) } @@ -2877,7 +1705,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = PruneAcknowledgementsSvc(inner); + let method = AcknowledgementSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3488,7 +2316,7 @@ impl ::prost::Name for QueryNextSequenceReceiveRequest { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QuerySequenceResponse is the response type for the +/// QuerySequenceResponse is the request type for the /// Query/QueryNextSequenceReceiveResponse RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -3551,104 +2379,6 @@ impl ::prost::Name for QueryNextSequenceSendResponse { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryUpgradeErrorRequest is the request type for the Query/QueryUpgradeError RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradeErrorRequest { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryUpgradeErrorRequest { - const NAME: &'static str = "QueryUpgradeErrorRequest"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryUpgradeErrorResponse is the response type for the Query/QueryUpgradeError RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradeErrorResponse { - #[prost(message, optional, tag = "1")] - pub error_receipt: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryUpgradeErrorResponse { - const NAME: &'static str = "QueryUpgradeErrorResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryUpgradeRequest is the request type for the QueryUpgradeRequest RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradeRequest { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryUpgradeRequest { - const NAME: &'static str = "QueryUpgradeRequest"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryUpgradeResponse is the response type for the QueryUpgradeResponse RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradeResponse { - #[prost(message, optional, tag = "1")] - pub upgrade: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryUpgradeResponse { - const NAME: &'static str = "QueryUpgradeResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryChannelParamsRequest is the request type for the Query/ChannelParams RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelParamsRequest {} -impl ::prost::Name for QueryChannelParamsRequest { - const NAME: &'static str = "QueryChannelParamsRequest"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryChannelParamsResponse is the response type for the Query/ChannelParams RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryChannelParamsResponse { - const NAME: &'static str = "QueryChannelParamsResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} /// Generated client implementations. #[cfg(feature = "client")] pub mod query_client { @@ -4131,84 +2861,6 @@ pub mod query_client { ); self.inner.unary(req, path, codec).await } - /// UpgradeError returns the error receipt if the upgrade handshake failed. - pub async fn upgrade_error( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/UpgradeError", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "UpgradeError")); - self.inner.unary(req, path, codec).await - } - /// Upgrade returns the upgrade for a given port and channel id. - pub async fn upgrade( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/Upgrade", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Upgrade")); - self.inner.unary(req, path, codec).await - } - /// ChannelParams queries all parameters of the ibc channel submodule. - pub async fn channel_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/ChannelParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "ChannelParams")); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -4339,30 +2991,6 @@ pub mod query_server { tonic::Response, tonic::Status, >; - /// UpgradeError returns the error receipt if the upgrade handshake failed. - async fn upgrade_error( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Upgrade returns the upgrade for a given port and channel id. - async fn upgrade( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelParams queries all parameters of the ibc channel submodule. - async fn channel_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } /// Query provides defines the gRPC querier service #[derive(Debug)] @@ -5103,144 +3731,6 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/UpgradeError" => { - #[allow(non_camel_case_types)] - struct UpgradeErrorSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for UpgradeErrorSvc { - type Response = super::QueryUpgradeErrorResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::upgrade_error(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpgradeErrorSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Query/Upgrade" => { - #[allow(non_camel_case_types)] - struct UpgradeSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for UpgradeSvc { - type Response = super::QueryUpgradeResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::upgrade(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpgradeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Query/ChannelParams" => { - #[allow(non_camel_case_types)] - struct ChannelParamsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ChannelParamsSvc { - type Response = super::QueryChannelParamsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_params(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelParamsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( diff --git a/src/prost/ibc.core.channel.v1.serde.rs b/src/prost/ibc.core.channel.v1.serde.rs index 4235d280..1bf7c67b 100644 --- a/src/prost/ibc.core.channel.v1.serde.rs +++ b/src/prost/ibc.core.channel.v1.serde.rs @@ -129,9 +129,6 @@ impl serde::Serialize for Channel { if true { len += 1; } - if true { - len += 1; - } let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.Channel", len)?; if true { let v = State::try_from(self.state) @@ -152,10 +149,6 @@ impl serde::Serialize for Channel { if true { struct_ser.serialize_field("version", &self.version)?; } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("upgradeSequence", ::alloc::string::ToString::to_string(&self.upgrade_sequence).as_str())?; - } struct_ser.end() } } @@ -172,8 +165,6 @@ impl<'de> serde::Deserialize<'de> for Channel { "connection_hops", "connectionHops", "version", - "upgrade_sequence", - "upgradeSequence", ]; #[allow(clippy::enum_variant_names)] @@ -183,7 +174,6 @@ impl<'de> serde::Deserialize<'de> for Channel { Counterparty, ConnectionHops, Version, - UpgradeSequence, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -210,7 +200,6 @@ impl<'de> serde::Deserialize<'de> for Channel { "counterparty" => Ok(GeneratedField::Counterparty), "connectionHops" | "connection_hops" => Ok(GeneratedField::ConnectionHops), "version" => Ok(GeneratedField::Version), - "upgradeSequence" | "upgrade_sequence" => Ok(GeneratedField::UpgradeSequence), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -235,7 +224,6 @@ impl<'de> serde::Deserialize<'de> for Channel { let mut counterparty__ = None; let mut connection_hops__ = None; let mut version__ = None; - let mut upgrade_sequence__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::State => { @@ -268,14 +256,6 @@ impl<'de> serde::Deserialize<'de> for Channel { } version__ = Some(map_.next_value()?); } - GeneratedField::UpgradeSequence => { - if upgrade_sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("upgradeSequence")); - } - upgrade_sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } } } Ok(Channel { @@ -284,7 +264,6 @@ impl<'de> serde::Deserialize<'de> for Channel { counterparty: counterparty__, connection_hops: connection_hops__.unwrap_or_default(), version: version__.unwrap_or_default(), - upgrade_sequence: upgrade_sequence__.unwrap_or_default(), }) } } @@ -401,117 +380,6 @@ impl<'de> serde::Deserialize<'de> for Counterparty { deserializer.deserialize_struct("ibc.core.channel.v1.Counterparty", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ErrorReceipt { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.ErrorReceipt", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; - } - if true { - struct_ser.serialize_field("message", &self.message)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ErrorReceipt { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sequence", - "message", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sequence, - Message, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "sequence" => Ok(GeneratedField::Sequence), - "message" => Ok(GeneratedField::Message), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ErrorReceipt; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.ErrorReceipt") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sequence__ = None; - let mut message__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Sequence => { - if sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("sequence")); - } - sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Message => { - if message__.is_some() { - return Err(serde::de::Error::duplicate_field("message")); - } - message__ = Some(map_.next_value()?); - } - } - } - Ok(ErrorReceipt { - sequence: sequence__.unwrap_or_default(), - message: message__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.ErrorReceipt", FIELDS, GeneratedVisitor) - } -} impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result @@ -544,9 +412,6 @@ impl serde::Serialize for GenesisState { if true { len += 1; } - if true { - len += 1; - } let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.GenesisState", len)?; if true { struct_ser.serialize_field("channels", &self.channels)?; @@ -573,9 +438,6 @@ impl serde::Serialize for GenesisState { #[allow(clippy::needless_borrow)] struct_ser.serialize_field("nextChannelSequence", ::alloc::string::ToString::to_string(&self.next_channel_sequence).as_str())?; } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } struct_ser.end() } } @@ -598,7 +460,6 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "ackSequences", "next_channel_sequence", "nextChannelSequence", - "params", ]; #[allow(clippy::enum_variant_names)] @@ -611,7 +472,6 @@ impl<'de> serde::Deserialize<'de> for GenesisState { RecvSequences, AckSequences, NextChannelSequence, - Params, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -641,7 +501,6 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "recvSequences" | "recv_sequences" => Ok(GeneratedField::RecvSequences), "ackSequences" | "ack_sequences" => Ok(GeneratedField::AckSequences), "nextChannelSequence" | "next_channel_sequence" => Ok(GeneratedField::NextChannelSequence), - "params" => Ok(GeneratedField::Params), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -669,7 +528,6 @@ impl<'de> serde::Deserialize<'de> for GenesisState { let mut recv_sequences__ = None; let mut ack_sequences__ = None; let mut next_channel_sequence__ = None; - let mut params__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Channels => { @@ -722,12 +580,6 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } } } Ok(GenesisState { @@ -739,7 +591,6 @@ impl<'de> serde::Deserialize<'de> for GenesisState { recv_sequences: recv_sequences__.unwrap_or_default(), ack_sequences: ack_sequences__.unwrap_or_default(), next_channel_sequence: next_channel_sequence__.unwrap_or_default(), - params: params__, }) } } @@ -775,9 +626,6 @@ impl serde::Serialize for IdentifiedChannel { if true { len += 1; } - if true { - len += 1; - } let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.IdentifiedChannel", len)?; if true { let v = State::try_from(self.state) @@ -804,10 +652,6 @@ impl serde::Serialize for IdentifiedChannel { if true { struct_ser.serialize_field("channelId", &self.channel_id)?; } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("upgradeSequence", ::alloc::string::ToString::to_string(&self.upgrade_sequence).as_str())?; - } struct_ser.end() } } @@ -828,8 +672,6 @@ impl<'de> serde::Deserialize<'de> for IdentifiedChannel { "portId", "channel_id", "channelId", - "upgrade_sequence", - "upgradeSequence", ]; #[allow(clippy::enum_variant_names)] @@ -841,7 +683,6 @@ impl<'de> serde::Deserialize<'de> for IdentifiedChannel { Version, PortId, ChannelId, - UpgradeSequence, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -870,7 +711,6 @@ impl<'de> serde::Deserialize<'de> for IdentifiedChannel { "version" => Ok(GeneratedField::Version), "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "upgradeSequence" | "upgrade_sequence" => Ok(GeneratedField::UpgradeSequence), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -897,7 +737,6 @@ impl<'de> serde::Deserialize<'de> for IdentifiedChannel { let mut version__ = None; let mut port_id__ = None; let mut channel_id__ = None; - let mut upgrade_sequence__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::State => { @@ -942,14 +781,6 @@ impl<'de> serde::Deserialize<'de> for IdentifiedChannel { } channel_id__ = Some(map_.next_value()?); } - GeneratedField::UpgradeSequence => { - if upgrade_sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("upgradeSequence")); - } - upgrade_sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } } } Ok(IdentifiedChannel { @@ -960,7 +791,6 @@ impl<'de> serde::Deserialize<'de> for IdentifiedChannel { version: version__.unwrap_or_default(), port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), - upgrade_sequence: upgrade_sequence__.unwrap_or_default(), }) } } @@ -1250,9 +1080,6 @@ impl serde::Serialize for MsgChannelCloseConfirm { if true { len += 1; } - if true { - len += 1; - } let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelCloseConfirm", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; @@ -1270,10 +1097,6 @@ impl serde::Serialize for MsgChannelCloseConfirm { if true { struct_ser.serialize_field("signer", &self.signer)?; } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("counterpartyUpgradeSequence", ::alloc::string::ToString::to_string(&self.counterparty_upgrade_sequence).as_str())?; - } struct_ser.end() } } @@ -1293,8 +1116,6 @@ impl<'de> serde::Deserialize<'de> for MsgChannelCloseConfirm { "proof_height", "proofHeight", "signer", - "counterparty_upgrade_sequence", - "counterpartyUpgradeSequence", ]; #[allow(clippy::enum_variant_names)] @@ -1304,7 +1125,6 @@ impl<'de> serde::Deserialize<'de> for MsgChannelCloseConfirm { ProofInit, ProofHeight, Signer, - CounterpartyUpgradeSequence, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -1331,7 +1151,6 @@ impl<'de> serde::Deserialize<'de> for MsgChannelCloseConfirm { "proofInit" | "proof_init" => Ok(GeneratedField::ProofInit), "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), "signer" => Ok(GeneratedField::Signer), - "counterpartyUpgradeSequence" | "counterparty_upgrade_sequence" => Ok(GeneratedField::CounterpartyUpgradeSequence), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1356,7 +1175,6 @@ impl<'de> serde::Deserialize<'de> for MsgChannelCloseConfirm { let mut proof_init__ = None; let mut proof_height__ = None; let mut signer__ = None; - let mut counterparty_upgrade_sequence__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -1391,14 +1209,6 @@ impl<'de> serde::Deserialize<'de> for MsgChannelCloseConfirm { } signer__ = Some(map_.next_value()?); } - GeneratedField::CounterpartyUpgradeSequence => { - if counterparty_upgrade_sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyUpgradeSequence")); - } - counterparty_upgrade_sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } } } Ok(MsgChannelCloseConfirm { @@ -1407,7 +1217,6 @@ impl<'de> serde::Deserialize<'de> for MsgChannelCloseConfirm { proof_init: proof_init__.unwrap_or_default(), proof_height: proof_height__, signer: signer__.unwrap_or_default(), - counterparty_upgrade_sequence: counterparty_upgrade_sequence__.unwrap_or_default(), }) } } @@ -2738,7 +2547,7 @@ impl<'de> serde::Deserialize<'de> for MsgChannelOpenTryResponse { deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelOpenTryResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgChannelUpgradeAck { +impl serde::Serialize for MsgRecvPacket { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -2758,32 +2567,13 @@ impl serde::Serialize for MsgChannelUpgradeAck { if true { len += 1; } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeAck", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if let Some(v) = self.counterparty_upgrade.as_ref() { - struct_ser.serialize_field("counterpartyUpgrade", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofChannel", pbjson::private::base64::encode(&self.proof_channel).as_str())?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgRecvPacket", len)?; + if let Some(v) = self.packet.as_ref() { + struct_ser.serialize_field("packet", v)?; } if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofUpgrade", pbjson::private::base64::encode(&self.proof_upgrade).as_str())?; + struct_ser.serialize_field("proofCommitment", pbjson::private::base64::encode(&self.proof_commitment).as_str())?; } if let Some(v) = self.proof_height.as_ref() { struct_ser.serialize_field("proofHeight", v)?; @@ -2794,23 +2584,16 @@ impl serde::Serialize for MsgChannelUpgradeAck { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeAck { +impl<'de> serde::Deserialize<'de> for MsgRecvPacket { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "counterparty_upgrade", - "counterpartyUpgrade", - "proof_channel", - "proofChannel", - "proof_upgrade", - "proofUpgrade", + "packet", + "proof_commitment", + "proofCommitment", "proof_height", "proofHeight", "signer", @@ -2818,11 +2601,8 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeAck { #[allow(clippy::enum_variant_names)] enum GeneratedField { - PortId, - ChannelId, - CounterpartyUpgrade, - ProofChannel, - ProofUpgrade, + Packet, + ProofCommitment, ProofHeight, Signer, } @@ -2846,11 +2626,8 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeAck { E: serde::de::Error, { match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "counterpartyUpgrade" | "counterparty_upgrade" => Ok(GeneratedField::CounterpartyUpgrade), - "proofChannel" | "proof_channel" => Ok(GeneratedField::ProofChannel), - "proofUpgrade" | "proof_upgrade" => Ok(GeneratedField::ProofUpgrade), + "packet" => Ok(GeneratedField::Packet), + "proofCommitment" | "proof_commitment" => Ok(GeneratedField::ProofCommitment), "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), "signer" => Ok(GeneratedField::Signer), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -2862,56 +2639,33 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeAck { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeAck; + type Value = MsgRecvPacket; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeAck") + formatter.write_str("struct ibc.core.channel.v1.MsgRecvPacket") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut counterparty_upgrade__ = None; - let mut proof_channel__ = None; - let mut proof_upgrade__ = None; + let mut packet__ = None; + let mut proof_commitment__ = None; let mut proof_height__ = None; let mut signer__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::CounterpartyUpgrade => { - if counterparty_upgrade__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyUpgrade")); - } - counterparty_upgrade__ = map_.next_value()?; - } - GeneratedField::ProofChannel => { - if proof_channel__.is_some() { - return Err(serde::de::Error::duplicate_field("proofChannel")); + GeneratedField::Packet => { + if packet__.is_some() { + return Err(serde::de::Error::duplicate_field("packet")); } - proof_channel__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; + packet__ = map_.next_value()?; } - GeneratedField::ProofUpgrade => { - if proof_upgrade__.is_some() { - return Err(serde::de::Error::duplicate_field("proofUpgrade")); + GeneratedField::ProofCommitment => { + if proof_commitment__.is_some() { + return Err(serde::de::Error::duplicate_field("proofCommitment")); } - proof_upgrade__ = + proof_commitment__ = Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) ; } @@ -2929,21 +2683,18 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeAck { } } } - Ok(MsgChannelUpgradeAck { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - counterparty_upgrade: counterparty_upgrade__, - proof_channel: proof_channel__.unwrap_or_default(), - proof_upgrade: proof_upgrade__.unwrap_or_default(), + Ok(MsgRecvPacket { + packet: packet__, + proof_commitment: proof_commitment__.unwrap_or_default(), proof_height: proof_height__, signer: signer__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeAck", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.MsgRecvPacket", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgChannelUpgradeAckResponse { +impl serde::Serialize for MsgRecvPacketResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -2954,7 +2705,7 @@ impl serde::Serialize for MsgChannelUpgradeAckResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeAckResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgRecvPacketResponse", len)?; if true { let v = ResponseResultType::try_from(self.result) .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.result)))?; @@ -2963,7 +2714,7 @@ impl serde::Serialize for MsgChannelUpgradeAckResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeAckResponse { +impl<'de> serde::Deserialize<'de> for MsgRecvPacketResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -3007,13 +2758,13 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeAckResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeAckResponse; + type Value = MsgRecvPacketResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeAckResponse") + formatter.write_str("struct ibc.core.channel.v1.MsgRecvPacketResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { @@ -3028,15 +2779,15 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeAckResponse { } } } - Ok(MsgChannelUpgradeAckResponse { + Ok(MsgRecvPacketResponse { result: result__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeAckResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.MsgRecvPacketResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgChannelUpgradeCancel { +impl serde::Serialize for MsgTimeout { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -3059,59 +2810,50 @@ impl serde::Serialize for MsgChannelUpgradeCancel { if true { len += 1; } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeCancel", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if let Some(v) = self.error_receipt.as_ref() { - struct_ser.serialize_field("errorReceipt", v)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgTimeout", len)?; + if let Some(v) = self.packet.as_ref() { + struct_ser.serialize_field("packet", v)?; } if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofErrorReceipt", pbjson::private::base64::encode(&self.proof_error_receipt).as_str())?; + struct_ser.serialize_field("proofUnreceived", pbjson::private::base64::encode(&self.proof_unreceived).as_str())?; } if let Some(v) = self.proof_height.as_ref() { struct_ser.serialize_field("proofHeight", v)?; } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("nextSequenceRecv", ::alloc::string::ToString::to_string(&self.next_sequence_recv).as_str())?; + } if true { struct_ser.serialize_field("signer", &self.signer)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeCancel { +impl<'de> serde::Deserialize<'de> for MsgTimeout { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "error_receipt", - "errorReceipt", - "proof_error_receipt", - "proofErrorReceipt", + "packet", + "proof_unreceived", + "proofUnreceived", "proof_height", "proofHeight", + "next_sequence_recv", + "nextSequenceRecv", "signer", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - PortId, - ChannelId, - ErrorReceipt, - ProofErrorReceipt, + Packet, + ProofUnreceived, ProofHeight, + NextSequenceRecv, Signer, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3134,11 +2876,10 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeCancel { E: serde::de::Error, { match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "errorReceipt" | "error_receipt" => Ok(GeneratedField::ErrorReceipt), - "proofErrorReceipt" | "proof_error_receipt" => Ok(GeneratedField::ProofErrorReceipt), + "packet" => Ok(GeneratedField::Packet), + "proofUnreceived" | "proof_unreceived" => Ok(GeneratedField::ProofUnreceived), "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), + "nextSequenceRecv" | "next_sequence_recv" => Ok(GeneratedField::NextSequenceRecv), "signer" => Ok(GeneratedField::Signer), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -3149,47 +2890,34 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeCancel { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeCancel; + type Value = MsgTimeout; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeCancel") + formatter.write_str("struct ibc.core.channel.v1.MsgTimeout") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut error_receipt__ = None; - let mut proof_error_receipt__ = None; + let mut packet__ = None; + let mut proof_unreceived__ = None; let mut proof_height__ = None; + let mut next_sequence_recv__ = None; let mut signer__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::ErrorReceipt => { - if error_receipt__.is_some() { - return Err(serde::de::Error::duplicate_field("errorReceipt")); + GeneratedField::Packet => { + if packet__.is_some() { + return Err(serde::de::Error::duplicate_field("packet")); } - error_receipt__ = map_.next_value()?; + packet__ = map_.next_value()?; } - GeneratedField::ProofErrorReceipt => { - if proof_error_receipt__.is_some() { - return Err(serde::de::Error::duplicate_field("proofErrorReceipt")); + GeneratedField::ProofUnreceived => { + if proof_unreceived__.is_some() { + return Err(serde::de::Error::duplicate_field("proofUnreceived")); } - proof_error_receipt__ = + proof_unreceived__ = Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) ; } @@ -3199,6 +2927,14 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeCancel { } proof_height__ = map_.next_value()?; } + GeneratedField::NextSequenceRecv => { + if next_sequence_recv__.is_some() { + return Err(serde::de::Error::duplicate_field("nextSequenceRecv")); + } + next_sequence_recv__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } GeneratedField::Signer => { if signer__.is_some() { return Err(serde::de::Error::duplicate_field("signer")); @@ -3207,91 +2943,19 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeCancel { } } } - Ok(MsgChannelUpgradeCancel { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - error_receipt: error_receipt__, - proof_error_receipt: proof_error_receipt__.unwrap_or_default(), + Ok(MsgTimeout { + packet: packet__, + proof_unreceived: proof_unreceived__.unwrap_or_default(), proof_height: proof_height__, + next_sequence_recv: next_sequence_recv__.unwrap_or_default(), signer: signer__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeCancel", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgChannelUpgradeCancelResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeCancelResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeCancelResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeCancelResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeCancelResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgChannelUpgradeCancelResponse { - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeCancelResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.MsgTimeout", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgChannelUpgradeConfirm { +impl serde::Serialize for MsgTimeoutOnClose { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -3317,77 +2981,57 @@ impl serde::Serialize for MsgChannelUpgradeConfirm { if true { len += 1; } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeConfirm", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if true { - let v = State::try_from(self.counterparty_channel_state) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.counterparty_channel_state)))?; - struct_ser.serialize_field("counterpartyChannelState", &v)?; - } - if let Some(v) = self.counterparty_upgrade.as_ref() { - struct_ser.serialize_field("counterpartyUpgrade", v)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgTimeoutOnClose", len)?; + if let Some(v) = self.packet.as_ref() { + struct_ser.serialize_field("packet", v)?; } if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofChannel", pbjson::private::base64::encode(&self.proof_channel).as_str())?; + struct_ser.serialize_field("proofUnreceived", pbjson::private::base64::encode(&self.proof_unreceived).as_str())?; } if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofUpgrade", pbjson::private::base64::encode(&self.proof_upgrade).as_str())?; + struct_ser.serialize_field("proofClose", pbjson::private::base64::encode(&self.proof_close).as_str())?; } if let Some(v) = self.proof_height.as_ref() { struct_ser.serialize_field("proofHeight", v)?; } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("nextSequenceRecv", ::alloc::string::ToString::to_string(&self.next_sequence_recv).as_str())?; + } if true { struct_ser.serialize_field("signer", &self.signer)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeConfirm { +impl<'de> serde::Deserialize<'de> for MsgTimeoutOnClose { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "counterparty_channel_state", - "counterpartyChannelState", - "counterparty_upgrade", - "counterpartyUpgrade", - "proof_channel", - "proofChannel", - "proof_upgrade", - "proofUpgrade", + "packet", + "proof_unreceived", + "proofUnreceived", + "proof_close", + "proofClose", "proof_height", "proofHeight", + "next_sequence_recv", + "nextSequenceRecv", "signer", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - PortId, - ChannelId, - CounterpartyChannelState, - CounterpartyUpgrade, - ProofChannel, - ProofUpgrade, + Packet, + ProofUnreceived, + ProofClose, ProofHeight, + NextSequenceRecv, Signer, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3410,13 +3054,11 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeConfirm { E: serde::de::Error, { match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "counterpartyChannelState" | "counterparty_channel_state" => Ok(GeneratedField::CounterpartyChannelState), - "counterpartyUpgrade" | "counterparty_upgrade" => Ok(GeneratedField::CounterpartyUpgrade), - "proofChannel" | "proof_channel" => Ok(GeneratedField::ProofChannel), - "proofUpgrade" | "proof_upgrade" => Ok(GeneratedField::ProofUpgrade), + "packet" => Ok(GeneratedField::Packet), + "proofUnreceived" | "proof_unreceived" => Ok(GeneratedField::ProofUnreceived), + "proofClose" | "proof_close" => Ok(GeneratedField::ProofClose), "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), + "nextSequenceRecv" | "next_sequence_recv" => Ok(GeneratedField::NextSequenceRecv), "signer" => Ok(GeneratedField::Signer), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -3427,63 +3069,43 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeConfirm { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeConfirm; + type Value = MsgTimeoutOnClose; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeConfirm") + formatter.write_str("struct ibc.core.channel.v1.MsgTimeoutOnClose") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut counterparty_channel_state__ = None; - let mut counterparty_upgrade__ = None; - let mut proof_channel__ = None; - let mut proof_upgrade__ = None; + let mut packet__ = None; + let mut proof_unreceived__ = None; + let mut proof_close__ = None; let mut proof_height__ = None; + let mut next_sequence_recv__ = None; let mut signer__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::CounterpartyChannelState => { - if counterparty_channel_state__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyChannelState")); - } - counterparty_channel_state__ = Some(map_.next_value::()? as i32); - } - GeneratedField::CounterpartyUpgrade => { - if counterparty_upgrade__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyUpgrade")); + GeneratedField::Packet => { + if packet__.is_some() { + return Err(serde::de::Error::duplicate_field("packet")); } - counterparty_upgrade__ = map_.next_value()?; + packet__ = map_.next_value()?; } - GeneratedField::ProofChannel => { - if proof_channel__.is_some() { - return Err(serde::de::Error::duplicate_field("proofChannel")); + GeneratedField::ProofUnreceived => { + if proof_unreceived__.is_some() { + return Err(serde::de::Error::duplicate_field("proofUnreceived")); } - proof_channel__ = + proof_unreceived__ = Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) ; } - GeneratedField::ProofUpgrade => { - if proof_upgrade__.is_some() { - return Err(serde::de::Error::duplicate_field("proofUpgrade")); + GeneratedField::ProofClose => { + if proof_close__.is_some() { + return Err(serde::de::Error::duplicate_field("proofClose")); } - proof_upgrade__ = + proof_close__ = Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) ; } @@ -3493,6 +3115,14 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeConfirm { } proof_height__ = map_.next_value()?; } + GeneratedField::NextSequenceRecv => { + if next_sequence_recv__.is_some() { + return Err(serde::de::Error::duplicate_field("nextSequenceRecv")); + } + next_sequence_recv__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } GeneratedField::Signer => { if signer__.is_some() { return Err(serde::de::Error::duplicate_field("signer")); @@ -3501,22 +3131,20 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeConfirm { } } } - Ok(MsgChannelUpgradeConfirm { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - counterparty_channel_state: counterparty_channel_state__.unwrap_or_default(), - counterparty_upgrade: counterparty_upgrade__, - proof_channel: proof_channel__.unwrap_or_default(), - proof_upgrade: proof_upgrade__.unwrap_or_default(), + Ok(MsgTimeoutOnClose { + packet: packet__, + proof_unreceived: proof_unreceived__.unwrap_or_default(), + proof_close: proof_close__.unwrap_or_default(), proof_height: proof_height__, + next_sequence_recv: next_sequence_recv__.unwrap_or_default(), signer: signer__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeConfirm", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.MsgTimeoutOnClose", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgChannelUpgradeConfirmResponse { +impl serde::Serialize for MsgTimeoutOnCloseResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -3527,7 +3155,7 @@ impl serde::Serialize for MsgChannelUpgradeConfirmResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgTimeoutOnCloseResponse", len)?; if true { let v = ResponseResultType::try_from(self.result) .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.result)))?; @@ -3536,7 +3164,7 @@ impl serde::Serialize for MsgChannelUpgradeConfirmResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeConfirmResponse { +impl<'de> serde::Deserialize<'de> for MsgTimeoutOnCloseResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -3580,13 +3208,13 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeConfirmResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeConfirmResponse; + type Value = MsgTimeoutOnCloseResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse") + formatter.write_str("struct ibc.core.channel.v1.MsgTimeoutOnCloseResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { @@ -3601,15 +3229,15 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeConfirmResponse { } } } - Ok(MsgChannelUpgradeConfirmResponse { + Ok(MsgTimeoutOnCloseResponse { result: result__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.MsgTimeoutOnCloseResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgChannelUpgradeInit { +impl serde::Serialize for MsgTimeoutResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -3620,52 +3248,28 @@ impl serde::Serialize for MsgChannelUpgradeInit { if true { len += 1; } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgTimeoutResponse", len)?; if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeInit", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if let Some(v) = self.fields.as_ref() { - struct_ser.serialize_field("fields", v)?; - } - if true { - struct_ser.serialize_field("signer", &self.signer)?; + let v = ResponseResultType::try_from(self.result) + .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.result)))?; + struct_ser.serialize_field("result", &v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeInit { +impl<'de> serde::Deserialize<'de> for MsgTimeoutResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "fields", - "signer", + "result", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - PortId, - ChannelId, - Fields, - Signer, + Result, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -3687,10 +3291,7 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeInit { E: serde::de::Error, { match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "fields" => Ok(GeneratedField::Fields), - "signer" => Ok(GeneratedField::Signer), + "result" => Ok(GeneratedField::Result), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3700,172 +3301,110 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeInit { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeInit; + type Value = MsgTimeoutResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeInit") + formatter.write_str("struct ibc.core.channel.v1.MsgTimeoutResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut fields__ = None; - let mut signer__ = None; + let mut result__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::Fields => { - if fields__.is_some() { - return Err(serde::de::Error::duplicate_field("fields")); - } - fields__ = map_.next_value()?; - } - GeneratedField::Signer => { - if signer__.is_some() { - return Err(serde::de::Error::duplicate_field("signer")); + GeneratedField::Result => { + if result__.is_some() { + return Err(serde::de::Error::duplicate_field("result")); } - signer__ = Some(map_.next_value()?); + result__ = Some(map_.next_value::()? as i32); } } } - Ok(MsgChannelUpgradeInit { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - fields: fields__, - signer: signer__.unwrap_or_default(), + Ok(MsgTimeoutResponse { + result: result__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeInit", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.MsgTimeoutResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgChannelUpgradeInitResponse { +impl serde::Serialize for Order { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where S: serde::Serializer, { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeInitResponse", len)?; - if let Some(v) = self.upgrade.as_ref() { - struct_ser.serialize_field("upgrade", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("upgradeSequence", ::alloc::string::ToString::to_string(&self.upgrade_sequence).as_str())?; - } - struct_ser.end() + let variant = match self { + Self::NoneUnspecified => "ORDER_NONE_UNSPECIFIED", + Self::Unordered => "ORDER_UNORDERED", + Self::Ordered => "ORDER_ORDERED", + }; + serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeInitResponse { +impl<'de> serde::Deserialize<'de> for Order { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "upgrade", - "upgrade_sequence", - "upgradeSequence", + "ORDER_NONE_UNSPECIFIED", + "ORDER_UNORDERED", + "ORDER_ORDERED", ]; - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Upgrade, - UpgradeSequence, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; + struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Order; - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "upgrade" => Ok(GeneratedField::Upgrade), - "upgradeSequence" | "upgrade_sequence" => Ok(GeneratedField::UpgradeSequence), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeInitResponse; - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeInitResponse") + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) } - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, { - let mut upgrade__ = None; - let mut upgrade_sequence__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Upgrade => { - if upgrade__.is_some() { - return Err(serde::de::Error::duplicate_field("upgrade")); - } - upgrade__ = map_.next_value()?; - } - GeneratedField::UpgradeSequence => { - if upgrade_sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("upgradeSequence")); - } - upgrade_sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } + match value { + "ORDER_NONE_UNSPECIFIED" => Ok(Order::NoneUnspecified), + "ORDER_UNORDERED" => Ok(Order::Unordered), + "ORDER_ORDERED" => Ok(Order::Ordered), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } - Ok(MsgChannelUpgradeInitResponse { - upgrade: upgrade__, - upgrade_sequence: upgrade_sequence__.unwrap_or_default(), - }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeInitResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for MsgChannelUpgradeOpen { +impl serde::Serialize for Packet { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -3891,59 +3430,76 @@ impl serde::Serialize for MsgChannelUpgradeOpen { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeOpen", len)?; if true { - struct_ser.serialize_field("portId", &self.port_id)?; + len += 1; } if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.Packet", len)?; + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; + } + if true { + struct_ser.serialize_field("sourcePort", &self.source_port)?; + } + if true { + struct_ser.serialize_field("sourceChannel", &self.source_channel)?; } if true { - let v = State::try_from(self.counterparty_channel_state) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.counterparty_channel_state)))?; - struct_ser.serialize_field("counterpartyChannelState", &v)?; + struct_ser.serialize_field("destinationPort", &self.destination_port)?; + } + if true { + struct_ser.serialize_field("destinationChannel", &self.destination_channel)?; } if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofChannel", pbjson::private::base64::encode(&self.proof_channel).as_str())?; + struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; + if let Some(v) = self.timeout_height.as_ref() { + struct_ser.serialize_field("timeoutHeight", v)?; } if true { - struct_ser.serialize_field("signer", &self.signer)?; + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("timeoutTimestamp", ::alloc::string::ToString::to_string(&self.timeout_timestamp).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeOpen { +impl<'de> serde::Deserialize<'de> for Packet { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "counterparty_channel_state", - "counterpartyChannelState", - "proof_channel", - "proofChannel", - "proof_height", - "proofHeight", - "signer", + "sequence", + "source_port", + "sourcePort", + "source_channel", + "sourceChannel", + "destination_port", + "destinationPort", + "destination_channel", + "destinationChannel", + "data", + "timeout_height", + "timeoutHeight", + "timeout_timestamp", + "timeoutTimestamp", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - PortId, - ChannelId, - CounterpartyChannelState, - ProofChannel, - ProofHeight, - Signer, + Sequence, + SourcePort, + SourceChannel, + DestinationPort, + DestinationChannel, + Data, + TimeoutHeight, + TimeoutTimestamp, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -3965,12 +3521,14 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeOpen { E: serde::de::Error, { match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "counterpartyChannelState" | "counterparty_channel_state" => Ok(GeneratedField::CounterpartyChannelState), - "proofChannel" | "proof_channel" => Ok(GeneratedField::ProofChannel), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), - "signer" => Ok(GeneratedField::Signer), + "sequence" => Ok(GeneratedField::Sequence), + "sourcePort" | "source_port" => Ok(GeneratedField::SourcePort), + "sourceChannel" | "source_channel" => Ok(GeneratedField::SourceChannel), + "destinationPort" | "destination_port" => Ok(GeneratedField::DestinationPort), + "destinationChannel" | "destination_channel" => Ok(GeneratedField::DestinationChannel), + "data" => Ok(GeneratedField::Data), + "timeoutHeight" | "timeout_height" => Ok(GeneratedField::TimeoutHeight), + "timeoutTimestamp" | "timeout_timestamp" => Ok(GeneratedField::TimeoutTimestamp), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3980,3066 +3538,98 @@ impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeOpen { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeOpen; + type Value = Packet; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeOpen") + formatter.write_str("struct ibc.core.channel.v1.Packet") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut counterparty_channel_state__ = None; - let mut proof_channel__ = None; - let mut proof_height__ = None; - let mut signer__ = None; + let mut sequence__ = None; + let mut source_port__ = None; + let mut source_channel__ = None; + let mut destination_port__ = None; + let mut destination_channel__ = None; + let mut data__ = None; + let mut timeout_height__ = None; + let mut timeout_timestamp__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); + GeneratedField::Sequence => { + if sequence__.is_some() { + return Err(serde::de::Error::duplicate_field("sequence")); } - port_id__ = Some(map_.next_value()?); + sequence__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); + GeneratedField::SourcePort => { + if source_port__.is_some() { + return Err(serde::de::Error::duplicate_field("sourcePort")); } - channel_id__ = Some(map_.next_value()?); + source_port__ = Some(map_.next_value()?); } - GeneratedField::CounterpartyChannelState => { - if counterparty_channel_state__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyChannelState")); + GeneratedField::SourceChannel => { + if source_channel__.is_some() { + return Err(serde::de::Error::duplicate_field("sourceChannel")); } - counterparty_channel_state__ = Some(map_.next_value::()? as i32); + source_channel__ = Some(map_.next_value()?); } - GeneratedField::ProofChannel => { - if proof_channel__.is_some() { - return Err(serde::de::Error::duplicate_field("proofChannel")); + GeneratedField::DestinationPort => { + if destination_port__.is_some() { + return Err(serde::de::Error::duplicate_field("destinationPort")); } - proof_channel__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; + destination_port__ = Some(map_.next_value()?); } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); + GeneratedField::DestinationChannel => { + if destination_channel__.is_some() { + return Err(serde::de::Error::duplicate_field("destinationChannel")); } - proof_height__ = map_.next_value()?; + destination_channel__ = Some(map_.next_value()?); } - GeneratedField::Signer => { - if signer__.is_some() { - return Err(serde::de::Error::duplicate_field("signer")); + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - signer__ = Some(map_.next_value()?); - } - } - } - Ok(MsgChannelUpgradeOpen { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - counterparty_channel_state: counterparty_channel_state__.unwrap_or_default(), - proof_channel: proof_channel__.unwrap_or_default(), - proof_height: proof_height__, - signer: signer__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeOpen", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgChannelUpgradeOpenResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeOpenResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeOpenResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeOpenResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeOpenResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgChannelUpgradeOpenResponse { - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeOpenResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgChannelUpgradeTimeout { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeTimeout", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if let Some(v) = self.counterparty_channel.as_ref() { - struct_ser.serialize_field("counterpartyChannel", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofChannel", pbjson::private::base64::encode(&self.proof_channel).as_str())?; - } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; - } - if true { - struct_ser.serialize_field("signer", &self.signer)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeTimeout { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "counterparty_channel", - "counterpartyChannel", - "proof_channel", - "proofChannel", - "proof_height", - "proofHeight", - "signer", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PortId, - ChannelId, - CounterpartyChannel, - ProofChannel, - ProofHeight, - Signer, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "counterpartyChannel" | "counterparty_channel" => Ok(GeneratedField::CounterpartyChannel), - "proofChannel" | "proof_channel" => Ok(GeneratedField::ProofChannel), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), - "signer" => Ok(GeneratedField::Signer), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeTimeout; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeTimeout") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut counterparty_channel__ = None; - let mut proof_channel__ = None; - let mut proof_height__ = None; - let mut signer__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::CounterpartyChannel => { - if counterparty_channel__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyChannel")); - } - counterparty_channel__ = map_.next_value()?; - } - GeneratedField::ProofChannel => { - if proof_channel__.is_some() { - return Err(serde::de::Error::duplicate_field("proofChannel")); - } - proof_channel__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); - } - proof_height__ = map_.next_value()?; - } - GeneratedField::Signer => { - if signer__.is_some() { - return Err(serde::de::Error::duplicate_field("signer")); - } - signer__ = Some(map_.next_value()?); - } - } - } - Ok(MsgChannelUpgradeTimeout { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - counterparty_channel: counterparty_channel__, - proof_channel: proof_channel__.unwrap_or_default(), - proof_height: proof_height__, - signer: signer__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeTimeout", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgChannelUpgradeTimeoutResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeTimeoutResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeTimeoutResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgChannelUpgradeTimeoutResponse { - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgChannelUpgradeTry { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeTry", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if true { - struct_ser.serialize_field("proposedUpgradeConnectionHops", &self.proposed_upgrade_connection_hops)?; - } - if let Some(v) = self.counterparty_upgrade_fields.as_ref() { - struct_ser.serialize_field("counterpartyUpgradeFields", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("counterpartyUpgradeSequence", ::alloc::string::ToString::to_string(&self.counterparty_upgrade_sequence).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofChannel", pbjson::private::base64::encode(&self.proof_channel).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofUpgrade", pbjson::private::base64::encode(&self.proof_upgrade).as_str())?; - } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; - } - if true { - struct_ser.serialize_field("signer", &self.signer)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeTry { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "proposed_upgrade_connection_hops", - "proposedUpgradeConnectionHops", - "counterparty_upgrade_fields", - "counterpartyUpgradeFields", - "counterparty_upgrade_sequence", - "counterpartyUpgradeSequence", - "proof_channel", - "proofChannel", - "proof_upgrade", - "proofUpgrade", - "proof_height", - "proofHeight", - "signer", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PortId, - ChannelId, - ProposedUpgradeConnectionHops, - CounterpartyUpgradeFields, - CounterpartyUpgradeSequence, - ProofChannel, - ProofUpgrade, - ProofHeight, - Signer, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "proposedUpgradeConnectionHops" | "proposed_upgrade_connection_hops" => Ok(GeneratedField::ProposedUpgradeConnectionHops), - "counterpartyUpgradeFields" | "counterparty_upgrade_fields" => Ok(GeneratedField::CounterpartyUpgradeFields), - "counterpartyUpgradeSequence" | "counterparty_upgrade_sequence" => Ok(GeneratedField::CounterpartyUpgradeSequence), - "proofChannel" | "proof_channel" => Ok(GeneratedField::ProofChannel), - "proofUpgrade" | "proof_upgrade" => Ok(GeneratedField::ProofUpgrade), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), - "signer" => Ok(GeneratedField::Signer), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeTry; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeTry") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut proposed_upgrade_connection_hops__ = None; - let mut counterparty_upgrade_fields__ = None; - let mut counterparty_upgrade_sequence__ = None; - let mut proof_channel__ = None; - let mut proof_upgrade__ = None; - let mut proof_height__ = None; - let mut signer__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::ProposedUpgradeConnectionHops => { - if proposed_upgrade_connection_hops__.is_some() { - return Err(serde::de::Error::duplicate_field("proposedUpgradeConnectionHops")); - } - proposed_upgrade_connection_hops__ = Some(map_.next_value()?); - } - GeneratedField::CounterpartyUpgradeFields => { - if counterparty_upgrade_fields__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyUpgradeFields")); - } - counterparty_upgrade_fields__ = map_.next_value()?; - } - GeneratedField::CounterpartyUpgradeSequence => { - if counterparty_upgrade_sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyUpgradeSequence")); - } - counterparty_upgrade_sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ProofChannel => { - if proof_channel__.is_some() { - return Err(serde::de::Error::duplicate_field("proofChannel")); - } - proof_channel__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::ProofUpgrade => { - if proof_upgrade__.is_some() { - return Err(serde::de::Error::duplicate_field("proofUpgrade")); - } - proof_upgrade__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); - } - proof_height__ = map_.next_value()?; - } - GeneratedField::Signer => { - if signer__.is_some() { - return Err(serde::de::Error::duplicate_field("signer")); - } - signer__ = Some(map_.next_value()?); - } - } - } - Ok(MsgChannelUpgradeTry { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - proposed_upgrade_connection_hops: proposed_upgrade_connection_hops__.unwrap_or_default(), - counterparty_upgrade_fields: counterparty_upgrade_fields__, - counterparty_upgrade_sequence: counterparty_upgrade_sequence__.unwrap_or_default(), - proof_channel: proof_channel__.unwrap_or_default(), - proof_upgrade: proof_upgrade__.unwrap_or_default(), - proof_height: proof_height__, - signer: signer__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeTry", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgChannelUpgradeTryResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgChannelUpgradeTryResponse", len)?; - if let Some(v) = self.upgrade.as_ref() { - struct_ser.serialize_field("upgrade", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("upgradeSequence", ::alloc::string::ToString::to_string(&self.upgrade_sequence).as_str())?; - } - if true { - let v = ResponseResultType::try_from(self.result) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.result)))?; - struct_ser.serialize_field("result", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgChannelUpgradeTryResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "upgrade", - "upgrade_sequence", - "upgradeSequence", - "result", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Upgrade, - UpgradeSequence, - Result, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "upgrade" => Ok(GeneratedField::Upgrade), - "upgradeSequence" | "upgrade_sequence" => Ok(GeneratedField::UpgradeSequence), - "result" => Ok(GeneratedField::Result), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgChannelUpgradeTryResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgChannelUpgradeTryResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut upgrade__ = None; - let mut upgrade_sequence__ = None; - let mut result__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Upgrade => { - if upgrade__.is_some() { - return Err(serde::de::Error::duplicate_field("upgrade")); - } - upgrade__ = map_.next_value()?; - } - GeneratedField::UpgradeSequence => { - if upgrade_sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("upgradeSequence")); - } - upgrade_sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Result => { - if result__.is_some() { - return Err(serde::de::Error::duplicate_field("result")); - } - result__ = Some(map_.next_value::()? as i32); - } - } - } - Ok(MsgChannelUpgradeTryResponse { - upgrade: upgrade__, - upgrade_sequence: upgrade_sequence__.unwrap_or_default(), - result: result__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgChannelUpgradeTryResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgPruneAcknowledgements { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgPruneAcknowledgements", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("limit", ::alloc::string::ToString::to_string(&self.limit).as_str())?; - } - if true { - struct_ser.serialize_field("signer", &self.signer)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgPruneAcknowledgements { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "limit", - "signer", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PortId, - ChannelId, - Limit, - Signer, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "limit" => Ok(GeneratedField::Limit), - "signer" => Ok(GeneratedField::Signer), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgPruneAcknowledgements; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgPruneAcknowledgements") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut limit__ = None; - let mut signer__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::Limit => { - if limit__.is_some() { - return Err(serde::de::Error::duplicate_field("limit")); - } - limit__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Signer => { - if signer__.is_some() { - return Err(serde::de::Error::duplicate_field("signer")); - } - signer__ = Some(map_.next_value()?); - } - } - } - Ok(MsgPruneAcknowledgements { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - limit: limit__.unwrap_or_default(), - signer: signer__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgPruneAcknowledgements", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgPruneAcknowledgementsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgPruneAcknowledgementsResponse", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("totalPrunedSequences", ::alloc::string::ToString::to_string(&self.total_pruned_sequences).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("totalRemainingSequences", ::alloc::string::ToString::to_string(&self.total_remaining_sequences).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgPruneAcknowledgementsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "total_pruned_sequences", - "totalPrunedSequences", - "total_remaining_sequences", - "totalRemainingSequences", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - TotalPrunedSequences, - TotalRemainingSequences, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "totalPrunedSequences" | "total_pruned_sequences" => Ok(GeneratedField::TotalPrunedSequences), - "totalRemainingSequences" | "total_remaining_sequences" => Ok(GeneratedField::TotalRemainingSequences), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgPruneAcknowledgementsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgPruneAcknowledgementsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut total_pruned_sequences__ = None; - let mut total_remaining_sequences__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::TotalPrunedSequences => { - if total_pruned_sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("totalPrunedSequences")); - } - total_pruned_sequences__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::TotalRemainingSequences => { - if total_remaining_sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("totalRemainingSequences")); - } - total_remaining_sequences__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(MsgPruneAcknowledgementsResponse { - total_pruned_sequences: total_pruned_sequences__.unwrap_or_default(), - total_remaining_sequences: total_remaining_sequences__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgPruneAcknowledgementsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgRecvPacket { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgRecvPacket", len)?; - if let Some(v) = self.packet.as_ref() { - struct_ser.serialize_field("packet", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofCommitment", pbjson::private::base64::encode(&self.proof_commitment).as_str())?; - } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; - } - if true { - struct_ser.serialize_field("signer", &self.signer)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgRecvPacket { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "packet", - "proof_commitment", - "proofCommitment", - "proof_height", - "proofHeight", - "signer", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Packet, - ProofCommitment, - ProofHeight, - Signer, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "packet" => Ok(GeneratedField::Packet), - "proofCommitment" | "proof_commitment" => Ok(GeneratedField::ProofCommitment), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), - "signer" => Ok(GeneratedField::Signer), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgRecvPacket; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgRecvPacket") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut packet__ = None; - let mut proof_commitment__ = None; - let mut proof_height__ = None; - let mut signer__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Packet => { - if packet__.is_some() { - return Err(serde::de::Error::duplicate_field("packet")); - } - packet__ = map_.next_value()?; - } - GeneratedField::ProofCommitment => { - if proof_commitment__.is_some() { - return Err(serde::de::Error::duplicate_field("proofCommitment")); - } - proof_commitment__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); - } - proof_height__ = map_.next_value()?; - } - GeneratedField::Signer => { - if signer__.is_some() { - return Err(serde::de::Error::duplicate_field("signer")); - } - signer__ = Some(map_.next_value()?); - } - } - } - Ok(MsgRecvPacket { - packet: packet__, - proof_commitment: proof_commitment__.unwrap_or_default(), - proof_height: proof_height__, - signer: signer__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgRecvPacket", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgRecvPacketResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgRecvPacketResponse", len)?; - if true { - let v = ResponseResultType::try_from(self.result) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.result)))?; - struct_ser.serialize_field("result", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgRecvPacketResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "result", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Result, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "result" => Ok(GeneratedField::Result), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgRecvPacketResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgRecvPacketResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut result__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Result => { - if result__.is_some() { - return Err(serde::de::Error::duplicate_field("result")); - } - result__ = Some(map_.next_value::()? as i32); - } - } - } - Ok(MsgRecvPacketResponse { - result: result__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgRecvPacketResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgTimeout { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgTimeout", len)?; - if let Some(v) = self.packet.as_ref() { - struct_ser.serialize_field("packet", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofUnreceived", pbjson::private::base64::encode(&self.proof_unreceived).as_str())?; - } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("nextSequenceRecv", ::alloc::string::ToString::to_string(&self.next_sequence_recv).as_str())?; - } - if true { - struct_ser.serialize_field("signer", &self.signer)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgTimeout { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "packet", - "proof_unreceived", - "proofUnreceived", - "proof_height", - "proofHeight", - "next_sequence_recv", - "nextSequenceRecv", - "signer", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Packet, - ProofUnreceived, - ProofHeight, - NextSequenceRecv, - Signer, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "packet" => Ok(GeneratedField::Packet), - "proofUnreceived" | "proof_unreceived" => Ok(GeneratedField::ProofUnreceived), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), - "nextSequenceRecv" | "next_sequence_recv" => Ok(GeneratedField::NextSequenceRecv), - "signer" => Ok(GeneratedField::Signer), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgTimeout; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgTimeout") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut packet__ = None; - let mut proof_unreceived__ = None; - let mut proof_height__ = None; - let mut next_sequence_recv__ = None; - let mut signer__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Packet => { - if packet__.is_some() { - return Err(serde::de::Error::duplicate_field("packet")); - } - packet__ = map_.next_value()?; - } - GeneratedField::ProofUnreceived => { - if proof_unreceived__.is_some() { - return Err(serde::de::Error::duplicate_field("proofUnreceived")); - } - proof_unreceived__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); - } - proof_height__ = map_.next_value()?; - } - GeneratedField::NextSequenceRecv => { - if next_sequence_recv__.is_some() { - return Err(serde::de::Error::duplicate_field("nextSequenceRecv")); - } - next_sequence_recv__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Signer => { - if signer__.is_some() { - return Err(serde::de::Error::duplicate_field("signer")); - } - signer__ = Some(map_.next_value()?); - } - } - } - Ok(MsgTimeout { - packet: packet__, - proof_unreceived: proof_unreceived__.unwrap_or_default(), - proof_height: proof_height__, - next_sequence_recv: next_sequence_recv__.unwrap_or_default(), - signer: signer__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgTimeout", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgTimeoutOnClose { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgTimeoutOnClose", len)?; - if let Some(v) = self.packet.as_ref() { - struct_ser.serialize_field("packet", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofUnreceived", pbjson::private::base64::encode(&self.proof_unreceived).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proofClose", pbjson::private::base64::encode(&self.proof_close).as_str())?; - } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("nextSequenceRecv", ::alloc::string::ToString::to_string(&self.next_sequence_recv).as_str())?; - } - if true { - struct_ser.serialize_field("signer", &self.signer)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("counterpartyUpgradeSequence", ::alloc::string::ToString::to_string(&self.counterparty_upgrade_sequence).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgTimeoutOnClose { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "packet", - "proof_unreceived", - "proofUnreceived", - "proof_close", - "proofClose", - "proof_height", - "proofHeight", - "next_sequence_recv", - "nextSequenceRecv", - "signer", - "counterparty_upgrade_sequence", - "counterpartyUpgradeSequence", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Packet, - ProofUnreceived, - ProofClose, - ProofHeight, - NextSequenceRecv, - Signer, - CounterpartyUpgradeSequence, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "packet" => Ok(GeneratedField::Packet), - "proofUnreceived" | "proof_unreceived" => Ok(GeneratedField::ProofUnreceived), - "proofClose" | "proof_close" => Ok(GeneratedField::ProofClose), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), - "nextSequenceRecv" | "next_sequence_recv" => Ok(GeneratedField::NextSequenceRecv), - "signer" => Ok(GeneratedField::Signer), - "counterpartyUpgradeSequence" | "counterparty_upgrade_sequence" => Ok(GeneratedField::CounterpartyUpgradeSequence), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgTimeoutOnClose; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgTimeoutOnClose") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut packet__ = None; - let mut proof_unreceived__ = None; - let mut proof_close__ = None; - let mut proof_height__ = None; - let mut next_sequence_recv__ = None; - let mut signer__ = None; - let mut counterparty_upgrade_sequence__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Packet => { - if packet__.is_some() { - return Err(serde::de::Error::duplicate_field("packet")); - } - packet__ = map_.next_value()?; - } - GeneratedField::ProofUnreceived => { - if proof_unreceived__.is_some() { - return Err(serde::de::Error::duplicate_field("proofUnreceived")); - } - proof_unreceived__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::ProofClose => { - if proof_close__.is_some() { - return Err(serde::de::Error::duplicate_field("proofClose")); - } - proof_close__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); - } - proof_height__ = map_.next_value()?; - } - GeneratedField::NextSequenceRecv => { - if next_sequence_recv__.is_some() { - return Err(serde::de::Error::duplicate_field("nextSequenceRecv")); - } - next_sequence_recv__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Signer => { - if signer__.is_some() { - return Err(serde::de::Error::duplicate_field("signer")); - } - signer__ = Some(map_.next_value()?); - } - GeneratedField::CounterpartyUpgradeSequence => { - if counterparty_upgrade_sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("counterpartyUpgradeSequence")); - } - counterparty_upgrade_sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(MsgTimeoutOnClose { - packet: packet__, - proof_unreceived: proof_unreceived__.unwrap_or_default(), - proof_close: proof_close__.unwrap_or_default(), - proof_height: proof_height__, - next_sequence_recv: next_sequence_recv__.unwrap_or_default(), - signer: signer__.unwrap_or_default(), - counterparty_upgrade_sequence: counterparty_upgrade_sequence__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgTimeoutOnClose", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgTimeoutOnCloseResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgTimeoutOnCloseResponse", len)?; - if true { - let v = ResponseResultType::try_from(self.result) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.result)))?; - struct_ser.serialize_field("result", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgTimeoutOnCloseResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "result", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Result, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "result" => Ok(GeneratedField::Result), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgTimeoutOnCloseResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgTimeoutOnCloseResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut result__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Result => { - if result__.is_some() { - return Err(serde::de::Error::duplicate_field("result")); - } - result__ = Some(map_.next_value::()? as i32); - } - } - } - Ok(MsgTimeoutOnCloseResponse { - result: result__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgTimeoutOnCloseResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgTimeoutResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgTimeoutResponse", len)?; - if true { - let v = ResponseResultType::try_from(self.result) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.result)))?; - struct_ser.serialize_field("result", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgTimeoutResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "result", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Result, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "result" => Ok(GeneratedField::Result), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgTimeoutResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgTimeoutResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut result__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Result => { - if result__.is_some() { - return Err(serde::de::Error::duplicate_field("result")); - } - result__ = Some(map_.next_value::()? as i32); - } - } - } - Ok(MsgTimeoutResponse { - result: result__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgTimeoutResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParams { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgUpdateParams", len)?; - if true { - struct_ser.serialize_field("authority", &self.authority)?; - } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParams { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "params", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - Params, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "params" => Ok(GeneratedField::Params), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParams; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgUpdateParams") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut params__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); - } - authority__ = Some(map_.next_value()?); - } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - } - } - Ok(MsgUpdateParams { - authority: authority__.unwrap_or_default(), - params: params__, - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgUpdateParams", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("ibc.core.channel.v1.MsgUpdateParamsResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateParamsResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParamsResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.MsgUpdateParamsResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgUpdateParamsResponse { - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.MsgUpdateParamsResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Order { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::NoneUnspecified => "ORDER_NONE_UNSPECIFIED", - Self::Unordered => "ORDER_UNORDERED", - Self::Ordered => "ORDER_ORDERED", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for Order { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "ORDER_NONE_UNSPECIFIED", - "ORDER_UNORDERED", - "ORDER_ORDERED", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Order; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> core::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "ORDER_NONE_UNSPECIFIED" => Ok(Order::NoneUnspecified), - "ORDER_UNORDERED" => Ok(Order::Unordered), - "ORDER_ORDERED" => Ok(Order::Ordered), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for Packet { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.Packet", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; - } - if true { - struct_ser.serialize_field("sourcePort", &self.source_port)?; - } - if true { - struct_ser.serialize_field("sourceChannel", &self.source_channel)?; - } - if true { - struct_ser.serialize_field("destinationPort", &self.destination_port)?; - } - if true { - struct_ser.serialize_field("destinationChannel", &self.destination_channel)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; - } - if let Some(v) = self.timeout_height.as_ref() { - struct_ser.serialize_field("timeoutHeight", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("timeoutTimestamp", ::alloc::string::ToString::to_string(&self.timeout_timestamp).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Packet { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sequence", - "source_port", - "sourcePort", - "source_channel", - "sourceChannel", - "destination_port", - "destinationPort", - "destination_channel", - "destinationChannel", - "data", - "timeout_height", - "timeoutHeight", - "timeout_timestamp", - "timeoutTimestamp", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sequence, - SourcePort, - SourceChannel, - DestinationPort, - DestinationChannel, - Data, - TimeoutHeight, - TimeoutTimestamp, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "sequence" => Ok(GeneratedField::Sequence), - "sourcePort" | "source_port" => Ok(GeneratedField::SourcePort), - "sourceChannel" | "source_channel" => Ok(GeneratedField::SourceChannel), - "destinationPort" | "destination_port" => Ok(GeneratedField::DestinationPort), - "destinationChannel" | "destination_channel" => Ok(GeneratedField::DestinationChannel), - "data" => Ok(GeneratedField::Data), - "timeoutHeight" | "timeout_height" => Ok(GeneratedField::TimeoutHeight), - "timeoutTimestamp" | "timeout_timestamp" => Ok(GeneratedField::TimeoutTimestamp), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Packet; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.Packet") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sequence__ = None; - let mut source_port__ = None; - let mut source_channel__ = None; - let mut destination_port__ = None; - let mut destination_channel__ = None; - let mut data__ = None; - let mut timeout_height__ = None; - let mut timeout_timestamp__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Sequence => { - if sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("sequence")); - } - sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::SourcePort => { - if source_port__.is_some() { - return Err(serde::de::Error::duplicate_field("sourcePort")); - } - source_port__ = Some(map_.next_value()?); - } - GeneratedField::SourceChannel => { - if source_channel__.is_some() { - return Err(serde::de::Error::duplicate_field("sourceChannel")); - } - source_channel__ = Some(map_.next_value()?); - } - GeneratedField::DestinationPort => { - if destination_port__.is_some() { - return Err(serde::de::Error::duplicate_field("destinationPort")); - } - destination_port__ = Some(map_.next_value()?); - } - GeneratedField::DestinationChannel => { - if destination_channel__.is_some() { - return Err(serde::de::Error::duplicate_field("destinationChannel")); - } - destination_channel__ = Some(map_.next_value()?); - } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::TimeoutHeight => { - if timeout_height__.is_some() { - return Err(serde::de::Error::duplicate_field("timeoutHeight")); - } - timeout_height__ = map_.next_value()?; - } - GeneratedField::TimeoutTimestamp => { - if timeout_timestamp__.is_some() { - return Err(serde::de::Error::duplicate_field("timeoutTimestamp")); - } - timeout_timestamp__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(Packet { - sequence: sequence__.unwrap_or_default(), - source_port: source_port__.unwrap_or_default(), - source_channel: source_channel__.unwrap_or_default(), - destination_port: destination_port__.unwrap_or_default(), - destination_channel: destination_channel__.unwrap_or_default(), - data: data__.unwrap_or_default(), - timeout_height: timeout_height__, - timeout_timestamp: timeout_timestamp__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.Packet", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PacketId { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.PacketId", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PacketId { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "sequence", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PortId, - ChannelId, - Sequence, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "sequence" => Ok(GeneratedField::Sequence), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PacketId; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.PacketId") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut sequence__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::Sequence => { - if sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("sequence")); - } - sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(PacketId { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - sequence: sequence__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.PacketId", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PacketSequence { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.PacketSequence", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PacketSequence { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "sequence", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PortId, - ChannelId, - Sequence, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "sequence" => Ok(GeneratedField::Sequence), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PacketSequence; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.PacketSequence") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut sequence__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::Sequence => { - if sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("sequence")); - } - sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(PacketSequence { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - sequence: sequence__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.PacketSequence", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PacketState { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.PacketState", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PacketState { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - "sequence", - "data", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PortId, - ChannelId, - Sequence, - Data, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "sequence" => Ok(GeneratedField::Sequence), - "data" => Ok(GeneratedField::Data), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PacketState; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.PacketState") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut port_id__ = None; - let mut channel_id__ = None; - let mut sequence__ = None; - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - GeneratedField::Sequence => { - if sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("sequence")); - } - sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(PacketState { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - sequence: sequence__.unwrap_or_default(), - data: data__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.PacketState", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Params { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.Params", len)?; - if let Some(v) = self.upgrade_timeout.as_ref() { - struct_ser.serialize_field("upgradeTimeout", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Params { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "upgrade_timeout", - "upgradeTimeout", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - UpgradeTimeout, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "upgradeTimeout" | "upgrade_timeout" => Ok(GeneratedField::UpgradeTimeout), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Params; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.Params") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut upgrade_timeout__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::UpgradeTimeout => { - if upgrade_timeout__.is_some() { - return Err(serde::de::Error::duplicate_field("upgradeTimeout")); - } - upgrade_timeout__ = map_.next_value()?; - } - } - } - Ok(Params { - upgrade_timeout: upgrade_timeout__, - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.Params", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryChannelClientStateRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelClientStateRequest", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryChannelClientStateRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PortId, - ChannelId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelClientStateRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelClientStateRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut port_id__ = None; - let mut channel_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); - } - channel_id__ = Some(map_.next_value()?); - } - } - } - Ok(QueryChannelClientStateRequest { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelClientStateRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryChannelClientStateResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelClientStateResponse", len)?; - if let Some(v) = self.identified_client_state.as_ref() { - struct_ser.serialize_field("identifiedClientState", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; - } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryChannelClientStateResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "identified_client_state", - "identifiedClientState", - "proof", - "proof_height", - "proofHeight", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - IdentifiedClientState, - Proof, - ProofHeight, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "identifiedClientState" | "identified_client_state" => Ok(GeneratedField::IdentifiedClientState), - "proof" => Ok(GeneratedField::Proof), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelClientStateResponse; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelClientStateResponse") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut identified_client_state__ = None; - let mut proof__ = None; - let mut proof_height__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::IdentifiedClientState => { - if identified_client_state__.is_some() { - return Err(serde::de::Error::duplicate_field("identifiedClientState")); - } - identified_client_state__ = map_.next_value()?; - } - GeneratedField::Proof => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("proof")); - } - proof__ = + data__ = Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) ; } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); + GeneratedField::TimeoutHeight => { + if timeout_height__.is_some() { + return Err(serde::de::Error::duplicate_field("timeoutHeight")); } - proof_height__ = map_.next_value()?; + timeout_height__ = map_.next_value()?; + } + GeneratedField::TimeoutTimestamp => { + if timeout_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("timeoutTimestamp")); + } + timeout_timestamp__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } } } - Ok(QueryChannelClientStateResponse { - identified_client_state: identified_client_state__, - proof: proof__.unwrap_or_default(), - proof_height: proof_height__, + Ok(Packet { + sequence: sequence__.unwrap_or_default(), + source_port: source_port__.unwrap_or_default(), + source_channel: source_channel__.unwrap_or_default(), + destination_port: destination_port__.unwrap_or_default(), + destination_channel: destination_channel__.unwrap_or_default(), + data: data__.unwrap_or_default(), + timeout_height: timeout_height__, + timeout_timestamp: timeout_timestamp__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelClientStateResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.Packet", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryChannelConsensusStateRequest { +impl serde::Serialize for PacketId { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -7056,10 +3646,7 @@ impl serde::Serialize for QueryChannelConsensusStateRequest { if true { len += 1; } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelConsensusStateRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.PacketId", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } @@ -7068,16 +3655,12 @@ impl serde::Serialize for QueryChannelConsensusStateRequest { } if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("revisionNumber", ::alloc::string::ToString::to_string(&self.revision_number).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("revisionHeight", ::alloc::string::ToString::to_string(&self.revision_height).as_str())?; + struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateRequest { +impl<'de> serde::Deserialize<'de> for PacketId { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -7088,18 +3671,14 @@ impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateRequest { "portId", "channel_id", "channelId", - "revision_number", - "revisionNumber", - "revision_height", - "revisionHeight", + "sequence", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { PortId, ChannelId, - RevisionNumber, - RevisionHeight, + Sequence, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -7123,8 +3702,7 @@ impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateRequest { match value { "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "revisionNumber" | "revision_number" => Ok(GeneratedField::RevisionNumber), - "revisionHeight" | "revision_height" => Ok(GeneratedField::RevisionHeight), + "sequence" => Ok(GeneratedField::Sequence), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7134,20 +3712,19 @@ impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelConsensusStateRequest; + type Value = PacketId; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelConsensusStateRequest") + formatter.write_str("struct ibc.core.channel.v1.PacketId") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { let mut port_id__ = None; let mut channel_id__ = None; - let mut revision_number__ = None; - let mut revision_height__ = None; + let mut sequence__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -7162,36 +3739,27 @@ impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateRequest { } channel_id__ = Some(map_.next_value()?); } - GeneratedField::RevisionNumber => { - if revision_number__.is_some() { - return Err(serde::de::Error::duplicate_field("revisionNumber")); - } - revision_number__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::RevisionHeight => { - if revision_height__.is_some() { - return Err(serde::de::Error::duplicate_field("revisionHeight")); + GeneratedField::Sequence => { + if sequence__.is_some() { + return Err(serde::de::Error::duplicate_field("sequence")); } - revision_height__ = + sequence__ = Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } } } - Ok(QueryChannelConsensusStateRequest { + Ok(PacketId { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), - revision_number: revision_number__.unwrap_or_default(), - revision_height: revision_height__.unwrap_or_default(), + sequence: sequence__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelConsensusStateRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.PacketId", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryChannelConsensusStateResponse { +impl serde::Serialize for PacketSequence { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -7208,48 +3776,39 @@ impl serde::Serialize for QueryChannelConsensusStateResponse { if true { len += 1; } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.PacketSequence", len)?; if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelConsensusStateResponse", len)?; - if let Some(v) = self.consensus_state.as_ref() { - struct_ser.serialize_field("consensusState", v)?; + struct_ser.serialize_field("portId", &self.port_id)?; } if true { - struct_ser.serialize_field("clientId", &self.client_id)?; + struct_ser.serialize_field("channelId", &self.channel_id)?; } if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; - } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; + struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateResponse { +impl<'de> serde::Deserialize<'de> for PacketSequence { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "consensus_state", - "consensusState", - "client_id", - "clientId", - "proof", - "proof_height", - "proofHeight", + "port_id", + "portId", + "channel_id", + "channelId", + "sequence", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - ConsensusState, - ClientId, - Proof, - ProofHeight, + PortId, + ChannelId, + Sequence, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -7271,10 +3830,9 @@ impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateResponse { E: serde::de::Error, { match value { - "consensusState" | "consensus_state" => Ok(GeneratedField::ConsensusState), - "clientId" | "client_id" => Ok(GeneratedField::ClientId), - "proof" => Ok(GeneratedField::Proof), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), + "portId" | "port_id" => Ok(GeneratedField::PortId), + "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), + "sequence" => Ok(GeneratedField::Sequence), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7284,133 +3842,54 @@ impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelConsensusStateResponse; + type Value = PacketSequence; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelConsensusStateResponse") + formatter.write_str("struct ibc.core.channel.v1.PacketSequence") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut consensus_state__ = None; - let mut client_id__ = None; - let mut proof__ = None; - let mut proof_height__ = None; + let mut port_id__ = None; + let mut channel_id__ = None; + let mut sequence__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::ConsensusState => { - if consensus_state__.is_some() { - return Err(serde::de::Error::duplicate_field("consensusState")); + GeneratedField::PortId => { + if port_id__.is_some() { + return Err(serde::de::Error::duplicate_field("portId")); } - consensus_state__ = map_.next_value()?; + port_id__ = Some(map_.next_value()?); } - GeneratedField::ClientId => { - if client_id__.is_some() { - return Err(serde::de::Error::duplicate_field("clientId")); + GeneratedField::ChannelId => { + if channel_id__.is_some() { + return Err(serde::de::Error::duplicate_field("channelId")); } - client_id__ = Some(map_.next_value()?); + channel_id__ = Some(map_.next_value()?); } - GeneratedField::Proof => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("proof")); + GeneratedField::Sequence => { + if sequence__.is_some() { + return Err(serde::de::Error::duplicate_field("sequence")); } - proof__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + sequence__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); - } - proof_height__ = map_.next_value()?; - } - } - } - Ok(QueryChannelConsensusStateResponse { - consensus_state: consensus_state__, - client_id: client_id__.unwrap_or_default(), - proof: proof__.unwrap_or_default(), - proof_height: proof_height__, - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelConsensusStateResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for QueryChannelParamsRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelParamsRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for QueryChannelParamsRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) } } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelParamsRequest; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelParamsRequest") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(QueryChannelParamsRequest { + Ok(PacketSequence { + port_id: port_id__.unwrap_or_default(), + channel_id: channel_id__.unwrap_or_default(), + sequence: sequence__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelParamsRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.PacketSequence", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryChannelParamsResponse { +impl serde::Serialize for PacketState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -7421,26 +3900,54 @@ impl serde::Serialize for QueryChannelParamsResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelParamsResponse", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.PacketState", len)?; + if true { + struct_ser.serialize_field("portId", &self.port_id)?; + } + if true { + struct_ser.serialize_field("channelId", &self.channel_id)?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryChannelParamsResponse { +impl<'de> serde::Deserialize<'de> for PacketState { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "params", + "port_id", + "portId", + "channel_id", + "channelId", + "sequence", + "data", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Params, + PortId, + ChannelId, + Sequence, + Data, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -7462,7 +3969,10 @@ impl<'de> serde::Deserialize<'de> for QueryChannelParamsResponse { E: serde::de::Error, { match value { - "params" => Ok(GeneratedField::Params), + "portId" | "port_id" => Ok(GeneratedField::PortId), + "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), + "sequence" => Ok(GeneratedField::Sequence), + "data" => Ok(GeneratedField::Data), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7472,36 +3982,64 @@ impl<'de> serde::Deserialize<'de> for QueryChannelParamsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelParamsResponse; + type Value = PacketState; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelParamsResponse") + formatter.write_str("struct ibc.core.channel.v1.PacketState") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut params__ = None; + let mut port_id__ = None; + let mut channel_id__ = None; + let mut sequence__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); + GeneratedField::PortId => { + if port_id__.is_some() { + return Err(serde::de::Error::duplicate_field("portId")); + } + port_id__ = Some(map_.next_value()?); + } + GeneratedField::ChannelId => { + if channel_id__.is_some() { + return Err(serde::de::Error::duplicate_field("channelId")); + } + channel_id__ = Some(map_.next_value()?); + } + GeneratedField::Sequence => { + if sequence__.is_some() { + return Err(serde::de::Error::duplicate_field("sequence")); + } + sequence__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - params__ = map_.next_value()?; + data__ = + Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; } } } - Ok(QueryChannelParamsResponse { - params: params__, + Ok(PacketState { + port_id: port_id__.unwrap_or_default(), + channel_id: channel_id__.unwrap_or_default(), + sequence: sequence__.unwrap_or_default(), + data: data__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelParamsResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.PacketState", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryChannelRequest { +impl serde::Serialize for QueryChannelClientStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -7515,7 +4053,7 @@ impl serde::Serialize for QueryChannelRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelClientStateRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } @@ -7525,7 +4063,7 @@ impl serde::Serialize for QueryChannelRequest { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryChannelRequest { +impl<'de> serde::Deserialize<'de> for QueryChannelClientStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -7574,13 +4112,13 @@ impl<'de> serde::Deserialize<'de> for QueryChannelRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelRequest; + type Value = QueryChannelClientStateRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryChannelClientStateRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { @@ -7602,16 +4140,16 @@ impl<'de> serde::Deserialize<'de> for QueryChannelRequest { } } } - Ok(QueryChannelRequest { + Ok(QueryChannelClientStateRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelClientStateRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryChannelResponse { +impl serde::Serialize for QueryChannelClientStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -7628,9 +4166,9 @@ impl serde::Serialize for QueryChannelResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelResponse", len)?; - if let Some(v) = self.channel.as_ref() { - struct_ser.serialize_field("channel", v)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelClientStateResponse", len)?; + if let Some(v) = self.identified_client_state.as_ref() { + struct_ser.serialize_field("identifiedClientState", v)?; } if true { #[allow(clippy::needless_borrow)] @@ -7642,14 +4180,15 @@ impl serde::Serialize for QueryChannelResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryChannelResponse { +impl<'de> serde::Deserialize<'de> for QueryChannelClientStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "channel", + "identified_client_state", + "identifiedClientState", "proof", "proof_height", "proofHeight", @@ -7657,7 +4196,7 @@ impl<'de> serde::Deserialize<'de> for QueryChannelResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField { - Channel, + IdentifiedClientState, Proof, ProofHeight, } @@ -7681,7 +4220,7 @@ impl<'de> serde::Deserialize<'de> for QueryChannelResponse { E: serde::de::Error, { match value { - "channel" => Ok(GeneratedField::Channel), + "identifiedClientState" | "identified_client_state" => Ok(GeneratedField::IdentifiedClientState), "proof" => Ok(GeneratedField::Proof), "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -7693,26 +4232,26 @@ impl<'de> serde::Deserialize<'de> for QueryChannelResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelResponse; + type Value = QueryChannelClientStateResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryChannelClientStateResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut channel__ = None; + let mut identified_client_state__ = None; let mut proof__ = None; let mut proof_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Channel => { - if channel__.is_some() { - return Err(serde::de::Error::duplicate_field("channel")); + GeneratedField::IdentifiedClientState => { + if identified_client_state__.is_some() { + return Err(serde::de::Error::duplicate_field("identifiedClientState")); } - channel__ = map_.next_value()?; + identified_client_state__ = map_.next_value()?; } GeneratedField::Proof => { if proof__.is_some() { @@ -7730,17 +4269,17 @@ impl<'de> serde::Deserialize<'de> for QueryChannelResponse { } } } - Ok(QueryChannelResponse { - channel: channel__, + Ok(QueryChannelClientStateResponse { + identified_client_state: identified_client_state__, proof: proof__.unwrap_or_default(), proof_height: proof_height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelClientStateResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryChannelsRequest { +impl serde::Serialize for QueryChannelConsensusStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -7751,26 +4290,56 @@ impl serde::Serialize for QueryChannelsRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelsRequest", len)?; - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelConsensusStateRequest", len)?; + if true { + struct_ser.serialize_field("portId", &self.port_id)?; + } + if true { + struct_ser.serialize_field("channelId", &self.channel_id)?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("revisionNumber", ::alloc::string::ToString::to_string(&self.revision_number).as_str())?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("revisionHeight", ::alloc::string::ToString::to_string(&self.revision_height).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryChannelsRequest { +impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "pagination", + "port_id", + "portId", + "channel_id", + "channelId", + "revision_number", + "revisionNumber", + "revision_height", + "revisionHeight", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Pagination, + PortId, + ChannelId, + RevisionNumber, + RevisionHeight, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -7792,7 +4361,10 @@ impl<'de> serde::Deserialize<'de> for QueryChannelsRequest { E: serde::de::Error, { match value { - "pagination" => Ok(GeneratedField::Pagination), + "portId" | "port_id" => Ok(GeneratedField::PortId), + "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), + "revisionNumber" | "revision_number" => Ok(GeneratedField::RevisionNumber), + "revisionHeight" | "revision_height" => Ok(GeneratedField::RevisionHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7802,36 +4374,64 @@ impl<'de> serde::Deserialize<'de> for QueryChannelsRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelsRequest; + type Value = QueryChannelConsensusStateRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelsRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryChannelConsensusStateRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut pagination__ = None; + let mut port_id__ = None; + let mut channel_id__ = None; + let mut revision_number__ = None; + let mut revision_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::PortId => { + if port_id__.is_some() { + return Err(serde::de::Error::duplicate_field("portId")); } - pagination__ = map_.next_value()?; + port_id__ = Some(map_.next_value()?); + } + GeneratedField::ChannelId => { + if channel_id__.is_some() { + return Err(serde::de::Error::duplicate_field("channelId")); + } + channel_id__ = Some(map_.next_value()?); + } + GeneratedField::RevisionNumber => { + if revision_number__.is_some() { + return Err(serde::de::Error::duplicate_field("revisionNumber")); + } + revision_number__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::RevisionHeight => { + if revision_height__.is_some() { + return Err(serde::de::Error::duplicate_field("revisionHeight")); + } + revision_height__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } } } - Ok(QueryChannelsRequest { - pagination: pagination__, + Ok(QueryChannelConsensusStateRequest { + port_id: port_id__.unwrap_or_default(), + channel_id: channel_id__.unwrap_or_default(), + revision_number: revision_number__.unwrap_or_default(), + revision_height: revision_height__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelsRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelConsensusStateRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryChannelsResponse { +impl serde::Serialize for QueryChannelConsensusStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -7848,36 +4448,48 @@ impl serde::Serialize for QueryChannelsResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelsResponse", len)?; if true { - struct_ser.serialize_field("channels", &self.channels)?; + len += 1; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelConsensusStateResponse", len)?; + if let Some(v) = self.consensus_state.as_ref() { + struct_ser.serialize_field("consensusState", v)?; } - if let Some(v) = self.height.as_ref() { - struct_ser.serialize_field("height", v)?; + if true { + struct_ser.serialize_field("clientId", &self.client_id)?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; + } + if let Some(v) = self.proof_height.as_ref() { + struct_ser.serialize_field("proofHeight", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryChannelsResponse { +impl<'de> serde::Deserialize<'de> for QueryChannelConsensusStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "channels", - "pagination", - "height", + const FIELDS: &[&str] = &[ + "consensus_state", + "consensusState", + "client_id", + "clientId", + "proof", + "proof_height", + "proofHeight", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Channels, - Pagination, - Height, + ConsensusState, + ClientId, + Proof, + ProofHeight, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -7899,9 +4511,10 @@ impl<'de> serde::Deserialize<'de> for QueryChannelsResponse { E: serde::de::Error, { match value { - "channels" => Ok(GeneratedField::Channels), - "pagination" => Ok(GeneratedField::Pagination), - "height" => Ok(GeneratedField::Height), + "consensusState" | "consensus_state" => Ok(GeneratedField::ConsensusState), + "clientId" | "client_id" => Ok(GeneratedField::ClientId), + "proof" => Ok(GeneratedField::Proof), + "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7911,52 +4524,62 @@ impl<'de> serde::Deserialize<'de> for QueryChannelsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryChannelsResponse; + type Value = QueryChannelConsensusStateResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryChannelsResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryChannelConsensusStateResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut channels__ = None; - let mut pagination__ = None; - let mut height__ = None; + let mut consensus_state__ = None; + let mut client_id__ = None; + let mut proof__ = None; + let mut proof_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Channels => { - if channels__.is_some() { - return Err(serde::de::Error::duplicate_field("channels")); + GeneratedField::ConsensusState => { + if consensus_state__.is_some() { + return Err(serde::de::Error::duplicate_field("consensusState")); } - channels__ = Some(map_.next_value()?); + consensus_state__ = map_.next_value()?; } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::ClientId => { + if client_id__.is_some() { + return Err(serde::de::Error::duplicate_field("clientId")); } - pagination__ = map_.next_value()?; + client_id__ = Some(map_.next_value()?); } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); + GeneratedField::Proof => { + if proof__.is_some() { + return Err(serde::de::Error::duplicate_field("proof")); } - height__ = map_.next_value()?; + proof__ = + Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + GeneratedField::ProofHeight => { + if proof_height__.is_some() { + return Err(serde::de::Error::duplicate_field("proofHeight")); + } + proof_height__ = map_.next_value()?; } } } - Ok(QueryChannelsResponse { - channels: channels__.unwrap_or_default(), - pagination: pagination__, - height: height__, + Ok(QueryChannelConsensusStateResponse { + consensus_state: consensus_state__, + client_id: client_id__.unwrap_or_default(), + proof: proof__.unwrap_or_default(), + proof_height: proof_height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelsResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelConsensusStateResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryConnectionChannelsRequest { +impl serde::Serialize for QueryChannelRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -7970,31 +4593,33 @@ impl serde::Serialize for QueryConnectionChannelsRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryConnectionChannelsRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelRequest", len)?; if true { - struct_ser.serialize_field("connection", &self.connection)?; + struct_ser.serialize_field("portId", &self.port_id)?; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + if true { + struct_ser.serialize_field("channelId", &self.channel_id)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryConnectionChannelsRequest { +impl<'de> serde::Deserialize<'de> for QueryChannelRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "connection", - "pagination", + "port_id", + "portId", + "channel_id", + "channelId", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Connection, - Pagination, + PortId, + ChannelId, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -8016,8 +4641,8 @@ impl<'de> serde::Deserialize<'de> for QueryConnectionChannelsRequest { E: serde::de::Error, { match value { - "connection" => Ok(GeneratedField::Connection), - "pagination" => Ok(GeneratedField::Pagination), + "portId" | "port_id" => Ok(GeneratedField::PortId), + "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8027,44 +4652,44 @@ impl<'de> serde::Deserialize<'de> for QueryConnectionChannelsRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryConnectionChannelsRequest; + type Value = QueryChannelRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryConnectionChannelsRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryChannelRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut connection__ = None; - let mut pagination__ = None; + let mut port_id__ = None; + let mut channel_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Connection => { - if connection__.is_some() { - return Err(serde::de::Error::duplicate_field("connection")); + GeneratedField::PortId => { + if port_id__.is_some() { + return Err(serde::de::Error::duplicate_field("portId")); } - connection__ = Some(map_.next_value()?); + port_id__ = Some(map_.next_value()?); } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::ChannelId => { + if channel_id__.is_some() { + return Err(serde::de::Error::duplicate_field("channelId")); } - pagination__ = map_.next_value()?; + channel_id__ = Some(map_.next_value()?); } } } - Ok(QueryConnectionChannelsRequest { - connection: connection__.unwrap_or_default(), - pagination: pagination__, + Ok(QueryChannelRequest { + port_id: port_id__.unwrap_or_default(), + channel_id: channel_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryConnectionChannelsRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryConnectionChannelsResponse { +impl serde::Serialize for QueryChannelResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -8081,36 +4706,38 @@ impl serde::Serialize for QueryConnectionChannelsResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryConnectionChannelsResponse", len)?; - if true { - struct_ser.serialize_field("channels", &self.channels)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelResponse", len)?; + if let Some(v) = self.channel.as_ref() { + struct_ser.serialize_field("channel", v)?; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; } - if let Some(v) = self.height.as_ref() { - struct_ser.serialize_field("height", v)?; + if let Some(v) = self.proof_height.as_ref() { + struct_ser.serialize_field("proofHeight", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryConnectionChannelsResponse { +impl<'de> serde::Deserialize<'de> for QueryChannelResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "channels", - "pagination", - "height", + "channel", + "proof", + "proof_height", + "proofHeight", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Channels, - Pagination, - Height, + Channel, + Proof, + ProofHeight, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -8132,9 +4759,9 @@ impl<'de> serde::Deserialize<'de> for QueryConnectionChannelsResponse { E: serde::de::Error, { match value { - "channels" => Ok(GeneratedField::Channels), - "pagination" => Ok(GeneratedField::Pagination), - "height" => Ok(GeneratedField::Height), + "channel" => Ok(GeneratedField::Channel), + "proof" => Ok(GeneratedField::Proof), + "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8144,52 +4771,54 @@ impl<'de> serde::Deserialize<'de> for QueryConnectionChannelsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryConnectionChannelsResponse; + type Value = QueryChannelResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryConnectionChannelsResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryChannelResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut channels__ = None; - let mut pagination__ = None; - let mut height__ = None; + let mut channel__ = None; + let mut proof__ = None; + let mut proof_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Channels => { - if channels__.is_some() { - return Err(serde::de::Error::duplicate_field("channels")); + GeneratedField::Channel => { + if channel__.is_some() { + return Err(serde::de::Error::duplicate_field("channel")); } - channels__ = Some(map_.next_value()?); + channel__ = map_.next_value()?; } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::Proof => { + if proof__.is_some() { + return Err(serde::de::Error::duplicate_field("proof")); } - pagination__ = map_.next_value()?; + proof__ = + Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); + GeneratedField::ProofHeight => { + if proof_height__.is_some() { + return Err(serde::de::Error::duplicate_field("proofHeight")); } - height__ = map_.next_value()?; + proof_height__ = map_.next_value()?; } } } - Ok(QueryConnectionChannelsResponse { - channels: channels__.unwrap_or_default(), - pagination: pagination__, - height: height__, + Ok(QueryChannelResponse { + channel: channel__, + proof: proof__.unwrap_or_default(), + proof_height: proof_height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryConnectionChannelsResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryNextSequenceReceiveRequest { +impl serde::Serialize for QueryChannelsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -8200,36 +4829,26 @@ impl serde::Serialize for QueryNextSequenceReceiveRequest { if true { len += 1; } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryNextSequenceReceiveRequest", len)?; - if true { - struct_ser.serialize_field("portId", &self.port_id)?; - } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelsRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryNextSequenceReceiveRequest { +impl<'de> serde::Deserialize<'de> for QueryChannelsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", + "pagination", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - PortId, - ChannelId, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -8251,8 +4870,7 @@ impl<'de> serde::Deserialize<'de> for QueryNextSequenceReceiveRequest { E: serde::de::Error, { match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8262,44 +4880,36 @@ impl<'de> serde::Deserialize<'de> for QueryNextSequenceReceiveRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryNextSequenceReceiveRequest; + type Value = QueryChannelsRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryNextSequenceReceiveRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryChannelsRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut port_id__ = None; - let mut channel_id__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); - } - port_id__ = Some(map_.next_value()?); - } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - channel_id__ = Some(map_.next_value()?); + pagination__ = map_.next_value()?; } } } - Ok(QueryNextSequenceReceiveRequest { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), + Ok(QueryChannelsRequest { + pagination: pagination__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryNextSequenceReceiveRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelsRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryNextSequenceReceiveResponse { +impl serde::Serialize for QueryChannelsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -8316,40 +4926,36 @@ impl serde::Serialize for QueryNextSequenceReceiveResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryNextSequenceReceiveResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryChannelsResponse", len)?; if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("nextSequenceReceive", ::alloc::string::ToString::to_string(&self.next_sequence_receive).as_str())?; + struct_ser.serialize_field("channels", &self.channels)?; } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; + if let Some(v) = self.height.as_ref() { + struct_ser.serialize_field("height", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryNextSequenceReceiveResponse { +impl<'de> serde::Deserialize<'de> for QueryChannelsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "next_sequence_receive", - "nextSequenceReceive", - "proof", - "proof_height", - "proofHeight", + "channels", + "pagination", + "height", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - NextSequenceReceive, - Proof, - ProofHeight, + Channels, + Pagination, + Height, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -8371,9 +4977,9 @@ impl<'de> serde::Deserialize<'de> for QueryNextSequenceReceiveResponse { E: serde::de::Error, { match value { - "nextSequenceReceive" | "next_sequence_receive" => Ok(GeneratedField::NextSequenceReceive), - "proof" => Ok(GeneratedField::Proof), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), + "channels" => Ok(GeneratedField::Channels), + "pagination" => Ok(GeneratedField::Pagination), + "height" => Ok(GeneratedField::Height), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8383,56 +4989,52 @@ impl<'de> serde::Deserialize<'de> for QueryNextSequenceReceiveResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryNextSequenceReceiveResponse; + type Value = QueryChannelsResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryNextSequenceReceiveResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryChannelsResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut next_sequence_receive__ = None; - let mut proof__ = None; - let mut proof_height__ = None; + let mut channels__ = None; + let mut pagination__ = None; + let mut height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::NextSequenceReceive => { - if next_sequence_receive__.is_some() { - return Err(serde::de::Error::duplicate_field("nextSequenceReceive")); + GeneratedField::Channels => { + if channels__.is_some() { + return Err(serde::de::Error::duplicate_field("channels")); } - next_sequence_receive__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + channels__ = Some(map_.next_value()?); } - GeneratedField::Proof => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("proof")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - proof__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; + pagination__ = map_.next_value()?; } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); } - proof_height__ = map_.next_value()?; + height__ = map_.next_value()?; } } } - Ok(QueryNextSequenceReceiveResponse { - next_sequence_receive: next_sequence_receive__.unwrap_or_default(), - proof: proof__.unwrap_or_default(), - proof_height: proof_height__, + Ok(QueryChannelsResponse { + channels: channels__.unwrap_or_default(), + pagination: pagination__, + height: height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryNextSequenceReceiveResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryChannelsResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryNextSequenceSendRequest { +impl serde::Serialize for QueryConnectionChannelsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -8446,33 +5048,31 @@ impl serde::Serialize for QueryNextSequenceSendRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryNextSequenceSendRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryConnectionChannelsRequest", len)?; if true { - struct_ser.serialize_field("portId", &self.port_id)?; + struct_ser.serialize_field("connection", &self.connection)?; } - if true { - struct_ser.serialize_field("channelId", &self.channel_id)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryNextSequenceSendRequest { +impl<'de> serde::Deserialize<'de> for QueryConnectionChannelsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "port_id", - "portId", - "channel_id", - "channelId", + "connection", + "pagination", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - PortId, - ChannelId, + Connection, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -8494,8 +5094,8 @@ impl<'de> serde::Deserialize<'de> for QueryNextSequenceSendRequest { E: serde::de::Error, { match value { - "portId" | "port_id" => Ok(GeneratedField::PortId), - "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), + "connection" => Ok(GeneratedField::Connection), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8505,44 +5105,44 @@ impl<'de> serde::Deserialize<'de> for QueryNextSequenceSendRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryNextSequenceSendRequest; + type Value = QueryConnectionChannelsRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryNextSequenceSendRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryConnectionChannelsRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut port_id__ = None; - let mut channel_id__ = None; + let mut connection__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::PortId => { - if port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("portId")); + GeneratedField::Connection => { + if connection__.is_some() { + return Err(serde::de::Error::duplicate_field("connection")); } - port_id__ = Some(map_.next_value()?); + connection__ = Some(map_.next_value()?); } - GeneratedField::ChannelId => { - if channel_id__.is_some() { - return Err(serde::de::Error::duplicate_field("channelId")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - channel_id__ = Some(map_.next_value()?); + pagination__ = map_.next_value()?; } } } - Ok(QueryNextSequenceSendRequest { - port_id: port_id__.unwrap_or_default(), - channel_id: channel_id__.unwrap_or_default(), + Ok(QueryConnectionChannelsRequest { + connection: connection__.unwrap_or_default(), + pagination: pagination__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryNextSequenceSendRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryConnectionChannelsRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryNextSequenceSendResponse { +impl serde::Serialize for QueryConnectionChannelsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -8559,40 +5159,36 @@ impl serde::Serialize for QueryNextSequenceSendResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryNextSequenceSendResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryConnectionChannelsResponse", len)?; if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("nextSequenceSend", ::alloc::string::ToString::to_string(&self.next_sequence_send).as_str())?; + struct_ser.serialize_field("channels", &self.channels)?; } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; + if let Some(v) = self.height.as_ref() { + struct_ser.serialize_field("height", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryNextSequenceSendResponse { +impl<'de> serde::Deserialize<'de> for QueryConnectionChannelsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "next_sequence_send", - "nextSequenceSend", - "proof", - "proof_height", - "proofHeight", + "channels", + "pagination", + "height", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - NextSequenceSend, - Proof, - ProofHeight, + Channels, + Pagination, + Height, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -8614,9 +5210,9 @@ impl<'de> serde::Deserialize<'de> for QueryNextSequenceSendResponse { E: serde::de::Error, { match value { - "nextSequenceSend" | "next_sequence_send" => Ok(GeneratedField::NextSequenceSend), - "proof" => Ok(GeneratedField::Proof), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), + "channels" => Ok(GeneratedField::Channels), + "pagination" => Ok(GeneratedField::Pagination), + "height" => Ok(GeneratedField::Height), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8626,56 +5222,52 @@ impl<'de> serde::Deserialize<'de> for QueryNextSequenceSendResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryNextSequenceSendResponse; + type Value = QueryConnectionChannelsResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryNextSequenceSendResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryConnectionChannelsResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut next_sequence_send__ = None; - let mut proof__ = None; - let mut proof_height__ = None; + let mut channels__ = None; + let mut pagination__ = None; + let mut height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::NextSequenceSend => { - if next_sequence_send__.is_some() { - return Err(serde::de::Error::duplicate_field("nextSequenceSend")); + GeneratedField::Channels => { + if channels__.is_some() { + return Err(serde::de::Error::duplicate_field("channels")); } - next_sequence_send__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + channels__ = Some(map_.next_value()?); } - GeneratedField::Proof => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("proof")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - proof__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; + pagination__ = map_.next_value()?; } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); } - proof_height__ = map_.next_value()?; + height__ = map_.next_value()?; } } } - Ok(QueryNextSequenceSendResponse { - next_sequence_send: next_sequence_send__.unwrap_or_default(), - proof: proof__.unwrap_or_default(), - proof_height: proof_height__, + Ok(QueryConnectionChannelsResponse { + channels: channels__.unwrap_or_default(), + pagination: pagination__, + height: height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryNextSequenceSendResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryConnectionChannelsResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketAcknowledgementRequest { +impl serde::Serialize for QueryNextSequenceReceiveRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -8689,24 +5281,17 @@ impl serde::Serialize for QueryPacketAcknowledgementRequest { if true { len += 1; } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryNextSequenceReceiveRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } if true { struct_ser.serialize_field("channelId", &self.channel_id)?; } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; - } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementRequest { +impl<'de> serde::Deserialize<'de> for QueryNextSequenceReceiveRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -8717,14 +5302,12 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementRequest { "portId", "channel_id", "channelId", - "sequence", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { PortId, ChannelId, - Sequence, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -8748,7 +5331,6 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementRequest { match value { "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "sequence" => Ok(GeneratedField::Sequence), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8758,19 +5340,18 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketAcknowledgementRequest; + type Value = QueryNextSequenceReceiveRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketAcknowledgementRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryNextSequenceReceiveRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { let mut port_id__ = None; let mut channel_id__ = None; - let mut sequence__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -8785,27 +5366,18 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementRequest { } channel_id__ = Some(map_.next_value()?); } - GeneratedField::Sequence => { - if sequence__.is_some() { - return Err(serde::de::Error::duplicate_field("sequence")); - } - sequence__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } } } - Ok(QueryPacketAcknowledgementRequest { + Ok(QueryNextSequenceReceiveRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), - sequence: sequence__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryNextSequenceReceiveRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketAcknowledgementResponse { +impl serde::Serialize for QueryNextSequenceReceiveResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -8822,10 +5394,10 @@ impl serde::Serialize for QueryPacketAcknowledgementResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryNextSequenceReceiveResponse", len)?; if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("acknowledgement", pbjson::private::base64::encode(&self.acknowledgement).as_str())?; + struct_ser.serialize_field("nextSequenceReceive", ::alloc::string::ToString::to_string(&self.next_sequence_receive).as_str())?; } if true { #[allow(clippy::needless_borrow)] @@ -8837,14 +5409,15 @@ impl serde::Serialize for QueryPacketAcknowledgementResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementResponse { +impl<'de> serde::Deserialize<'de> for QueryNextSequenceReceiveResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "acknowledgement", + "next_sequence_receive", + "nextSequenceReceive", "proof", "proof_height", "proofHeight", @@ -8852,7 +5425,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField { - Acknowledgement, + NextSequenceReceive, Proof, ProofHeight, } @@ -8876,7 +5449,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementResponse { E: serde::de::Error, { match value { - "acknowledgement" => Ok(GeneratedField::Acknowledgement), + "nextSequenceReceive" | "next_sequence_receive" => Ok(GeneratedField::NextSequenceReceive), "proof" => Ok(GeneratedField::Proof), "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -8888,27 +5461,27 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketAcknowledgementResponse; + type Value = QueryNextSequenceReceiveResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketAcknowledgementResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryNextSequenceReceiveResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut acknowledgement__ = None; + let mut next_sequence_receive__ = None; let mut proof__ = None; let mut proof_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Acknowledgement => { - if acknowledgement__.is_some() { - return Err(serde::de::Error::duplicate_field("acknowledgement")); + GeneratedField::NextSequenceReceive => { + if next_sequence_receive__.is_some() { + return Err(serde::de::Error::duplicate_field("nextSequenceReceive")); } - acknowledgement__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + next_sequence_receive__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } GeneratedField::Proof => { @@ -8927,17 +5500,17 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementResponse { } } } - Ok(QueryPacketAcknowledgementResponse { - acknowledgement: acknowledgement__.unwrap_or_default(), + Ok(QueryNextSequenceReceiveResponse { + next_sequence_receive: next_sequence_receive__.unwrap_or_default(), proof: proof__.unwrap_or_default(), proof_height: proof_height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryNextSequenceReceiveResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketAcknowledgementsRequest { +impl serde::Serialize for QueryNextSequenceSendRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -8951,29 +5524,17 @@ impl serde::Serialize for QueryPacketAcknowledgementsRequest { if true { len += 1; } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementsRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryNextSequenceSendRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } if true { struct_ser.serialize_field("channelId", &self.channel_id)?; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } - if true { - struct_ser.serialize_field("packetCommitmentSequences", &self.packet_commitment_sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; - } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsRequest { +impl<'de> serde::Deserialize<'de> for QueryNextSequenceSendRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -8984,17 +5545,12 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsRequest { "portId", "channel_id", "channelId", - "pagination", - "packet_commitment_sequences", - "packetCommitmentSequences", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { PortId, ChannelId, - Pagination, - PacketCommitmentSequences, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -9018,8 +5574,6 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsRequest { match value { "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "pagination" => Ok(GeneratedField::Pagination), - "packetCommitmentSequences" | "packet_commitment_sequences" => Ok(GeneratedField::PacketCommitmentSequences), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9029,20 +5583,18 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketAcknowledgementsRequest; + type Value = QueryNextSequenceSendRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketAcknowledgementsRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryNextSequenceSendRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { let mut port_id__ = None; let mut channel_id__ = None; - let mut pagination__ = None; - let mut packet_commitment_sequences__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -9057,35 +5609,18 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsRequest { } channel_id__ = Some(map_.next_value()?); } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - GeneratedField::PacketCommitmentSequences => { - if packet_commitment_sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("packetCommitmentSequences")); - } - packet_commitment_sequences__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } } } - Ok(QueryPacketAcknowledgementsRequest { + Ok(QueryNextSequenceSendRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), - pagination: pagination__, - packet_commitment_sequences: packet_commitment_sequences__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementsRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryNextSequenceSendRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketAcknowledgementsResponse { +impl serde::Serialize for QueryNextSequenceSendResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -9102,36 +5637,40 @@ impl serde::Serialize for QueryPacketAcknowledgementsResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementsResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryNextSequenceSendResponse", len)?; if true { - struct_ser.serialize_field("acknowledgements", &self.acknowledgements)?; + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("nextSequenceSend", ::alloc::string::ToString::to_string(&self.next_sequence_send).as_str())?; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; } - if let Some(v) = self.height.as_ref() { - struct_ser.serialize_field("height", v)?; + if let Some(v) = self.proof_height.as_ref() { + struct_ser.serialize_field("proofHeight", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsResponse { +impl<'de> serde::Deserialize<'de> for QueryNextSequenceSendResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "acknowledgements", - "pagination", - "height", + "next_sequence_send", + "nextSequenceSend", + "proof", + "proof_height", + "proofHeight", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Acknowledgements, - Pagination, - Height, + NextSequenceSend, + Proof, + ProofHeight, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -9153,9 +5692,9 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsResponse { E: serde::de::Error, { match value { - "acknowledgements" => Ok(GeneratedField::Acknowledgements), - "pagination" => Ok(GeneratedField::Pagination), - "height" => Ok(GeneratedField::Height), + "nextSequenceSend" | "next_sequence_send" => Ok(GeneratedField::NextSequenceSend), + "proof" => Ok(GeneratedField::Proof), + "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9165,52 +5704,56 @@ impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketAcknowledgementsResponse; + type Value = QueryNextSequenceSendResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketAcknowledgementsResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryNextSequenceSendResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut acknowledgements__ = None; - let mut pagination__ = None; - let mut height__ = None; + let mut next_sequence_send__ = None; + let mut proof__ = None; + let mut proof_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Acknowledgements => { - if acknowledgements__.is_some() { - return Err(serde::de::Error::duplicate_field("acknowledgements")); + GeneratedField::NextSequenceSend => { + if next_sequence_send__.is_some() { + return Err(serde::de::Error::duplicate_field("nextSequenceSend")); } - acknowledgements__ = Some(map_.next_value()?); + next_sequence_send__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::Proof => { + if proof__.is_some() { + return Err(serde::de::Error::duplicate_field("proof")); } - pagination__ = map_.next_value()?; + proof__ = + Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); + GeneratedField::ProofHeight => { + if proof_height__.is_some() { + return Err(serde::de::Error::duplicate_field("proofHeight")); } - height__ = map_.next_value()?; + proof_height__ = map_.next_value()?; } } } - Ok(QueryPacketAcknowledgementsResponse { - acknowledgements: acknowledgements__.unwrap_or_default(), - pagination: pagination__, - height: height__, + Ok(QueryNextSequenceSendResponse { + next_sequence_send: next_sequence_send__.unwrap_or_default(), + proof: proof__.unwrap_or_default(), + proof_height: proof_height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementsResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryNextSequenceSendResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketCommitmentRequest { +impl serde::Serialize for QueryPacketAcknowledgementRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -9227,7 +5770,7 @@ impl serde::Serialize for QueryPacketCommitmentRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketCommitmentRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } @@ -9241,7 +5784,7 @@ impl serde::Serialize for QueryPacketCommitmentRequest { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentRequest { +impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -9293,13 +5836,13 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketCommitmentRequest; + type Value = QueryPacketAcknowledgementRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketCommitmentRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketAcknowledgementRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { @@ -9330,17 +5873,17 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentRequest { } } } - Ok(QueryPacketCommitmentRequest { + Ok(QueryPacketAcknowledgementRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), sequence: sequence__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketCommitmentRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketCommitmentResponse { +impl serde::Serialize for QueryPacketAcknowledgementResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -9357,10 +5900,10 @@ impl serde::Serialize for QueryPacketCommitmentResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketCommitmentResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementResponse", len)?; if true { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("commitment", pbjson::private::base64::encode(&self.commitment).as_str())?; + struct_ser.serialize_field("acknowledgement", pbjson::private::base64::encode(&self.acknowledgement).as_str())?; } if true { #[allow(clippy::needless_borrow)] @@ -9372,14 +5915,14 @@ impl serde::Serialize for QueryPacketCommitmentResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentResponse { +impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "commitment", + "acknowledgement", "proof", "proof_height", "proofHeight", @@ -9387,7 +5930,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField { - Commitment, + Acknowledgement, Proof, ProofHeight, } @@ -9411,7 +5954,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentResponse { E: serde::de::Error, { match value { - "commitment" => Ok(GeneratedField::Commitment), + "acknowledgement" => Ok(GeneratedField::Acknowledgement), "proof" => Ok(GeneratedField::Proof), "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -9423,26 +5966,26 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketCommitmentResponse; + type Value = QueryPacketAcknowledgementResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketCommitmentResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketAcknowledgementResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut commitment__ = None; + let mut acknowledgement__ = None; let mut proof__ = None; let mut proof_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Commitment => { - if commitment__.is_some() { - return Err(serde::de::Error::duplicate_field("commitment")); + GeneratedField::Acknowledgement => { + if acknowledgement__.is_some() { + return Err(serde::de::Error::duplicate_field("acknowledgement")); } - commitment__ = + acknowledgement__ = Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) ; } @@ -9462,17 +6005,17 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentResponse { } } } - Ok(QueryPacketCommitmentResponse { - commitment: commitment__.unwrap_or_default(), + Ok(QueryPacketAcknowledgementResponse { + acknowledgement: acknowledgement__.unwrap_or_default(), proof: proof__.unwrap_or_default(), proof_height: proof_height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketCommitmentResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketCommitmentsRequest { +impl serde::Serialize for QueryPacketAcknowledgementsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -9489,7 +6032,10 @@ impl serde::Serialize for QueryPacketCommitmentsRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketCommitmentsRequest", len)?; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementsRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } @@ -9499,10 +6045,13 @@ impl serde::Serialize for QueryPacketCommitmentsRequest { if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; } + if true { + struct_ser.serialize_field("packetCommitmentSequences", &self.packet_commitment_sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsRequest { +impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -9514,6 +6063,8 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsRequest { "channel_id", "channelId", "pagination", + "packet_commitment_sequences", + "packetCommitmentSequences", ]; #[allow(clippy::enum_variant_names)] @@ -9521,6 +6072,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsRequest { PortId, ChannelId, Pagination, + PacketCommitmentSequences, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -9545,6 +6097,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsRequest { "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), "pagination" => Ok(GeneratedField::Pagination), + "packetCommitmentSequences" | "packet_commitment_sequences" => Ok(GeneratedField::PacketCommitmentSequences), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9554,19 +6107,20 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketCommitmentsRequest; + type Value = QueryPacketAcknowledgementsRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketCommitmentsRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketAcknowledgementsRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { let mut port_id__ = None; let mut channel_id__ = None; let mut pagination__ = None; + let mut packet_commitment_sequences__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -9587,19 +6141,29 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsRequest { } pagination__ = map_.next_value()?; } + GeneratedField::PacketCommitmentSequences => { + if packet_commitment_sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("packetCommitmentSequences")); + } + packet_commitment_sequences__ = + Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? + .into_iter().map(|x| x.0).collect()) + ; + } } } - Ok(QueryPacketCommitmentsRequest { + Ok(QueryPacketAcknowledgementsRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), pagination: pagination__, + packet_commitment_sequences: packet_commitment_sequences__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketCommitmentsRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementsRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketCommitmentsResponse { +impl serde::Serialize for QueryPacketAcknowledgementsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -9616,9 +6180,9 @@ impl serde::Serialize for QueryPacketCommitmentsResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketCommitmentsResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementsResponse", len)?; if true { - struct_ser.serialize_field("commitments", &self.commitments)?; + struct_ser.serialize_field("acknowledgements", &self.acknowledgements)?; } if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; @@ -9629,21 +6193,21 @@ impl serde::Serialize for QueryPacketCommitmentsResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsResponse { +impl<'de> serde::Deserialize<'de> for QueryPacketAcknowledgementsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "commitments", + "acknowledgements", "pagination", "height", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Commitments, + Acknowledgements, Pagination, Height, } @@ -9667,7 +6231,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsResponse { E: serde::de::Error, { match value { - "commitments" => Ok(GeneratedField::Commitments), + "acknowledgements" => Ok(GeneratedField::Acknowledgements), "pagination" => Ok(GeneratedField::Pagination), "height" => Ok(GeneratedField::Height), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -9679,26 +6243,26 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketCommitmentsResponse; + type Value = QueryPacketAcknowledgementsResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketCommitmentsResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketAcknowledgementsResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut commitments__ = None; + let mut acknowledgements__ = None; let mut pagination__ = None; let mut height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Commitments => { - if commitments__.is_some() { - return Err(serde::de::Error::duplicate_field("commitments")); + GeneratedField::Acknowledgements => { + if acknowledgements__.is_some() { + return Err(serde::de::Error::duplicate_field("acknowledgements")); } - commitments__ = Some(map_.next_value()?); + acknowledgements__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { @@ -9714,17 +6278,17 @@ impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsResponse { } } } - Ok(QueryPacketCommitmentsResponse { - commitments: commitments__.unwrap_or_default(), + Ok(QueryPacketAcknowledgementsResponse { + acknowledgements: acknowledgements__.unwrap_or_default(), pagination: pagination__, height: height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketCommitmentsResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketAcknowledgementsResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketReceiptRequest { +impl serde::Serialize for QueryPacketCommitmentRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -9741,7 +6305,7 @@ impl serde::Serialize for QueryPacketReceiptRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketReceiptRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketCommitmentRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } @@ -9755,7 +6319,7 @@ impl serde::Serialize for QueryPacketReceiptRequest { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketReceiptRequest { +impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -9807,13 +6371,13 @@ impl<'de> serde::Deserialize<'de> for QueryPacketReceiptRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketReceiptRequest; + type Value = QueryPacketCommitmentRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketReceiptRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketCommitmentRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { @@ -9844,17 +6408,17 @@ impl<'de> serde::Deserialize<'de> for QueryPacketReceiptRequest { } } } - Ok(QueryPacketReceiptRequest { + Ok(QueryPacketCommitmentRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), sequence: sequence__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketReceiptRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketCommitmentRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryPacketReceiptResponse { +impl serde::Serialize for QueryPacketCommitmentResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -9871,9 +6435,10 @@ impl serde::Serialize for QueryPacketReceiptResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketReceiptResponse", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketCommitmentResponse", len)?; if true { - struct_ser.serialize_field("received", &self.received)?; + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("commitment", pbjson::private::base64::encode(&self.commitment).as_str())?; } if true { #[allow(clippy::needless_borrow)] @@ -9885,14 +6450,14 @@ impl serde::Serialize for QueryPacketReceiptResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPacketReceiptResponse { +impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "received", + "commitment", "proof", "proof_height", "proofHeight", @@ -9900,7 +6465,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketReceiptResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField { - Received, + Commitment, Proof, ProofHeight, } @@ -9924,7 +6489,7 @@ impl<'de> serde::Deserialize<'de> for QueryPacketReceiptResponse { E: serde::de::Error, { match value { - "received" => Ok(GeneratedField::Received), + "commitment" => Ok(GeneratedField::Commitment), "proof" => Ok(GeneratedField::Proof), "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -9936,26 +6501,28 @@ impl<'de> serde::Deserialize<'de> for QueryPacketReceiptResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPacketReceiptResponse; + type Value = QueryPacketCommitmentResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryPacketReceiptResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketCommitmentResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut received__ = None; + let mut commitment__ = None; let mut proof__ = None; let mut proof_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Received => { - if received__.is_some() { - return Err(serde::de::Error::duplicate_field("received")); + GeneratedField::Commitment => { + if commitment__.is_some() { + return Err(serde::de::Error::duplicate_field("commitment")); } - received__ = Some(map_.next_value()?); + commitment__ = + Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; } GeneratedField::Proof => { if proof__.is_some() { @@ -9973,17 +6540,17 @@ impl<'de> serde::Deserialize<'de> for QueryPacketReceiptResponse { } } } - Ok(QueryPacketReceiptResponse { - received: received__.unwrap_or_default(), + Ok(QueryPacketCommitmentResponse { + commitment: commitment__.unwrap_or_default(), proof: proof__.unwrap_or_default(), proof_height: proof_height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketReceiptResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketCommitmentResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryUnreceivedAcksRequest { +impl serde::Serialize for QueryPacketCommitmentsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -10000,20 +6567,20 @@ impl serde::Serialize for QueryUnreceivedAcksRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUnreceivedAcksRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketCommitmentsRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } if true { struct_ser.serialize_field("channelId", &self.channel_id)?; } - if true { - struct_ser.serialize_field("packetAckSequences", &self.packet_ack_sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksRequest { +impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -10024,15 +6591,14 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksRequest { "portId", "channel_id", "channelId", - "packet_ack_sequences", - "packetAckSequences", + "pagination", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { PortId, ChannelId, - PacketAckSequences, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -10056,7 +6622,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksRequest { match value { "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "packetAckSequences" | "packet_ack_sequences" => Ok(GeneratedField::PacketAckSequences), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10066,19 +6632,19 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUnreceivedAcksRequest; + type Value = QueryPacketCommitmentsRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryUnreceivedAcksRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketCommitmentsRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { let mut port_id__ = None; let mut channel_id__ = None; - let mut packet_ack_sequences__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -10093,28 +6659,25 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksRequest { } channel_id__ = Some(map_.next_value()?); } - GeneratedField::PacketAckSequences => { - if packet_ack_sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("packetAckSequences")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - packet_ack_sequences__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; + pagination__ = map_.next_value()?; } } } - Ok(QueryUnreceivedAcksRequest { + Ok(QueryPacketCommitmentsRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), - packet_ack_sequences: packet_ack_sequences__.unwrap_or_default(), + pagination: pagination__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryUnreceivedAcksRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketCommitmentsRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryUnreceivedAcksResponse { +impl serde::Serialize for QueryPacketCommitmentsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -10128,9 +6691,15 @@ impl serde::Serialize for QueryUnreceivedAcksResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUnreceivedAcksResponse", len)?; if true { - struct_ser.serialize_field("sequences", &self.sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketCommitmentsResponse", len)?; + if true { + struct_ser.serialize_field("commitments", &self.commitments)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } if let Some(v) = self.height.as_ref() { struct_ser.serialize_field("height", v)?; @@ -10138,20 +6707,22 @@ impl serde::Serialize for QueryUnreceivedAcksResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksResponse { +impl<'de> serde::Deserialize<'de> for QueryPacketCommitmentsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "sequences", + "commitments", + "pagination", "height", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sequences, + Commitments, + Pagination, Height, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -10174,7 +6745,8 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksResponse { E: serde::de::Error, { match value { - "sequences" => Ok(GeneratedField::Sequences), + "commitments" => Ok(GeneratedField::Commitments), + "pagination" => Ok(GeneratedField::Pagination), "height" => Ok(GeneratedField::Height), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -10185,28 +6757,32 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUnreceivedAcksResponse; + type Value = QueryPacketCommitmentsResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryUnreceivedAcksResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketCommitmentsResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut sequences__ = None; + let mut commitments__ = None; + let mut pagination__ = None; let mut height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sequences => { - if sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("sequences")); + GeneratedField::Commitments => { + if commitments__.is_some() { + return Err(serde::de::Error::duplicate_field("commitments")); } - sequences__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; + commitments__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; } GeneratedField::Height => { if height__.is_some() { @@ -10216,16 +6792,17 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksResponse { } } } - Ok(QueryUnreceivedAcksResponse { - sequences: sequences__.unwrap_or_default(), + Ok(QueryPacketCommitmentsResponse { + commitments: commitments__.unwrap_or_default(), + pagination: pagination__, height: height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryUnreceivedAcksResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketCommitmentsResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryUnreceivedPacketsRequest { +impl serde::Serialize for QueryPacketReceiptRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -10242,7 +6819,7 @@ impl serde::Serialize for QueryUnreceivedPacketsRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUnreceivedPacketsRequest", len)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketReceiptRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } @@ -10250,12 +6827,13 @@ impl serde::Serialize for QueryUnreceivedPacketsRequest { struct_ser.serialize_field("channelId", &self.channel_id)?; } if true { - struct_ser.serialize_field("packetCommitmentSequences", &self.packet_commitment_sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("sequence", ::alloc::string::ToString::to_string(&self.sequence).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsRequest { +impl<'de> serde::Deserialize<'de> for QueryPacketReceiptRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -10265,16 +6843,15 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsRequest { "port_id", "portId", "channel_id", - "channelId", - "packet_commitment_sequences", - "packetCommitmentSequences", + "channelId", + "sequence", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { PortId, ChannelId, - PacketCommitmentSequences, + Sequence, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -10298,7 +6875,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsRequest { match value { "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), - "packetCommitmentSequences" | "packet_commitment_sequences" => Ok(GeneratedField::PacketCommitmentSequences), + "sequence" => Ok(GeneratedField::Sequence), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10308,19 +6885,19 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUnreceivedPacketsRequest; + type Value = QueryPacketReceiptRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryUnreceivedPacketsRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketReceiptRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { let mut port_id__ = None; let mut channel_id__ = None; - let mut packet_commitment_sequences__ = None; + let mut sequence__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -10335,28 +6912,27 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsRequest { } channel_id__ = Some(map_.next_value()?); } - GeneratedField::PacketCommitmentSequences => { - if packet_commitment_sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("packetCommitmentSequences")); + GeneratedField::Sequence => { + if sequence__.is_some() { + return Err(serde::de::Error::duplicate_field("sequence")); } - packet_commitment_sequences__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) + sequence__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } } } - Ok(QueryUnreceivedPacketsRequest { + Ok(QueryPacketReceiptRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), - packet_commitment_sequences: packet_commitment_sequences__.unwrap_or_default(), + sequence: sequence__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryUnreceivedPacketsRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketReceiptRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryUnreceivedPacketsResponse { +impl serde::Serialize for QueryPacketReceiptResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -10370,31 +6946,41 @@ impl serde::Serialize for QueryUnreceivedPacketsResponse { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUnreceivedPacketsResponse", len)?; if true { - struct_ser.serialize_field("sequences", &self.sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; + len += 1; } - if let Some(v) = self.height.as_ref() { - struct_ser.serialize_field("height", v)?; + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryPacketReceiptResponse", len)?; + if true { + struct_ser.serialize_field("received", &self.received)?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; + } + if let Some(v) = self.proof_height.as_ref() { + struct_ser.serialize_field("proofHeight", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsResponse { +impl<'de> serde::Deserialize<'de> for QueryPacketReceiptResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "sequences", - "height", + "received", + "proof", + "proof_height", + "proofHeight", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sequences, - Height, + Received, + Proof, + ProofHeight, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -10416,8 +7002,9 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsResponse { E: serde::de::Error, { match value { - "sequences" => Ok(GeneratedField::Sequences), - "height" => Ok(GeneratedField::Height), + "received" => Ok(GeneratedField::Received), + "proof" => Ok(GeneratedField::Proof), + "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10427,47 +7014,54 @@ impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUnreceivedPacketsResponse; + type Value = QueryPacketReceiptResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryUnreceivedPacketsResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryPacketReceiptResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut sequences__ = None; - let mut height__ = None; + let mut received__ = None; + let mut proof__ = None; + let mut proof_height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sequences => { - if sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("sequences")); + GeneratedField::Received => { + if received__.is_some() { + return Err(serde::de::Error::duplicate_field("received")); } - sequences__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) + received__ = Some(map_.next_value()?); + } + GeneratedField::Proof => { + if proof__.is_some() { + return Err(serde::de::Error::duplicate_field("proof")); + } + proof__ = + Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) ; } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); + GeneratedField::ProofHeight => { + if proof_height__.is_some() { + return Err(serde::de::Error::duplicate_field("proofHeight")); } - height__ = map_.next_value()?; + proof_height__ = map_.next_value()?; } } } - Ok(QueryUnreceivedPacketsResponse { - sequences: sequences__.unwrap_or_default(), - height: height__, + Ok(QueryPacketReceiptResponse { + received: received__.unwrap_or_default(), + proof: proof__.unwrap_or_default(), + proof_height: proof_height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryUnreceivedPacketsResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryPacketReceiptResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryUpgradeErrorRequest { +impl serde::Serialize for QueryUnreceivedAcksRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -10481,17 +7075,23 @@ impl serde::Serialize for QueryUpgradeErrorRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUpgradeErrorRequest", len)?; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUnreceivedAcksRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } if true { struct_ser.serialize_field("channelId", &self.channel_id)?; } + if true { + struct_ser.serialize_field("packetAckSequences", &self.packet_ack_sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryUpgradeErrorRequest { +impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -10502,12 +7102,15 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeErrorRequest { "portId", "channel_id", "channelId", + "packet_ack_sequences", + "packetAckSequences", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { PortId, ChannelId, + PacketAckSequences, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -10531,6 +7134,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeErrorRequest { match value { "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), + "packetAckSequences" | "packet_ack_sequences" => Ok(GeneratedField::PacketAckSequences), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10540,18 +7144,19 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeErrorRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUpgradeErrorRequest; + type Value = QueryUnreceivedAcksRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryUpgradeErrorRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryUnreceivedAcksRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { let mut port_id__ = None; let mut channel_id__ = None; + let mut packet_ack_sequences__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -10566,18 +7171,28 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeErrorRequest { } channel_id__ = Some(map_.next_value()?); } + GeneratedField::PacketAckSequences => { + if packet_ack_sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("packetAckSequences")); + } + packet_ack_sequences__ = + Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? + .into_iter().map(|x| x.0).collect()) + ; + } } } - Ok(QueryUpgradeErrorRequest { + Ok(QueryUnreceivedAcksRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), + packet_ack_sequences: packet_ack_sequences__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryUpgradeErrorRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryUnreceivedAcksRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryUpgradeErrorResponse { +impl serde::Serialize for QueryUnreceivedAcksResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -10591,42 +7206,31 @@ impl serde::Serialize for QueryUpgradeErrorResponse { if true { len += 1; } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUnreceivedAcksResponse", len)?; if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUpgradeErrorResponse", len)?; - if let Some(v) = self.error_receipt.as_ref() { - struct_ser.serialize_field("errorReceipt", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; + struct_ser.serialize_field("sequences", &self.sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; + if let Some(v) = self.height.as_ref() { + struct_ser.serialize_field("height", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryUpgradeErrorResponse { +impl<'de> serde::Deserialize<'de> for QueryUnreceivedAcksResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "error_receipt", - "errorReceipt", - "proof", - "proof_height", - "proofHeight", + "sequences", + "height", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - ErrorReceipt, - Proof, - ProofHeight, + Sequences, + Height, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -10648,9 +7252,8 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeErrorResponse { E: serde::de::Error, { match value { - "errorReceipt" | "error_receipt" => Ok(GeneratedField::ErrorReceipt), - "proof" => Ok(GeneratedField::Proof), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), + "sequences" => Ok(GeneratedField::Sequences), + "height" => Ok(GeneratedField::Height), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10660,54 +7263,47 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeErrorResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUpgradeErrorResponse; + type Value = QueryUnreceivedAcksResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryUpgradeErrorResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryUnreceivedAcksResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut error_receipt__ = None; - let mut proof__ = None; - let mut proof_height__ = None; + let mut sequences__ = None; + let mut height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::ErrorReceipt => { - if error_receipt__.is_some() { - return Err(serde::de::Error::duplicate_field("errorReceipt")); - } - error_receipt__ = map_.next_value()?; - } - GeneratedField::Proof => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("proof")); + GeneratedField::Sequences => { + if sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("sequences")); } - proof__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + sequences__ = + Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? + .into_iter().map(|x| x.0).collect()) ; } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); } - proof_height__ = map_.next_value()?; + height__ = map_.next_value()?; } } } - Ok(QueryUpgradeErrorResponse { - error_receipt: error_receipt__, - proof: proof__.unwrap_or_default(), - proof_height: proof_height__, + Ok(QueryUnreceivedAcksResponse { + sequences: sequences__.unwrap_or_default(), + height: height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryUpgradeErrorResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryUnreceivedAcksResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryUpgradeRequest { +impl serde::Serialize for QueryUnreceivedPacketsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -10721,17 +7317,23 @@ impl serde::Serialize for QueryUpgradeRequest { if true { len += 1; } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUpgradeRequest", len)?; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUnreceivedPacketsRequest", len)?; if true { struct_ser.serialize_field("portId", &self.port_id)?; } if true { struct_ser.serialize_field("channelId", &self.channel_id)?; } + if true { + struct_ser.serialize_field("packetCommitmentSequences", &self.packet_commitment_sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryUpgradeRequest { +impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where @@ -10742,12 +7344,15 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeRequest { "portId", "channel_id", "channelId", + "packet_commitment_sequences", + "packetCommitmentSequences", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { PortId, ChannelId, + PacketCommitmentSequences, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -10771,6 +7376,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeRequest { match value { "portId" | "port_id" => Ok(GeneratedField::PortId), "channelId" | "channel_id" => Ok(GeneratedField::ChannelId), + "packetCommitmentSequences" | "packet_commitment_sequences" => Ok(GeneratedField::PacketCommitmentSequences), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10780,18 +7386,19 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUpgradeRequest; + type Value = QueryUnreceivedPacketsRequest; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryUpgradeRequest") + formatter.write_str("struct ibc.core.channel.v1.QueryUnreceivedPacketsRequest") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { let mut port_id__ = None; let mut channel_id__ = None; + let mut packet_commitment_sequences__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::PortId => { @@ -10806,18 +7413,28 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeRequest { } channel_id__ = Some(map_.next_value()?); } + GeneratedField::PacketCommitmentSequences => { + if packet_commitment_sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("packetCommitmentSequences")); + } + packet_commitment_sequences__ = + Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? + .into_iter().map(|x| x.0).collect()) + ; + } } } - Ok(QueryUpgradeRequest { + Ok(QueryUnreceivedPacketsRequest { port_id: port_id__.unwrap_or_default(), channel_id: channel_id__.unwrap_or_default(), + packet_commitment_sequences: packet_commitment_sequences__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryUpgradeRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryUnreceivedPacketsRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryUpgradeResponse { +impl serde::Serialize for QueryUnreceivedPacketsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -10831,41 +7448,31 @@ impl serde::Serialize for QueryUpgradeResponse { if true { len += 1; } + let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUnreceivedPacketsResponse", len)?; if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.QueryUpgradeResponse", len)?; - if let Some(v) = self.upgrade.as_ref() { - struct_ser.serialize_field("upgrade", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?; + struct_ser.serialize_field("sequences", &self.sequences.iter().map(::alloc::string::ToString::to_string).collect::<::alloc::vec::Vec<_>>())?; } - if let Some(v) = self.proof_height.as_ref() { - struct_ser.serialize_field("proofHeight", v)?; + if let Some(v) = self.height.as_ref() { + struct_ser.serialize_field("height", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryUpgradeResponse { +impl<'de> serde::Deserialize<'de> for QueryUnreceivedPacketsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "upgrade", - "proof", - "proof_height", - "proofHeight", + "sequences", + "height", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Upgrade, - Proof, - ProofHeight, + Sequences, + Height, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -10886,10 +7493,9 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeResponse { where E: serde::de::Error, { - match value { - "upgrade" => Ok(GeneratedField::Upgrade), - "proof" => Ok(GeneratedField::Proof), - "proofHeight" | "proof_height" => Ok(GeneratedField::ProofHeight), + match value { + "sequences" => Ok(GeneratedField::Sequences), + "height" => Ok(GeneratedField::Height), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10899,51 +7505,44 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradeResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryUpgradeResponse; + type Value = QueryUnreceivedPacketsResponse; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.QueryUpgradeResponse") + formatter.write_str("struct ibc.core.channel.v1.QueryUnreceivedPacketsResponse") } - fn visit_map(self, mut map_: V) -> core::result::Result + fn visit_map(self, mut map_: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut upgrade__ = None; - let mut proof__ = None; - let mut proof_height__ = None; + let mut sequences__ = None; + let mut height__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Upgrade => { - if upgrade__.is_some() { - return Err(serde::de::Error::duplicate_field("upgrade")); - } - upgrade__ = map_.next_value()?; - } - GeneratedField::Proof => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("proof")); + GeneratedField::Sequences => { + if sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("sequences")); } - proof__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + sequences__ = + Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::NumberDeserialize<_>>>()? + .into_iter().map(|x| x.0).collect()) ; } - GeneratedField::ProofHeight => { - if proof_height__.is_some() { - return Err(serde::de::Error::duplicate_field("proofHeight")); + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); } - proof_height__ = map_.next_value()?; + height__ = map_.next_value()?; } } } - Ok(QueryUpgradeResponse { - upgrade: upgrade__, - proof: proof__.unwrap_or_default(), - proof_height: proof_height__, + Ok(QueryUnreceivedPacketsResponse { + sequences: sequences__.unwrap_or_default(), + height: height__, }) } } - deserializer.deserialize_struct("ibc.core.channel.v1.QueryUpgradeResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("ibc.core.channel.v1.QueryUnreceivedPacketsResponse", FIELDS, GeneratedVisitor) } } impl serde::Serialize for ResponseResultType { @@ -10956,7 +7555,6 @@ impl serde::Serialize for ResponseResultType { Self::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED", Self::Noop => "RESPONSE_RESULT_TYPE_NOOP", Self::Success => "RESPONSE_RESULT_TYPE_SUCCESS", - Self::Failure => "RESPONSE_RESULT_TYPE_FAILURE", }; serializer.serialize_str(variant) } @@ -10971,7 +7569,6 @@ impl<'de> serde::Deserialize<'de> for ResponseResultType { "RESPONSE_RESULT_TYPE_UNSPECIFIED", "RESPONSE_RESULT_TYPE_NOOP", "RESPONSE_RESULT_TYPE_SUCCESS", - "RESPONSE_RESULT_TYPE_FAILURE", ]; struct GeneratedVisitor; @@ -11015,7 +7612,6 @@ impl<'de> serde::Deserialize<'de> for ResponseResultType { "RESPONSE_RESULT_TYPE_UNSPECIFIED" => Ok(ResponseResultType::Unspecified), "RESPONSE_RESULT_TYPE_NOOP" => Ok(ResponseResultType::Noop), "RESPONSE_RESULT_TYPE_SUCCESS" => Ok(ResponseResultType::Success), - "RESPONSE_RESULT_TYPE_FAILURE" => Ok(ResponseResultType::Failure), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -11035,8 +7631,6 @@ impl serde::Serialize for State { Self::Tryopen => "STATE_TRYOPEN", Self::Open => "STATE_OPEN", Self::Closed => "STATE_CLOSED", - Self::Flushing => "STATE_FLUSHING", - Self::Flushcomplete => "STATE_FLUSHCOMPLETE", }; serializer.serialize_str(variant) } @@ -11053,8 +7647,6 @@ impl<'de> serde::Deserialize<'de> for State { "STATE_TRYOPEN", "STATE_OPEN", "STATE_CLOSED", - "STATE_FLUSHING", - "STATE_FLUSHCOMPLETE", ]; struct GeneratedVisitor; @@ -11100,8 +7692,6 @@ impl<'de> serde::Deserialize<'de> for State { "STATE_TRYOPEN" => Ok(State::Tryopen), "STATE_OPEN" => Ok(State::Open), "STATE_CLOSED" => Ok(State::Closed), - "STATE_FLUSHING" => Ok(State::Flushing), - "STATE_FLUSHCOMPLETE" => Ok(State::Flushcomplete), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -11220,260 +7810,3 @@ impl<'de> serde::Deserialize<'de> for Timeout { deserializer.deserialize_struct("ibc.core.channel.v1.Timeout", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for Upgrade { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.Upgrade", len)?; - if let Some(v) = self.fields.as_ref() { - struct_ser.serialize_field("fields", v)?; - } - if let Some(v) = self.timeout.as_ref() { - struct_ser.serialize_field("timeout", v)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("nextSequenceSend", ::alloc::string::ToString::to_string(&self.next_sequence_send).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Upgrade { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "fields", - "timeout", - "next_sequence_send", - "nextSequenceSend", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Fields, - Timeout, - NextSequenceSend, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "fields" => Ok(GeneratedField::Fields), - "timeout" => Ok(GeneratedField::Timeout), - "nextSequenceSend" | "next_sequence_send" => Ok(GeneratedField::NextSequenceSend), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Upgrade; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.Upgrade") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut fields__ = None; - let mut timeout__ = None; - let mut next_sequence_send__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Fields => { - if fields__.is_some() { - return Err(serde::de::Error::duplicate_field("fields")); - } - fields__ = map_.next_value()?; - } - GeneratedField::Timeout => { - if timeout__.is_some() { - return Err(serde::de::Error::duplicate_field("timeout")); - } - timeout__ = map_.next_value()?; - } - GeneratedField::NextSequenceSend => { - if next_sequence_send__.is_some() { - return Err(serde::de::Error::duplicate_field("nextSequenceSend")); - } - next_sequence_send__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(Upgrade { - fields: fields__, - timeout: timeout__, - next_sequence_send: next_sequence_send__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.Upgrade", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for UpgradeFields { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("ibc.core.channel.v1.UpgradeFields", len)?; - if true { - let v = Order::try_from(self.ordering) - .map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.ordering)))?; - struct_ser.serialize_field("ordering", &v)?; - } - if true { - struct_ser.serialize_field("connectionHops", &self.connection_hops)?; - } - if true { - struct_ser.serialize_field("version", &self.version)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for UpgradeFields { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "ordering", - "connection_hops", - "connectionHops", - "version", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Ordering, - ConnectionHops, - Version, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "ordering" => Ok(GeneratedField::Ordering), - "connectionHops" | "connection_hops" => Ok(GeneratedField::ConnectionHops), - "version" => Ok(GeneratedField::Version), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = UpgradeFields; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct ibc.core.channel.v1.UpgradeFields") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut ordering__ = None; - let mut connection_hops__ = None; - let mut version__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Ordering => { - if ordering__.is_some() { - return Err(serde::de::Error::duplicate_field("ordering")); - } - ordering__ = Some(map_.next_value::()? as i32); - } - GeneratedField::ConnectionHops => { - if connection_hops__.is_some() { - return Err(serde::de::Error::duplicate_field("connectionHops")); - } - connection_hops__ = Some(map_.next_value()?); - } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = Some(map_.next_value()?); - } - } - } - Ok(UpgradeFields { - ordering: ordering__.unwrap_or_default(), - connection_hops: connection_hops__.unwrap_or_default(), - version: version__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("ibc.core.channel.v1.UpgradeFields", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/ibc.core.client.v1.rs b/src/prost/ibc.core.client.v1.rs index fe2f63e7..fc33ec80 100644 --- a/src/prost/ibc.core.client.v1.rs +++ b/src/prost/ibc.core.client.v1.rs @@ -1364,7 +1364,7 @@ pub struct QueryConsensusStateRequest { /// consensus state revision height #[prost(uint64, tag = "3")] pub revision_height: u64, - /// latest_height overrides the height field and queries the latest stored + /// latest_height overrrides the height field and queries the latest stored /// ConsensusState #[prost(bool, tag = "4")] pub latest_height: bool, diff --git a/src/prost/ibc.core.connection.v1.rs b/src/prost/ibc.core.connection.v1.rs index dff9ada1..01a54671 100644 --- a/src/prost/ibc.core.connection.v1.rs +++ b/src/prost/ibc.core.connection.v1.rs @@ -127,7 +127,7 @@ impl ::prost::Name for ConnectionPaths { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// Version defines the versioning scheme used to negotiate the IBC version in +/// Version defines the versioning scheme used to negotiate the IBC verison in /// the connection handshake. #[cfg_attr( all(feature = "json-schema", feature = "serde"), @@ -285,7 +285,7 @@ pub struct MsgConnectionOpenTry { pub counterparty_versions: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "7")] pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain A: `UNINITIALIZED -> + /// proof of the initialization the connection on Chain A: `UNITIALIZED -> /// INIT` #[prost(bytes = "vec", tag = "8")] pub proof_init: ::prost::alloc::vec::Vec, @@ -338,7 +338,7 @@ pub struct MsgConnectionOpenAck { >, #[prost(message, optional, tag = "5")] pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain B: `UNINITIALIZED -> + /// proof of the initialization the connection on Chain B: `UNITIALIZED -> /// TRYOPEN` #[prost(bytes = "vec", tag = "6")] pub proof_try: ::prost::alloc::vec::Vec, diff --git a/src/prost/ibc.lightclients.wasm.v1.rs b/src/prost/ibc.lightclients.wasm.v1.rs index e540fc45..0d4a2936 100644 --- a/src/prost/ibc.lightclients.wasm.v1.rs +++ b/src/prost/ibc.lightclients.wasm.v1.rs @@ -731,7 +731,7 @@ pub mod query_client { .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Checksums")); self.inner.unary(req, path, codec).await } - /// Get Wasm code for given checksum + /// Get Wasm code for given code hash pub async fn code( &mut self, request: impl tonic::IntoRequest, @@ -775,7 +775,7 @@ pub mod query_server { tonic::Response, tonic::Status, >; - /// Get Wasm code for given checksum + /// Get Wasm code for given code hash async fn code( &self, request: tonic::Request, diff --git a/src/prost/proto_descriptor.bin b/src/prost/proto_descriptor.bin index 0a60db52..ae805c55 100644 Binary files a/src/prost/proto_descriptor.bin and b/src/prost/proto_descriptor.bin differ