From a2d1abc6d9179cf15209dfd2147a9d9f9235afce Mon Sep 17 00:00:00 2001 From: Ash Date: Sat, 1 Jun 2024 15:50:21 -0700 Subject: [PATCH 01/31] add serde definitions --- cosmos-sdk-proto/Cargo.toml | 1 + .../cosmos-sdk/cosmos.app.module.v1alpha1.rs | 1 + .../cosmos.app.module.v1alpha1.serde.rs | 76 + .../prost/cosmos-sdk/cosmos.app.v1alpha1.rs | 1 + .../cosmos-sdk/cosmos.app.v1alpha1.serde.rs | 728 ++ .../prost/cosmos-sdk/cosmos.auth.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.auth.v1beta1.serde.rs | 2351 ++++ .../prost/cosmos-sdk/cosmos.authz.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.authz.v1beta1.serde.rs | 2143 ++++ .../prost/cosmos-sdk/cosmos.bank.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.bank.v1beta1.serde.rs | 3636 ++++++ .../cosmos-sdk/cosmos.base.abci.v1beta1.rs | 1 + .../cosmos.base.abci.v1beta1.serde.rs | 1494 +++ .../cosmos-sdk/cosmos.base.kv.v1beta1.rs | 1 + .../cosmos.base.kv.v1beta1.serde.rs | 211 + .../cosmos-sdk/cosmos.base.node.v1beta1.rs | 1 + .../cosmos.base.node.v1beta1.serde.rs | 176 + .../cosmos-sdk/cosmos.base.query.v1beta1.rs | 1 + .../cosmos.base.query.v1beta1.serde.rs | 301 + .../cosmos.base.reflection.v1beta1.rs | 1 + .../cosmos.base.reflection.v1beta1.serde.rs | 402 + .../cosmos.base.reflection.v2alpha1.rs | 1 + .../cosmos.base.reflection.v2alpha1.serde.rs | 2797 +++++ .../cosmos.base.snapshots.v1beta1.rs | 1 + .../cosmos.base.snapshots.v1beta1.serde.rs | 1177 ++ .../cosmos-sdk/cosmos.base.store.v1beta1.rs | 1 + .../cosmos.base.store.v1beta1.serde.rs | 823 ++ .../cosmos.base.tendermint.v1beta1.rs | 1 + .../cosmos.base.tendermint.v1beta1.serde.rs | 3037 +++++ .../prost/cosmos-sdk/cosmos.base.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.base.v1beta1.serde.rs | 401 + .../cosmos-sdk/cosmos.capability.v1beta1.rs | 1 + .../cosmos.capability.v1beta1.serde.rs | 538 + .../prost/cosmos-sdk/cosmos.crisis.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.crisis.v1beta1.serde.rs | 318 + .../prost/cosmos-sdk/cosmos.crypto.ed25519.rs | 1 + .../cosmos-sdk/cosmos.crypto.ed25519.serde.rs | 193 + .../prost/cosmos-sdk/cosmos.crypto.hd.v1.rs | 1 + .../cosmos-sdk/cosmos.crypto.hd.v1.serde.rs | 177 + .../cosmos-sdk/cosmos.crypto.keyring.v1.rs | 1 + .../cosmos.crypto.keyring.v1.serde.rs | 516 + .../cosmos-sdk/cosmos.crypto.multisig.rs | 1 + .../cosmos.crypto.multisig.serde.rs | 117 + .../cosmos.crypto.multisig.v1beta1.rs | 1 + .../cosmos.crypto.multisig.v1beta1.serde.rs | 234 + .../cosmos-sdk/cosmos.crypto.secp256k1.rs | 1 + .../cosmos.crypto.secp256k1.serde.rs | 193 + .../cosmos-sdk/cosmos.crypto.secp256r1.rs | 1 + .../cosmos.crypto.secp256r1.serde.rs | 195 + .../cosmos-sdk/cosmos.distribution.v1beta1.rs | 1 + .../cosmos.distribution.v1beta1.serde.rs | 5559 ++++++++++ .../cosmos-sdk/cosmos.evidence.v1beta1.rs | 1 + .../cosmos.evidence.v1beta1.serde.rs | 893 ++ .../cosmos-sdk/cosmos.feegrant.v1beta1.rs | 1 + .../cosmos.feegrant.v1beta1.serde.rs | 1710 +++ .../cosmos-sdk/cosmos.genutil.v1beta1.rs | 1 + .../cosmos.genutil.v1beta1.serde.rs | 110 + .../src/prost/cosmos-sdk/cosmos.gov.v1.rs | 1 + .../prost/cosmos-sdk/cosmos.gov.v1.serde.rs | 4410 ++++++++ .../prost/cosmos-sdk/cosmos.gov.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.gov.v1beta1.serde.rs | 4304 ++++++++ .../src/prost/cosmos-sdk/cosmos.group.v1.rs | 1 + .../prost/cosmos-sdk/cosmos.group.v1.serde.rs | 9777 +++++++++++++++++ .../prost/cosmos-sdk/cosmos.mint.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.mint.v1beta1.serde.rs | 964 ++ .../prost/cosmos-sdk/cosmos.nft.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.nft.v1beta1.serde.rs | 2647 +++++ .../cosmos-sdk/cosmos.orm.module.v1alpha1.rs | 1 + .../cosmos.orm.module.v1alpha1.serde.rs | 76 + .../src/prost/cosmos-sdk/cosmos.orm.v1.rs | 1 + .../prost/cosmos-sdk/cosmos.orm.v1.serde.rs | 476 + .../prost/cosmos-sdk/cosmos.orm.v1alpha1.rs | 1 + .../cosmos-sdk/cosmos.orm.v1alpha1.serde.rs | 351 + .../prost/cosmos-sdk/cosmos.params.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.params.v1beta1.serde.rs | 757 ++ .../cosmos-sdk/cosmos.slashing.v1beta1.rs | 1 + .../cosmos.slashing.v1beta1.serde.rs | 1668 +++ .../cosmos-sdk/cosmos.staking.v1beta1.rs | 1 + .../cosmos.staking.v1beta1.serde.rs | 8228 ++++++++++++++ .../cosmos-sdk/cosmos.tx.signing.v1beta1.rs | 1 + .../cosmos.tx.signing.v1beta1.serde.rs | 679 ++ .../src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs | 1 + .../cosmos-sdk/cosmos.tx.v1beta1.serde.rs | 3220 ++++++ .../cosmos-sdk/cosmos.upgrade.v1beta1.rs | 1 + .../cosmos.upgrade.v1beta1.serde.rs | 1886 ++++ .../cosmos-sdk/cosmos.vesting.v1beta1.rs | 1 + .../cosmos.vesting.v1beta1.serde.rs | 1505 +++ .../src/prost/cosmos-sdk/cosmos_proto.rs | 1 + .../prost/cosmos-sdk/cosmos_proto.serde.rs | 328 + proto-build/buf.sdk.gen.yaml | 4 + 90 files changed, 71831 insertions(+) create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 621746f2..8ca92920 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -19,6 +19,7 @@ rust-version = "1.72" prost = "0.12.3" prost-types = "0.12" tendermint-proto = "0.37" +serde = "1.0.203" # Optional dependencies tonic = { version = "0.11", optional = true, default-features = false, features = ["codegen", "prost"] } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs index c37f344f..db42719c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs @@ -2,4 +2,5 @@ /// Module is the module config object for the cosmos.app v1 app module. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module {} +include!("cosmos.app.module.v1alpha1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs new file mode 100644 index 00000000..830eadab --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs @@ -0,0 +1,76 @@ +// @generated +impl serde::Serialize for Module { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.app.module.v1alpha1.Module", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Module { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = Module; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.app.module.v1alpha1.Module") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(Module {}) + } + } + deserializer.deserialize_struct( + "cosmos.app.module.v1alpha1.Module", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs index e857bec1..c3805f04 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs @@ -119,5 +119,6 @@ pub struct QueryConfigResponse { #[prost(message, optional, tag = "1")] pub config: ::core::option::Option, } +include!("cosmos.app.v1alpha1.serde.rs"); include!("cosmos.app.v1alpha1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs new file mode 100644 index 00000000..f4300d8c --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs @@ -0,0 +1,728 @@ +// @generated +impl serde::Serialize for Config { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.modules.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.app.v1alpha1.Config", len)?; + if !self.modules.is_empty() { + struct_ser.serialize_field("modules", &self.modules)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Config { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["modules"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Modules, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "modules" => Ok(GeneratedField::Modules), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Config; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.app.v1alpha1.Config") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut modules__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Modules => { + if modules__.is_some() { + return Err(serde::de::Error::duplicate_field("modules")); + } + modules__ = Some(map.next_value()?); + } + } + } + Ok(Config { + modules: modules__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.app.v1alpha1.Config", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MigrateFromInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.module.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.app.v1alpha1.MigrateFromInfo", len)?; + if !self.module.is_empty() { + struct_ser.serialize_field("module", &self.module)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MigrateFromInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["module"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Module, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "module" => Ok(GeneratedField::Module), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MigrateFromInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.app.v1alpha1.MigrateFromInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut module__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Module => { + if module__.is_some() { + return Err(serde::de::Error::duplicate_field("module")); + } + module__ = Some(map.next_value()?); + } + } + } + Ok(MigrateFromInfo { + module: module__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.app.v1alpha1.MigrateFromInfo", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ModuleConfig { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if self.config.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.app.v1alpha1.ModuleConfig", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if let Some(v) = self.config.as_ref() { + struct_ser.serialize_field("config", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ModuleConfig { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "config"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Config, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "config" => Ok(GeneratedField::Config), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ModuleConfig; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.app.v1alpha1.ModuleConfig") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut config__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Config => { + if config__.is_some() { + return Err(serde::de::Error::duplicate_field("config")); + } + config__ = map.next_value()?; + } + } + } + Ok(ModuleConfig { + name: name__.unwrap_or_default(), + config: config__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.app.v1alpha1.ModuleConfig", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ModuleDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.go_import.is_empty() { + len += 1; + } + if !self.use_package.is_empty() { + len += 1; + } + if !self.can_migrate_from.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.app.v1alpha1.ModuleDescriptor", len)?; + if !self.go_import.is_empty() { + struct_ser.serialize_field("goImport", &self.go_import)?; + } + if !self.use_package.is_empty() { + struct_ser.serialize_field("usePackage", &self.use_package)?; + } + if !self.can_migrate_from.is_empty() { + struct_ser.serialize_field("canMigrateFrom", &self.can_migrate_from)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ModuleDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "go_import", + "goImport", + "use_package", + "usePackage", + "can_migrate_from", + "canMigrateFrom", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GoImport, + UsePackage, + CanMigrateFrom, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "goImport" | "go_import" => Ok(GeneratedField::GoImport), + "usePackage" | "use_package" => Ok(GeneratedField::UsePackage), + "canMigrateFrom" | "can_migrate_from" => { + Ok(GeneratedField::CanMigrateFrom) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ModuleDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.app.v1alpha1.ModuleDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut go_import__ = None; + let mut use_package__ = None; + let mut can_migrate_from__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GoImport => { + if go_import__.is_some() { + return Err(serde::de::Error::duplicate_field("goImport")); + } + go_import__ = Some(map.next_value()?); + } + GeneratedField::UsePackage => { + if use_package__.is_some() { + return Err(serde::de::Error::duplicate_field("usePackage")); + } + use_package__ = Some(map.next_value()?); + } + GeneratedField::CanMigrateFrom => { + if can_migrate_from__.is_some() { + return Err(serde::de::Error::duplicate_field("canMigrateFrom")); + } + can_migrate_from__ = Some(map.next_value()?); + } + } + } + Ok(ModuleDescriptor { + go_import: go_import__.unwrap_or_default(), + use_package: use_package__.unwrap_or_default(), + can_migrate_from: can_migrate_from__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.app.v1alpha1.ModuleDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for PackageReference { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if self.revision != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.app.v1alpha1.PackageReference", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if self.revision != 0 { + struct_ser.serialize_field("revision", &self.revision)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PackageReference { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "revision"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Revision, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "revision" => Ok(GeneratedField::Revision), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PackageReference; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.app.v1alpha1.PackageReference") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut revision__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Revision => { + if revision__.is_some() { + return Err(serde::de::Error::duplicate_field("revision")); + } + revision__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PackageReference { + name: name__.unwrap_or_default(), + revision: revision__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.app.v1alpha1.PackageReference", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryConfigRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.app.v1alpha1.QueryConfigRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryConfigRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryConfigRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.app.v1alpha1.QueryConfigRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryConfigRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.app.v1alpha1.QueryConfigRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryConfigResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.config.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.app.v1alpha1.QueryConfigResponse", len)?; + if let Some(v) = self.config.as_ref() { + struct_ser.serialize_field("config", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryConfigResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["config"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Config, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "config" => Ok(GeneratedField::Config), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryConfigResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.app.v1alpha1.QueryConfigResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut config__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Config => { + if config__.is_some() { + return Err(serde::de::Error::duplicate_field("config")); + } + config__ = map.next_value()?; + } + } + } + Ok(QueryConfigResponse { config: config__ }) + } + } + deserializer.deserialize_struct( + "cosmos.app.v1alpha1.QueryConfigResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs index e14153ef..e36ab0b9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs @@ -181,5 +181,6 @@ pub struct QueryAccountAddressByIdResponse { #[prost(string, tag = "1")] pub account_address: ::prost::alloc::string::String, } +include!("cosmos.auth.v1beta1.serde.rs"); include!("cosmos.auth.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs new file mode 100644 index 00000000..e6f20df2 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs @@ -0,0 +1,2351 @@ +// @generated +impl serde::Serialize for AddressBytesToStringRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address_bytes.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.AddressBytesToStringRequest", len)?; + if !self.address_bytes.is_empty() { + struct_ser.serialize_field( + "addressBytes", + pbjson::private::base64::encode(&self.address_bytes).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address_bytes", "addressBytes"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AddressBytes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "addressBytes" | "address_bytes" => Ok(GeneratedField::AddressBytes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AddressBytesToStringRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.AddressBytesToStringRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address_bytes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::AddressBytes => { + if address_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("addressBytes")); + } + address_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(AddressBytesToStringRequest { + address_bytes: address_bytes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.AddressBytesToStringRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AddressBytesToStringResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address_string.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.AddressBytesToStringResponse", len)?; + if !self.address_string.is_empty() { + struct_ser.serialize_field("addressString", &self.address_string)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address_string", "addressString"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AddressString, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "addressString" | "address_string" => Ok(GeneratedField::AddressString), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AddressBytesToStringResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.AddressBytesToStringResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address_string__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::AddressString => { + if address_string__.is_some() { + return Err(serde::de::Error::duplicate_field("addressString")); + } + address_string__ = Some(map.next_value()?); + } + } + } + Ok(AddressBytesToStringResponse { + address_string: address_string__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.AddressBytesToStringResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AddressStringToBytesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address_string.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.AddressStringToBytesRequest", len)?; + if !self.address_string.is_empty() { + struct_ser.serialize_field("addressString", &self.address_string)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address_string", "addressString"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AddressString, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "addressString" | "address_string" => Ok(GeneratedField::AddressString), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AddressStringToBytesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.AddressStringToBytesRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address_string__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::AddressString => { + if address_string__.is_some() { + return Err(serde::de::Error::duplicate_field("addressString")); + } + address_string__ = Some(map.next_value()?); + } + } + } + Ok(AddressStringToBytesRequest { + address_string: address_string__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.AddressStringToBytesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AddressStringToBytesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address_bytes.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.AddressStringToBytesResponse", len)?; + if !self.address_bytes.is_empty() { + struct_ser.serialize_field( + "addressBytes", + pbjson::private::base64::encode(&self.address_bytes).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address_bytes", "addressBytes"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AddressBytes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "addressBytes" | "address_bytes" => Ok(GeneratedField::AddressBytes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AddressStringToBytesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.AddressStringToBytesResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address_bytes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::AddressBytes => { + if address_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("addressBytes")); + } + address_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(AddressStringToBytesResponse { + address_bytes: address_bytes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.AddressStringToBytesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for BaseAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.pub_key.is_some() { + len += 1; + } + if self.account_number != 0 { + len += 1; + } + if self.sequence != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.BaseAccount", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pub_key.as_ref() { + struct_ser.serialize_field("pubKey", v)?; + } + if self.account_number != 0 { + struct_ser.serialize_field( + "accountNumber", + ToString::to_string(&self.account_number).as_str(), + )?; + } + if self.sequence != 0 { + struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BaseAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + "pub_key", + "pubKey", + "account_number", + "accountNumber", + "sequence", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + PubKey, + AccountNumber, + Sequence, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "pubKey" | "pub_key" => Ok(GeneratedField::PubKey), + "accountNumber" | "account_number" => Ok(GeneratedField::AccountNumber), + "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 = BaseAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.BaseAccount") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut pub_key__ = None; + let mut account_number__ = None; + let mut sequence__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::PubKey => { + if pub_key__.is_some() { + return Err(serde::de::Error::duplicate_field("pubKey")); + } + pub_key__ = map.next_value()?; + } + GeneratedField::AccountNumber => { + if account_number__.is_some() { + return Err(serde::de::Error::duplicate_field("accountNumber")); + } + account_number__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Sequence => { + if sequence__.is_some() { + return Err(serde::de::Error::duplicate_field("sequence")); + } + sequence__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(BaseAccount { + address: address__.unwrap_or_default(), + pub_key: pub_key__, + account_number: account_number__.unwrap_or_default(), + sequence: sequence__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.auth.v1beta1.BaseAccount", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Bech32PrefixRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.Bech32PrefixRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = Bech32PrefixRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.Bech32PrefixRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(Bech32PrefixRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.Bech32PrefixRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Bech32PrefixResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.bech32_prefix.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.Bech32PrefixResponse", len)?; + if !self.bech32_prefix.is_empty() { + struct_ser.serialize_field("bech32Prefix", &self.bech32_prefix)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["bech32_prefix", "bech32Prefix"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Bech32Prefix, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "bech32Prefix" | "bech32_prefix" => Ok(GeneratedField::Bech32Prefix), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Bech32PrefixResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.Bech32PrefixResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut bech32_prefix__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Bech32Prefix => { + if bech32_prefix__.is_some() { + return Err(serde::de::Error::duplicate_field("bech32Prefix")); + } + bech32_prefix__ = Some(map.next_value()?); + } + } + } + Ok(Bech32PrefixResponse { + bech32_prefix: bech32_prefix__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.Bech32PrefixResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + if !self.accounts.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.GenesisState", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + if !self.accounts.is_empty() { + struct_ser.serialize_field("accounts", &self.accounts)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params", "accounts"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + Accounts, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "params" => Ok(GeneratedField::Params), + "accounts" => Ok(GeneratedField::Accounts), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + let mut accounts__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + GeneratedField::Accounts => { + if accounts__.is_some() { + return Err(serde::de::Error::duplicate_field("accounts")); + } + accounts__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + params: params__, + accounts: accounts__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ModuleAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.base_account.is_some() { + len += 1; + } + if !self.name.is_empty() { + len += 1; + } + if !self.permissions.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.ModuleAccount", len)?; + if let Some(v) = self.base_account.as_ref() { + struct_ser.serialize_field("baseAccount", v)?; + } + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.permissions.is_empty() { + struct_ser.serialize_field("permissions", &self.permissions)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ModuleAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["base_account", "baseAccount", "name", "permissions"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BaseAccount, + Name, + Permissions, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "baseAccount" | "base_account" => Ok(GeneratedField::BaseAccount), + "name" => Ok(GeneratedField::Name), + "permissions" => Ok(GeneratedField::Permissions), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ModuleAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.ModuleAccount") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut base_account__ = None; + let mut name__ = None; + let mut permissions__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BaseAccount => { + if base_account__.is_some() { + return Err(serde::de::Error::duplicate_field("baseAccount")); + } + base_account__ = map.next_value()?; + } + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Permissions => { + if permissions__.is_some() { + return Err(serde::de::Error::duplicate_field("permissions")); + } + permissions__ = Some(map.next_value()?); + } + } + } + Ok(ModuleAccount { + base_account: base_account__, + name: name__.unwrap_or_default(), + permissions: permissions__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.ModuleAccount", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Params { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.max_memo_characters != 0 { + len += 1; + } + if self.tx_sig_limit != 0 { + len += 1; + } + if self.tx_size_cost_per_byte != 0 { + len += 1; + } + if self.sig_verify_cost_ed25519 != 0 { + len += 1; + } + if self.sig_verify_cost_secp256k1 != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.Params", len)?; + if self.max_memo_characters != 0 { + struct_ser.serialize_field( + "maxMemoCharacters", + ToString::to_string(&self.max_memo_characters).as_str(), + )?; + } + if self.tx_sig_limit != 0 { + struct_ser.serialize_field( + "txSigLimit", + ToString::to_string(&self.tx_sig_limit).as_str(), + )?; + } + if self.tx_size_cost_per_byte != 0 { + struct_ser.serialize_field( + "txSizeCostPerByte", + ToString::to_string(&self.tx_size_cost_per_byte).as_str(), + )?; + } + if self.sig_verify_cost_ed25519 != 0 { + struct_ser.serialize_field( + "sigVerifyCostEd25519", + ToString::to_string(&self.sig_verify_cost_ed25519).as_str(), + )?; + } + if self.sig_verify_cost_secp256k1 != 0 { + struct_ser.serialize_field( + "sigVerifyCostSecp256k1", + ToString::to_string(&self.sig_verify_cost_secp256k1).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Params { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "max_memo_characters", + "maxMemoCharacters", + "tx_sig_limit", + "txSigLimit", + "tx_size_cost_per_byte", + "txSizeCostPerByte", + "sig_verify_cost_ed25519", + "sigVerifyCostEd25519", + "sig_verify_cost_secp256k1", + "sigVerifyCostSecp256k1", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MaxMemoCharacters, + TxSigLimit, + TxSizeCostPerByte, + SigVerifyCostEd25519, + SigVerifyCostSecp256k1, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "maxMemoCharacters" | "max_memo_characters" => { + Ok(GeneratedField::MaxMemoCharacters) + } + "txSigLimit" | "tx_sig_limit" => Ok(GeneratedField::TxSigLimit), + "txSizeCostPerByte" | "tx_size_cost_per_byte" => { + Ok(GeneratedField::TxSizeCostPerByte) + } + "sigVerifyCostEd25519" | "sig_verify_cost_ed25519" => { + Ok(GeneratedField::SigVerifyCostEd25519) + } + "sigVerifyCostSecp256k1" | "sig_verify_cost_secp256k1" => { + Ok(GeneratedField::SigVerifyCostSecp256k1) + } + _ => 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 std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.Params") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut max_memo_characters__ = None; + let mut tx_sig_limit__ = None; + let mut tx_size_cost_per_byte__ = None; + let mut sig_verify_cost_ed25519__ = None; + let mut sig_verify_cost_secp256k1__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MaxMemoCharacters => { + if max_memo_characters__.is_some() { + return Err(serde::de::Error::duplicate_field("maxMemoCharacters")); + } + max_memo_characters__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::TxSigLimit => { + if tx_sig_limit__.is_some() { + return Err(serde::de::Error::duplicate_field("txSigLimit")); + } + tx_sig_limit__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::TxSizeCostPerByte => { + if tx_size_cost_per_byte__.is_some() { + return Err(serde::de::Error::duplicate_field("txSizeCostPerByte")); + } + tx_size_cost_per_byte__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::SigVerifyCostEd25519 => { + if sig_verify_cost_ed25519__.is_some() { + return Err(serde::de::Error::duplicate_field( + "sigVerifyCostEd25519", + )); + } + sig_verify_cost_ed25519__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::SigVerifyCostSecp256k1 => { + if sig_verify_cost_secp256k1__.is_some() { + return Err(serde::de::Error::duplicate_field( + "sigVerifyCostSecp256k1", + )); + } + sig_verify_cost_secp256k1__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Params { + max_memo_characters: max_memo_characters__.unwrap_or_default(), + tx_sig_limit: tx_sig_limit__.unwrap_or_default(), + tx_size_cost_per_byte: tx_size_cost_per_byte__.unwrap_or_default(), + sig_verify_cost_ed25519: sig_verify_cost_ed25519__.unwrap_or_default(), + sig_verify_cost_secp256k1: sig_verify_cost_secp256k1__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.auth.v1beta1.Params", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryAccountAddressByIdRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.id != 0 { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", len)?; + if self.id != 0 { + struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["id"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAccountAddressByIdRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountAddressByIDRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryAccountAddressByIdRequest { + id: id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAccountAddressByIdResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.account_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", len)?; + if !self.account_address.is_empty() { + struct_ser.serialize_field("accountAddress", &self.account_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["account_address", "accountAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AccountAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "accountAddress" | "account_address" => { + Ok(GeneratedField::AccountAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAccountAddressByIdResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut account_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::AccountAddress => { + if account_address__.is_some() { + return Err(serde::de::Error::duplicate_field("accountAddress")); + } + account_address__ = Some(map.next_value()?); + } + } + } + Ok(QueryAccountAddressByIdResponse { + account_address: account_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAccountRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAccountRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAccountRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(QueryAccountRequest { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryAccountRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAccountResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.account.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountResponse", len)?; + if let Some(v) = self.account.as_ref() { + struct_ser.serialize_field("account", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAccountResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["account"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Account, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "account" => Ok(GeneratedField::Account), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAccountResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut account__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Account => { + if account__.is_some() { + return Err(serde::de::Error::duplicate_field("account")); + } + account__ = map.next_value()?; + } + } + } + Ok(QueryAccountResponse { account: account__ }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryAccountResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAccountsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountsRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAccountsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAccountsRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryAccountsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAccountsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.accounts.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.QueryAccountsResponse", len)?; + if !self.accounts.is_empty() { + struct_ser.serialize_field("accounts", &self.accounts)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["accounts", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Accounts, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "accounts" => Ok(GeneratedField::Accounts), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAccountsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut accounts__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Accounts => { + if accounts__.is_some() { + return Err(serde::de::Error::duplicate_field("accounts")); + } + accounts__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAccountsResponse { + accounts: accounts__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryAccountsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryModuleAccountByNameRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryModuleAccountByNameRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryModuleAccountByNameRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + } + } + Ok(QueryModuleAccountByNameRequest { + name: name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryModuleAccountByNameResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.account.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", len)?; + if let Some(v) = self.account.as_ref() { + struct_ser.serialize_field("account", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["account"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Account, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "account" => Ok(GeneratedField::Account), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryModuleAccountByNameResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryModuleAccountByNameResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut account__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Account => { + if account__.is_some() { + return Err(serde::de::Error::duplicate_field("account")); + } + account__ = map.next_value()?; + } + } + } + Ok(QueryModuleAccountByNameResponse { account: account__ }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryModuleAccountsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.QueryModuleAccountsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryModuleAccountsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryModuleAccountsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryModuleAccountsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryModuleAccountsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryModuleAccountsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.accounts.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.QueryModuleAccountsResponse", len)?; + if !self.accounts.is_empty() { + struct_ser.serialize_field("accounts", &self.accounts)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["accounts"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Accounts, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "accounts" => Ok(GeneratedField::Accounts), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryModuleAccountsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryModuleAccountsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut accounts__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Accounts => { + if accounts__.is_some() { + return Err(serde::de::Error::duplicate_field("accounts")); + } + accounts__ = Some(map.next_value()?); + } + } + } + Ok(QueryModuleAccountsResponse { + accounts: accounts__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryModuleAccountsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.QueryParamsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryParamsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.auth.v1beta1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.auth.v1beta1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { params: params__ }) + } + } + deserializer.deserialize_struct( + "cosmos.auth.v1beta1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs index 8d38d9f9..3ef99f18 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs @@ -180,5 +180,6 @@ pub struct MsgRevoke { /// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeResponse {} +include!("cosmos.authz.v1beta1.serde.rs"); include!("cosmos.authz.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs new file mode 100644 index 00000000..16dce0fa --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs @@ -0,0 +1,2143 @@ +// @generated +impl serde::Serialize for EventGrant { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.msg_type_url.is_empty() { + len += 1; + } + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.authz.v1beta1.EventGrant", len)?; + if !self.msg_type_url.is_empty() { + struct_ser.serialize_field("msgTypeUrl", &self.msg_type_url)?; + } + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventGrant { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["msg_type_url", "msgTypeUrl", "granter", "grantee"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MsgTypeUrl, + Granter, + Grantee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "msgTypeUrl" | "msg_type_url" => Ok(GeneratedField::MsgTypeUrl), + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventGrant; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.EventGrant") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut msg_type_url__ = None; + let mut granter__ = None; + let mut grantee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MsgTypeUrl => { + if msg_type_url__.is_some() { + return Err(serde::de::Error::duplicate_field("msgTypeUrl")); + } + msg_type_url__ = Some(map.next_value()?); + } + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + } + } + Ok(EventGrant { + msg_type_url: msg_type_url__.unwrap_or_default(), + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.authz.v1beta1.EventGrant", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for EventRevoke { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.msg_type_url.is_empty() { + len += 1; + } + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.EventRevoke", len)?; + if !self.msg_type_url.is_empty() { + struct_ser.serialize_field("msgTypeUrl", &self.msg_type_url)?; + } + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventRevoke { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["msg_type_url", "msgTypeUrl", "granter", "grantee"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MsgTypeUrl, + Granter, + Grantee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "msgTypeUrl" | "msg_type_url" => Ok(GeneratedField::MsgTypeUrl), + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventRevoke; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.EventRevoke") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut msg_type_url__ = None; + let mut granter__ = None; + let mut grantee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MsgTypeUrl => { + if msg_type_url__.is_some() { + return Err(serde::de::Error::duplicate_field("msgTypeUrl")); + } + msg_type_url__ = Some(map.next_value()?); + } + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + } + } + Ok(EventRevoke { + msg_type_url: msg_type_url__.unwrap_or_default(), + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.EventRevoke", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenericAuthorization { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.msg.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.GenericAuthorization", len)?; + if !self.msg.is_empty() { + struct_ser.serialize_field("msg", &self.msg)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenericAuthorization { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["msg"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenericAuthorization; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.GenericAuthorization") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut msg__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some(map.next_value()?); + } + } + } + Ok(GenericAuthorization { + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.GenericAuthorization", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.authorization.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.GenesisState", len)?; + if !self.authorization.is_empty() { + struct_ser.serialize_field("authorization", &self.authorization)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["authorization"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authorization, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authorization" => Ok(GeneratedField::Authorization), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authorization__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Authorization => { + if authorization__.is_some() { + return Err(serde::de::Error::duplicate_field("authorization")); + } + authorization__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + authorization: authorization__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Grant { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.authorization.is_some() { + len += 1; + } + if self.expiration.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.authz.v1beta1.Grant", len)?; + if let Some(v) = self.authorization.as_ref() { + struct_ser.serialize_field("authorization", v)?; + } + if let Some(v) = self.expiration.as_ref() { + struct_ser.serialize_field("expiration", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Grant { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["authorization", "expiration"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authorization, + Expiration, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authorization" => Ok(GeneratedField::Authorization), + "expiration" => Ok(GeneratedField::Expiration), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Grant; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.Grant") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authorization__ = None; + let mut expiration__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Authorization => { + if authorization__.is_some() { + return Err(serde::de::Error::duplicate_field("authorization")); + } + authorization__ = map.next_value()?; + } + GeneratedField::Expiration => { + if expiration__.is_some() { + return Err(serde::de::Error::duplicate_field("expiration")); + } + expiration__ = map.next_value()?; + } + } + } + Ok(Grant { + authorization: authorization__, + expiration: expiration__, + }) + } + } + deserializer.deserialize_struct("cosmos.authz.v1beta1.Grant", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GrantAuthorization { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + if self.authorization.is_some() { + len += 1; + } + if self.expiration.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.GrantAuthorization", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if let Some(v) = self.authorization.as_ref() { + struct_ser.serialize_field("authorization", v)?; + } + if let Some(v) = self.expiration.as_ref() { + struct_ser.serialize_field("expiration", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GrantAuthorization { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "grantee", "authorization", "expiration"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Grantee, + Authorization, + Expiration, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + "authorization" => Ok(GeneratedField::Authorization), + "expiration" => Ok(GeneratedField::Expiration), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GrantAuthorization; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.GrantAuthorization") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut grantee__ = None; + let mut authorization__ = None; + let mut expiration__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::Authorization => { + if authorization__.is_some() { + return Err(serde::de::Error::duplicate_field("authorization")); + } + authorization__ = map.next_value()?; + } + GeneratedField::Expiration => { + if expiration__.is_some() { + return Err(serde::de::Error::duplicate_field("expiration")); + } + expiration__ = map.next_value()?; + } + } + } + Ok(GrantAuthorization { + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + authorization: authorization__, + expiration: expiration__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.GrantAuthorization", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GrantQueueItem { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.msg_type_urls.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.GrantQueueItem", len)?; + if !self.msg_type_urls.is_empty() { + struct_ser.serialize_field("msgTypeUrls", &self.msg_type_urls)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GrantQueueItem { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["msg_type_urls", "msgTypeUrls"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MsgTypeUrls, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "msgTypeUrls" | "msg_type_urls" => Ok(GeneratedField::MsgTypeUrls), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GrantQueueItem; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.GrantQueueItem") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut msg_type_urls__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MsgTypeUrls => { + if msg_type_urls__.is_some() { + return Err(serde::de::Error::duplicate_field("msgTypeUrls")); + } + msg_type_urls__ = Some(map.next_value()?); + } + } + } + Ok(GrantQueueItem { + msg_type_urls: msg_type_urls__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.GrantQueueItem", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgExec { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.grantee.is_empty() { + len += 1; + } + if !self.msgs.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.authz.v1beta1.MsgExec", len)?; + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if !self.msgs.is_empty() { + struct_ser.serialize_field("msgs", &self.msgs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgExec { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["grantee", "msgs"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Grantee, + Msgs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "grantee" => Ok(GeneratedField::Grantee), + "msgs" => Ok(GeneratedField::Msgs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgExec; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.MsgExec") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut grantee__ = None; + let mut msgs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::Msgs => { + if msgs__.is_some() { + return Err(serde::de::Error::duplicate_field("msgs")); + } + msgs__ = Some(map.next_value()?); + } + } + } + Ok(MsgExec { + grantee: grantee__.unwrap_or_default(), + msgs: msgs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgExec", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgExecResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.results.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.MsgExecResponse", len)?; + if !self.results.is_empty() { + struct_ser.serialize_field( + "results", + &self + .results + .iter() + .map(pbjson::private::base64::encode) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgExecResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["results"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Results, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "results" => Ok(GeneratedField::Results), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgExecResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.MsgExecResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut results__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Results => { + if results__.is_some() { + return Err(serde::de::Error::duplicate_field("results")); + } + results__ = Some( + map.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(MsgExecResponse { + results: results__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.MsgExecResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgGrant { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + if self.grant.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.authz.v1beta1.MsgGrant", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if let Some(v) = self.grant.as_ref() { + struct_ser.serialize_field("grant", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgGrant { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "grantee", "grant"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Grantee, + Grant, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + "grant" => Ok(GeneratedField::Grant), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgGrant; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.MsgGrant") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut grantee__ = None; + let mut grant__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::Grant => { + if grant__.is_some() { + return Err(serde::de::Error::duplicate_field("grant")); + } + grant__ = map.next_value()?; + } + } + } + Ok(MsgGrant { + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + grant: grant__, + }) + } + } + deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgGrant", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgGrantResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.MsgGrantResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgGrantResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgGrantResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.MsgGrantResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgGrantResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.MsgGrantResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgRevoke { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + if !self.msg_type_url.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.authz.v1beta1.MsgRevoke", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if !self.msg_type_url.is_empty() { + struct_ser.serialize_field("msgTypeUrl", &self.msg_type_url)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgRevoke { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "grantee", "msg_type_url", "msgTypeUrl"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Grantee, + MsgTypeUrl, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + "msgTypeUrl" | "msg_type_url" => Ok(GeneratedField::MsgTypeUrl), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgRevoke; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.MsgRevoke") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut grantee__ = None; + let mut msg_type_url__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::MsgTypeUrl => { + if msg_type_url__.is_some() { + return Err(serde::de::Error::duplicate_field("msgTypeUrl")); + } + msg_type_url__ = Some(map.next_value()?); + } + } + } + Ok(MsgRevoke { + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + msg_type_url: msg_type_url__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgRevoke", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgRevokeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.MsgRevokeResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgRevokeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgRevokeResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.MsgRevokeResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgRevokeResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.MsgRevokeResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGranteeGrantsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.grantee.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.QueryGranteeGrantsRequest", len)?; + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["grantee", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Grantee, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "grantee" => Ok(GeneratedField::Grantee), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGranteeGrantsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.QueryGranteeGrantsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut grantee__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGranteeGrantsRequest { + grantee: grantee__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.QueryGranteeGrantsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGranteeGrantsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.grants.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.QueryGranteeGrantsResponse", len)?; + if !self.grants.is_empty() { + struct_ser.serialize_field("grants", &self.grants)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["grants", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Grants, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "grants" => Ok(GeneratedField::Grants), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGranteeGrantsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.QueryGranteeGrantsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut grants__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Grants => { + if grants__.is_some() { + return Err(serde::de::Error::duplicate_field("grants")); + } + grants__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGranteeGrantsResponse { + grants: grants__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.QueryGranteeGrantsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGranterGrantsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.QueryGranterGrantsRequest", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGranterGrantsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGranterGrantsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.QueryGranterGrantsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGranterGrantsRequest { + granter: granter__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.QueryGranterGrantsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGranterGrantsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.grants.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.QueryGranterGrantsResponse", len)?; + if !self.grants.is_empty() { + struct_ser.serialize_field("grants", &self.grants)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGranterGrantsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["grants", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Grants, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "grants" => Ok(GeneratedField::Grants), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGranterGrantsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.QueryGranterGrantsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut grants__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Grants => { + if grants__.is_some() { + return Err(serde::de::Error::duplicate_field("grants")); + } + grants__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGranterGrantsResponse { + grants: grants__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.QueryGranterGrantsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGrantsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + if !self.msg_type_url.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.QueryGrantsRequest", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if !self.msg_type_url.is_empty() { + struct_ser.serialize_field("msgTypeUrl", &self.msg_type_url)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "granter", + "grantee", + "msg_type_url", + "msgTypeUrl", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Grantee, + MsgTypeUrl, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + "msgTypeUrl" | "msg_type_url" => Ok(GeneratedField::MsgTypeUrl), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGrantsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.QueryGrantsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut grantee__ = None; + let mut msg_type_url__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::MsgTypeUrl => { + if msg_type_url__.is_some() { + return Err(serde::de::Error::duplicate_field("msgTypeUrl")); + } + msg_type_url__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGrantsRequest { + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + msg_type_url: msg_type_url__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.QueryGrantsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGrantsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.grants.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.authz.v1beta1.QueryGrantsResponse", len)?; + if !self.grants.is_empty() { + struct_ser.serialize_field("grants", &self.grants)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGrantsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["grants", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Grants, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "grants" => Ok(GeneratedField::Grants), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGrantsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.authz.v1beta1.QueryGrantsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut grants__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Grants => { + if grants__.is_some() { + return Err(serde::de::Error::duplicate_field("grants")); + } + grants__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGrantsResponse { + grants: grants__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.authz.v1beta1.QueryGrantsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs index 4574722a..bdfcea12 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs @@ -338,5 +338,6 @@ pub struct MsgMultiSend { /// MsgMultiSendResponse defines the Msg/MultiSend response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMultiSendResponse {} +include!("cosmos.bank.v1beta1.serde.rs"); include!("cosmos.bank.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs new file mode 100644 index 00000000..6e2c8c7b --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs @@ -0,0 +1,3636 @@ +// @generated +impl serde::Serialize for Balance { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.coins.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Balance", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.coins.is_empty() { + struct_ser.serialize_field("coins", &self.coins)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Balance { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "coins"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Coins, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "coins" => Ok(GeneratedField::Coins), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Balance; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.Balance") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut coins__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Coins => { + if coins__.is_some() { + return Err(serde::de::Error::duplicate_field("coins")); + } + coins__ = Some(map.next_value()?); + } + } + } + Ok(Balance { + address: address__.unwrap_or_default(), + coins: coins__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.Balance", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DenomOwner { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.balance.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.DenomOwner", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.balance.as_ref() { + struct_ser.serialize_field("balance", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DenomOwner { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "balance"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Balance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "balance" => Ok(GeneratedField::Balance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DenomOwner; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.DenomOwner") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut balance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Balance => { + if balance__.is_some() { + return Err(serde::de::Error::duplicate_field("balance")); + } + balance__ = map.next_value()?; + } + } + } + Ok(DenomOwner { + address: address__.unwrap_or_default(), + balance: balance__, + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.DenomOwner", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DenomUnit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + if self.exponent != 0 { + len += 1; + } + if !self.aliases.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.DenomUnit", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + if self.exponent != 0 { + struct_ser.serialize_field("exponent", &self.exponent)?; + } + if !self.aliases.is_empty() { + struct_ser.serialize_field("aliases", &self.aliases)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DenomUnit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom", "exponent", "aliases"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + Exponent, + Aliases, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + "exponent" => Ok(GeneratedField::Exponent), + "aliases" => Ok(GeneratedField::Aliases), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DenomUnit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.DenomUnit") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + let mut exponent__ = None; + let mut aliases__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map.next_value()?); + } + GeneratedField::Exponent => { + if exponent__.is_some() { + return Err(serde::de::Error::duplicate_field("exponent")); + } + exponent__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Aliases => { + if aliases__.is_some() { + return Err(serde::de::Error::duplicate_field("aliases")); + } + aliases__ = Some(map.next_value()?); + } + } + } + Ok(DenomUnit { + denom: denom__.unwrap_or_default(), + exponent: exponent__.unwrap_or_default(), + aliases: aliases__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.DenomUnit", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + if !self.balances.is_empty() { + len += 1; + } + if !self.supply.is_empty() { + len += 1; + } + if !self.denom_metadata.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.GenesisState", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + if !self.balances.is_empty() { + struct_ser.serialize_field("balances", &self.balances)?; + } + if !self.supply.is_empty() { + struct_ser.serialize_field("supply", &self.supply)?; + } + if !self.denom_metadata.is_empty() { + struct_ser.serialize_field("denomMetadata", &self.denom_metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "params", + "balances", + "supply", + "denom_metadata", + "denomMetadata", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + Balances, + Supply, + DenomMetadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "params" => Ok(GeneratedField::Params), + "balances" => Ok(GeneratedField::Balances), + "supply" => Ok(GeneratedField::Supply), + "denomMetadata" | "denom_metadata" => Ok(GeneratedField::DenomMetadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + let mut balances__ = None; + let mut supply__ = None; + let mut denom_metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + GeneratedField::Balances => { + if balances__.is_some() { + return Err(serde::de::Error::duplicate_field("balances")); + } + balances__ = Some(map.next_value()?); + } + GeneratedField::Supply => { + if supply__.is_some() { + return Err(serde::de::Error::duplicate_field("supply")); + } + supply__ = Some(map.next_value()?); + } + GeneratedField::DenomMetadata => { + if denom_metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("denomMetadata")); + } + denom_metadata__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + params: params__, + balances: balances__.unwrap_or_default(), + supply: supply__.unwrap_or_default(), + denom_metadata: denom_metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Input { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.coins.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Input", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.coins.is_empty() { + struct_ser.serialize_field("coins", &self.coins)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Input { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "coins"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Coins, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "coins" => Ok(GeneratedField::Coins), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Input; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.Input") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut coins__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Coins => { + if coins__.is_some() { + return Err(serde::de::Error::duplicate_field("coins")); + } + coins__ = Some(map.next_value()?); + } + } + } + Ok(Input { + address: address__.unwrap_or_default(), + coins: coins__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.Input", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Metadata { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.description.is_empty() { + len += 1; + } + if !self.denom_units.is_empty() { + len += 1; + } + if !self.base.is_empty() { + len += 1; + } + if !self.display.is_empty() { + len += 1; + } + if !self.name.is_empty() { + len += 1; + } + if !self.symbol.is_empty() { + len += 1; + } + if !self.uri.is_empty() { + len += 1; + } + if !self.uri_hash.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Metadata", len)?; + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.denom_units.is_empty() { + struct_ser.serialize_field("denomUnits", &self.denom_units)?; + } + if !self.base.is_empty() { + struct_ser.serialize_field("base", &self.base)?; + } + if !self.display.is_empty() { + struct_ser.serialize_field("display", &self.display)?; + } + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.symbol.is_empty() { + struct_ser.serialize_field("symbol", &self.symbol)?; + } + if !self.uri.is_empty() { + struct_ser.serialize_field("uri", &self.uri)?; + } + if !self.uri_hash.is_empty() { + struct_ser.serialize_field("uriHash", &self.uri_hash)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Metadata { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "description", + "denom_units", + "denomUnits", + "base", + "display", + "name", + "symbol", + "uri", + "uri_hash", + "uriHash", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Description, + DenomUnits, + Base, + Display, + Name, + Symbol, + Uri, + UriHash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "description" => Ok(GeneratedField::Description), + "denomUnits" | "denom_units" => Ok(GeneratedField::DenomUnits), + "base" => Ok(GeneratedField::Base), + "display" => Ok(GeneratedField::Display), + "name" => Ok(GeneratedField::Name), + "symbol" => Ok(GeneratedField::Symbol), + "uri" => Ok(GeneratedField::Uri), + "uriHash" | "uri_hash" => Ok(GeneratedField::UriHash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Metadata; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.Metadata") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut description__ = None; + let mut denom_units__ = None; + let mut base__ = None; + let mut display__ = None; + let mut name__ = None; + let mut symbol__ = None; + let mut uri__ = None; + let mut uri_hash__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + GeneratedField::DenomUnits => { + if denom_units__.is_some() { + return Err(serde::de::Error::duplicate_field("denomUnits")); + } + denom_units__ = Some(map.next_value()?); + } + GeneratedField::Base => { + if base__.is_some() { + return Err(serde::de::Error::duplicate_field("base")); + } + base__ = Some(map.next_value()?); + } + GeneratedField::Display => { + if display__.is_some() { + return Err(serde::de::Error::duplicate_field("display")); + } + display__ = Some(map.next_value()?); + } + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Symbol => { + if symbol__.is_some() { + return Err(serde::de::Error::duplicate_field("symbol")); + } + symbol__ = Some(map.next_value()?); + } + GeneratedField::Uri => { + if uri__.is_some() { + return Err(serde::de::Error::duplicate_field("uri")); + } + uri__ = Some(map.next_value()?); + } + GeneratedField::UriHash => { + if uri_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("uriHash")); + } + uri_hash__ = Some(map.next_value()?); + } + } + } + Ok(Metadata { + description: description__.unwrap_or_default(), + denom_units: denom_units__.unwrap_or_default(), + base: base__.unwrap_or_default(), + display: display__.unwrap_or_default(), + name: name__.unwrap_or_default(), + symbol: symbol__.unwrap_or_default(), + uri: uri__.unwrap_or_default(), + uri_hash: uri_hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.Metadata", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgMultiSend { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.inputs.is_empty() { + len += 1; + } + if !self.outputs.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.MsgMultiSend", len)?; + if !self.inputs.is_empty() { + struct_ser.serialize_field("inputs", &self.inputs)?; + } + if !self.outputs.is_empty() { + struct_ser.serialize_field("outputs", &self.outputs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgMultiSend { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["inputs", "outputs"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Inputs, + Outputs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "inputs" => Ok(GeneratedField::Inputs), + "outputs" => Ok(GeneratedField::Outputs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgMultiSend; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.MsgMultiSend") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut inputs__ = None; + let mut outputs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Inputs => { + if inputs__.is_some() { + return Err(serde::de::Error::duplicate_field("inputs")); + } + inputs__ = Some(map.next_value()?); + } + GeneratedField::Outputs => { + if outputs__.is_some() { + return Err(serde::de::Error::duplicate_field("outputs")); + } + outputs__ = Some(map.next_value()?); + } + } + } + Ok(MsgMultiSend { + inputs: inputs__.unwrap_or_default(), + outputs: outputs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.MsgMultiSend", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgMultiSendResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.MsgMultiSendResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgMultiSendResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.MsgMultiSendResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgMultiSendResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.MsgMultiSendResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSend { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.from_address.is_empty() { + len += 1; + } + if !self.to_address.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgSend", len)?; + if !self.from_address.is_empty() { + struct_ser.serialize_field("fromAddress", &self.from_address)?; + } + if !self.to_address.is_empty() { + struct_ser.serialize_field("toAddress", &self.to_address)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSend { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "from_address", + "fromAddress", + "to_address", + "toAddress", + "amount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + FromAddress, + ToAddress, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fromAddress" | "from_address" => Ok(GeneratedField::FromAddress), + "toAddress" | "to_address" => Ok(GeneratedField::ToAddress), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSend; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.MsgSend") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut from_address__ = None; + let mut to_address__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::FromAddress => { + if from_address__.is_some() { + return Err(serde::de::Error::duplicate_field("fromAddress")); + } + from_address__ = Some(map.next_value()?); + } + GeneratedField::ToAddress => { + if to_address__.is_some() { + return Err(serde::de::Error::duplicate_field("toAddress")); + } + to_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(MsgSend { + from_address: from_address__.unwrap_or_default(), + to_address: to_address__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgSend", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgSendResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.MsgSendResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSendResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgSendResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.MsgSendResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgSendResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.MsgSendResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Output { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.coins.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Output", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.coins.is_empty() { + struct_ser.serialize_field("coins", &self.coins)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Output { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "coins"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Coins, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "coins" => Ok(GeneratedField::Coins), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Output; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.Output") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut coins__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Coins => { + if coins__.is_some() { + return Err(serde::de::Error::duplicate_field("coins")); + } + coins__ = Some(map.next_value()?); + } + } + } + Ok(Output { + address: address__.unwrap_or_default(), + coins: coins__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.Output", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Params { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.send_enabled.is_empty() { + len += 1; + } + if self.default_send_enabled { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Params", len)?; + if !self.send_enabled.is_empty() { + struct_ser.serialize_field("sendEnabled", &self.send_enabled)?; + } + if self.default_send_enabled { + struct_ser.serialize_field("defaultSendEnabled", &self.default_send_enabled)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Params { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "send_enabled", + "sendEnabled", + "default_send_enabled", + "defaultSendEnabled", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SendEnabled, + DefaultSendEnabled, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sendEnabled" | "send_enabled" => Ok(GeneratedField::SendEnabled), + "defaultSendEnabled" | "default_send_enabled" => { + Ok(GeneratedField::DefaultSendEnabled) + } + _ => 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 std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.Params") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut send_enabled__ = None; + let mut default_send_enabled__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::SendEnabled => { + if send_enabled__.is_some() { + return Err(serde::de::Error::duplicate_field("sendEnabled")); + } + send_enabled__ = Some(map.next_value()?); + } + GeneratedField::DefaultSendEnabled => { + if default_send_enabled__.is_some() { + return Err(serde::de::Error::duplicate_field( + "defaultSendEnabled", + )); + } + default_send_enabled__ = Some(map.next_value()?); + } + } + } + Ok(Params { + send_enabled: send_enabled__.unwrap_or_default(), + default_send_enabled: default_send_enabled__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.Params", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryAllBalancesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryAllBalancesRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllBalancesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryAllBalancesRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAllBalancesRequest { + address: address__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryAllBalancesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllBalancesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.balances.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryAllBalancesResponse", len)?; + if !self.balances.is_empty() { + struct_ser.serialize_field("balances", &self.balances)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["balances", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Balances, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "balances" => Ok(GeneratedField::Balances), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllBalancesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryAllBalancesResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut balances__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Balances => { + if balances__.is_some() { + return Err(serde::de::Error::duplicate_field("balances")); + } + balances__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAllBalancesResponse { + balances: balances__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryAllBalancesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryBalanceRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.denom.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryBalanceRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "denom"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Denom, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "denom" => Ok(GeneratedField::Denom), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryBalanceRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryBalanceRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut denom__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map.next_value()?); + } + } + } + Ok(QueryBalanceRequest { + address: address__.unwrap_or_default(), + denom: denom__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryBalanceRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryBalanceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.balance.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryBalanceResponse", len)?; + if let Some(v) = self.balance.as_ref() { + struct_ser.serialize_field("balance", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["balance"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Balance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "balance" => Ok(GeneratedField::Balance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryBalanceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryBalanceResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut balance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Balance => { + if balance__.is_some() { + return Err(serde::de::Error::duplicate_field("balance")); + } + balance__ = map.next_value()?; + } + } + } + Ok(QueryBalanceResponse { balance: balance__ }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryBalanceResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDenomMetadataRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataRequest", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomMetadataRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomMetadataRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map.next_value()?); + } + } + } + Ok(QueryDenomMetadataRequest { + denom: denom__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryDenomMetadataRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDenomMetadataResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.metadata.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataResponse", len)?; + if let Some(v) = self.metadata.as_ref() { + struct_ser.serialize_field("metadata", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["metadata"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomMetadataResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomMetadataResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = map.next_value()?; + } + } + } + Ok(QueryDenomMetadataResponse { + metadata: metadata__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryDenomMetadataResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDenomOwnersRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersRequest", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomOwnersRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomOwnersRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDenomOwnersRequest { + denom: denom__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryDenomOwnersRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDenomOwnersResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom_owners.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersResponse", len)?; + if !self.denom_owners.is_empty() { + struct_ser.serialize_field("denomOwners", &self.denom_owners)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom_owners", "denomOwners", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DenomOwners, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denomOwners" | "denom_owners" => Ok(GeneratedField::DenomOwners), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomOwnersResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomOwnersResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom_owners__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DenomOwners => { + if denom_owners__.is_some() { + return Err(serde::de::Error::duplicate_field("denomOwners")); + } + denom_owners__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDenomOwnersResponse { + denom_owners: denom_owners__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryDenomOwnersResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDenomsMetadataRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomsMetadataRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomsMetadataRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomsMetadataRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDenomsMetadataRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryDenomsMetadataRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDenomsMetadataResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.metadatas.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomsMetadataResponse", len)?; + if !self.metadatas.is_empty() { + struct_ser.serialize_field("metadatas", &self.metadatas)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["metadatas", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Metadatas, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "metadatas" => Ok(GeneratedField::Metadatas), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomsMetadataResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomsMetadataResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut metadatas__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Metadatas => { + if metadatas__.is_some() { + return Err(serde::de::Error::duplicate_field("metadatas")); + } + metadatas__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDenomsMetadataResponse { + metadatas: metadatas__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryDenomsMetadataResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryParamsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryParamsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { params: params__ }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySpendableBalancesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.bank.v1beta1.QuerySpendableBalancesRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySpendableBalancesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QuerySpendableBalancesRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QuerySpendableBalancesRequest { + address: address__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QuerySpendableBalancesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySpendableBalancesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.balances.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.bank.v1beta1.QuerySpendableBalancesResponse", len)?; + if !self.balances.is_empty() { + struct_ser.serialize_field("balances", &self.balances)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["balances", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Balances, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "balances" => Ok(GeneratedField::Balances), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySpendableBalancesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QuerySpendableBalancesResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut balances__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Balances => { + if balances__.is_some() { + return Err(serde::de::Error::duplicate_field("balances")); + } + balances__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QuerySpendableBalancesResponse { + balances: balances__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QuerySpendableBalancesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySupplyOfRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QuerySupplyOfRequest", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySupplyOfRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QuerySupplyOfRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map.next_value()?); + } + } + } + Ok(QuerySupplyOfRequest { + denom: denom__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QuerySupplyOfRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySupplyOfResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.amount.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QuerySupplyOfResponse", len)?; + if let Some(v) = self.amount.as_ref() { + struct_ser.serialize_field("amount", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySupplyOfResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QuerySupplyOfResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = map.next_value()?; + } + } + } + Ok(QuerySupplyOfResponse { amount: amount__ }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QuerySupplyOfResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryTotalSupplyRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryTotalSupplyRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryTotalSupplyRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryTotalSupplyRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryTotalSupplyRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryTotalSupplyRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryTotalSupplyResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.supply.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.QueryTotalSupplyResponse", len)?; + if !self.supply.is_empty() { + struct_ser.serialize_field("supply", &self.supply)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["supply", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Supply, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "supply" => Ok(GeneratedField::Supply), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryTotalSupplyResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryTotalSupplyResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut supply__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Supply => { + if supply__.is_some() { + return Err(serde::de::Error::duplicate_field("supply")); + } + supply__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryTotalSupplyResponse { + supply: supply__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.QueryTotalSupplyResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SendAuthorization { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.spend_limit.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.bank.v1beta1.SendAuthorization", len)?; + if !self.spend_limit.is_empty() { + struct_ser.serialize_field("spendLimit", &self.spend_limit)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SendAuthorization { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["spend_limit", "spendLimit"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SpendLimit, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "spendLimit" | "spend_limit" => Ok(GeneratedField::SpendLimit), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SendAuthorization; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.SendAuthorization") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut spend_limit__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::SpendLimit => { + if spend_limit__.is_some() { + return Err(serde::de::Error::duplicate_field("spendLimit")); + } + spend_limit__ = Some(map.next_value()?); + } + } + } + Ok(SendAuthorization { + spend_limit: spend_limit__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.bank.v1beta1.SendAuthorization", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SendEnabled { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + if self.enabled { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.SendEnabled", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + if self.enabled { + struct_ser.serialize_field("enabled", &self.enabled)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SendEnabled { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom", "enabled"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + Enabled, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + "enabled" => Ok(GeneratedField::Enabled), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SendEnabled; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.SendEnabled") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + let mut enabled__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map.next_value()?); + } + GeneratedField::Enabled => { + if enabled__.is_some() { + return Err(serde::de::Error::duplicate_field("enabled")); + } + enabled__ = Some(map.next_value()?); + } + } + } + Ok(SendEnabled { + denom: denom__.unwrap_or_default(), + enabled: enabled__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.SendEnabled", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Supply { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.total.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.Supply", len)?; + if !self.total.is_empty() { + struct_ser.serialize_field("total", &self.total)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Supply { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["total"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Total, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "total" => Ok(GeneratedField::Total), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Supply; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.Supply") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut total__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Total => { + if total__.is_some() { + return Err(serde::de::Error::duplicate_field("total")); + } + total__ = Some(map.next_value()?); + } + } + } + Ok(Supply { + total: total__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.Supply", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs index 6f3ec0c9..aab14bf0 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs @@ -168,4 +168,5 @@ pub struct SearchTxsResult { #[prost(message, repeated, tag = "6")] pub txs: ::prost::alloc::vec::Vec, } +include!("cosmos.base.abci.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs new file mode 100644 index 00000000..78c8a001 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs @@ -0,0 +1,1494 @@ +// @generated +impl serde::Serialize for AbciMessageLog { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.msg_index != 0 { + len += 1; + } + if !self.log.is_empty() { + len += 1; + } + if !self.events.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.ABCIMessageLog", len)?; + if self.msg_index != 0 { + struct_ser.serialize_field("msgIndex", &self.msg_index)?; + } + if !self.log.is_empty() { + struct_ser.serialize_field("log", &self.log)?; + } + if !self.events.is_empty() { + struct_ser.serialize_field("events", &self.events)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AbciMessageLog { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["msg_index", "msgIndex", "log", "events"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MsgIndex, + Log, + Events, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "msgIndex" | "msg_index" => Ok(GeneratedField::MsgIndex), + "log" => Ok(GeneratedField::Log), + "events" => Ok(GeneratedField::Events), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AbciMessageLog; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.ABCIMessageLog") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut msg_index__ = None; + let mut log__ = None; + let mut events__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MsgIndex => { + if msg_index__.is_some() { + return Err(serde::de::Error::duplicate_field("msgIndex")); + } + msg_index__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Log => { + if log__.is_some() { + return Err(serde::de::Error::duplicate_field("log")); + } + log__ = Some(map.next_value()?); + } + GeneratedField::Events => { + if events__.is_some() { + return Err(serde::de::Error::duplicate_field("events")); + } + events__ = Some(map.next_value()?); + } + } + } + Ok(AbciMessageLog { + msg_index: msg_index__.unwrap_or_default(), + log: log__.unwrap_or_default(), + events: events__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.ABCIMessageLog", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Attribute { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.Attribute", len)?; + if !self.key.is_empty() { + struct_ser.serialize_field("key", &self.key)?; + } + if !self.value.is_empty() { + struct_ser.serialize_field("value", &self.value)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Attribute { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Attribute; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.Attribute") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + let mut value__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some(map.next_value()?); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some(map.next_value()?); + } + } + } + Ok(Attribute { + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.Attribute", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GasInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.gas_wanted != 0 { + len += 1; + } + if self.gas_used != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.GasInfo", len)?; + if self.gas_wanted != 0 { + struct_ser + .serialize_field("gasWanted", ToString::to_string(&self.gas_wanted).as_str())?; + } + if self.gas_used != 0 { + struct_ser.serialize_field("gasUsed", ToString::to_string(&self.gas_used).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GasInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["gas_wanted", "gasWanted", "gas_used", "gasUsed"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GasWanted, + GasUsed, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "gasWanted" | "gas_wanted" => Ok(GeneratedField::GasWanted), + "gasUsed" | "gas_used" => Ok(GeneratedField::GasUsed), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GasInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.GasInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut gas_wanted__ = None; + let mut gas_used__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GasWanted => { + if gas_wanted__.is_some() { + return Err(serde::de::Error::duplicate_field("gasWanted")); + } + gas_wanted__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::GasUsed => { + if gas_used__.is_some() { + return Err(serde::de::Error::duplicate_field("gasUsed")); + } + gas_used__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(GasInfo { + gas_wanted: gas_wanted__.unwrap_or_default(), + gas_used: gas_used__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.GasInfo", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgData { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.msg_type.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.MsgData", len)?; + if !self.msg_type.is_empty() { + struct_ser.serialize_field("msgType", &self.msg_type)?; + } + if !self.data.is_empty() { + struct_ser + .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgData { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["msg_type", "msgType", "data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MsgType, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "msgType" | "msg_type" => Ok(GeneratedField::MsgType), + "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 = MsgData; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.MsgData") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut msg_type__ = None; + let mut data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MsgType => { + if msg_type__.is_some() { + return Err(serde::de::Error::duplicate_field("msgType")); + } + msg_type__ = 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, + ); + } + } + } + Ok(MsgData { + msg_type: msg_type__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.MsgData", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Result { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + if !self.log.is_empty() { + len += 1; + } + if !self.events.is_empty() { + len += 1; + } + if !self.msg_responses.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.abci.v1beta1.Result", len)?; + if !self.data.is_empty() { + struct_ser + .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + } + if !self.log.is_empty() { + struct_ser.serialize_field("log", &self.log)?; + } + if !self.events.is_empty() { + struct_ser.serialize_field("events", &self.events)?; + } + if !self.msg_responses.is_empty() { + struct_ser.serialize_field("msgResponses", &self.msg_responses)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Result { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data", "log", "events", "msg_responses", "msgResponses"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + Log, + Events, + MsgResponses, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "data" => Ok(GeneratedField::Data), + "log" => Ok(GeneratedField::Log), + "events" => Ok(GeneratedField::Events), + "msgResponses" | "msg_responses" => Ok(GeneratedField::MsgResponses), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Result; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.Result") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + let mut log__ = None; + let mut events__ = None; + let mut msg_responses__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Log => { + if log__.is_some() { + return Err(serde::de::Error::duplicate_field("log")); + } + log__ = Some(map.next_value()?); + } + GeneratedField::Events => { + if events__.is_some() { + return Err(serde::de::Error::duplicate_field("events")); + } + events__ = Some(map.next_value()?); + } + GeneratedField::MsgResponses => { + if msg_responses__.is_some() { + return Err(serde::de::Error::duplicate_field("msgResponses")); + } + msg_responses__ = Some(map.next_value()?); + } + } + } + Ok(Result { + data: data__.unwrap_or_default(), + log: log__.unwrap_or_default(), + events: events__.unwrap_or_default(), + msg_responses: msg_responses__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.abci.v1beta1.Result", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SearchTxsResult { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.total_count != 0 { + len += 1; + } + if self.count != 0 { + len += 1; + } + if self.page_number != 0 { + len += 1; + } + if self.page_total != 0 { + len += 1; + } + if self.limit != 0 { + len += 1; + } + if !self.txs.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.SearchTxsResult", len)?; + if self.total_count != 0 { + struct_ser.serialize_field( + "totalCount", + ToString::to_string(&self.total_count).as_str(), + )?; + } + if self.count != 0 { + struct_ser.serialize_field("count", ToString::to_string(&self.count).as_str())?; + } + if self.page_number != 0 { + struct_ser.serialize_field( + "pageNumber", + ToString::to_string(&self.page_number).as_str(), + )?; + } + if self.page_total != 0 { + struct_ser + .serialize_field("pageTotal", ToString::to_string(&self.page_total).as_str())?; + } + if self.limit != 0 { + struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?; + } + if !self.txs.is_empty() { + struct_ser.serialize_field("txs", &self.txs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SearchTxsResult { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "total_count", + "totalCount", + "count", + "page_number", + "pageNumber", + "page_total", + "pageTotal", + "limit", + "txs", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TotalCount, + Count, + PageNumber, + PageTotal, + Limit, + Txs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "totalCount" | "total_count" => Ok(GeneratedField::TotalCount), + "count" => Ok(GeneratedField::Count), + "pageNumber" | "page_number" => Ok(GeneratedField::PageNumber), + "pageTotal" | "page_total" => Ok(GeneratedField::PageTotal), + "limit" => Ok(GeneratedField::Limit), + "txs" => Ok(GeneratedField::Txs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SearchTxsResult; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.SearchTxsResult") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut total_count__ = None; + let mut count__ = None; + let mut page_number__ = None; + let mut page_total__ = None; + let mut limit__ = None; + let mut txs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::TotalCount => { + if total_count__.is_some() { + return Err(serde::de::Error::duplicate_field("totalCount")); + } + total_count__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Count => { + if count__.is_some() { + return Err(serde::de::Error::duplicate_field("count")); + } + count__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::PageNumber => { + if page_number__.is_some() { + return Err(serde::de::Error::duplicate_field("pageNumber")); + } + page_number__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::PageTotal => { + if page_total__.is_some() { + return Err(serde::de::Error::duplicate_field("pageTotal")); + } + page_total__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Limit => { + if limit__.is_some() { + return Err(serde::de::Error::duplicate_field("limit")); + } + limit__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Txs => { + if txs__.is_some() { + return Err(serde::de::Error::duplicate_field("txs")); + } + txs__ = Some(map.next_value()?); + } + } + } + Ok(SearchTxsResult { + total_count: total_count__.unwrap_or_default(), + count: count__.unwrap_or_default(), + page_number: page_number__.unwrap_or_default(), + page_total: page_total__.unwrap_or_default(), + limit: limit__.unwrap_or_default(), + txs: txs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.SearchTxsResult", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SimulationResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.gas_info.is_some() { + len += 1; + } + if self.result.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.SimulationResponse", len)?; + if let Some(v) = self.gas_info.as_ref() { + struct_ser.serialize_field("gasInfo", v)?; + } + if let Some(v) = self.result.as_ref() { + struct_ser.serialize_field("result", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SimulationResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["gas_info", "gasInfo", "result"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GasInfo, + Result, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "gasInfo" | "gas_info" => Ok(GeneratedField::GasInfo), + "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 = SimulationResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.SimulationResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut gas_info__ = None; + let mut result__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GasInfo => { + if gas_info__.is_some() { + return Err(serde::de::Error::duplicate_field("gasInfo")); + } + gas_info__ = map.next_value()?; + } + GeneratedField::Result => { + if result__.is_some() { + return Err(serde::de::Error::duplicate_field("result")); + } + result__ = map.next_value()?; + } + } + } + Ok(SimulationResponse { + gas_info: gas_info__, + result: result__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.SimulationResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for StringEvent { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.r#type.is_empty() { + len += 1; + } + if !self.attributes.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.StringEvent", len)?; + if !self.r#type.is_empty() { + struct_ser.serialize_field("type", &self.r#type)?; + } + if !self.attributes.is_empty() { + struct_ser.serialize_field("attributes", &self.attributes)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for StringEvent { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["type", "attributes"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Type, + Attributes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "type" => Ok(GeneratedField::Type), + "attributes" => Ok(GeneratedField::Attributes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StringEvent; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.StringEvent") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut r#type__ = None; + let mut attributes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Type => { + if r#type__.is_some() { + return Err(serde::de::Error::duplicate_field("type")); + } + r#type__ = Some(map.next_value()?); + } + GeneratedField::Attributes => { + if attributes__.is_some() { + return Err(serde::de::Error::duplicate_field("attributes")); + } + attributes__ = Some(map.next_value()?); + } + } + } + Ok(StringEvent { + r#type: r#type__.unwrap_or_default(), + attributes: attributes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.StringEvent", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for TxMsgData { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + if !self.msg_responses.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.TxMsgData", len)?; + if !self.data.is_empty() { + struct_ser.serialize_field("data", &self.data)?; + } + if !self.msg_responses.is_empty() { + struct_ser.serialize_field("msgResponses", &self.msg_responses)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TxMsgData { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data", "msg_responses", "msgResponses"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + MsgResponses, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "data" => Ok(GeneratedField::Data), + "msgResponses" | "msg_responses" => Ok(GeneratedField::MsgResponses), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TxMsgData; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.TxMsgData") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + let mut msg_responses__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some(map.next_value()?); + } + GeneratedField::MsgResponses => { + if msg_responses__.is_some() { + return Err(serde::de::Error::duplicate_field("msgResponses")); + } + msg_responses__ = Some(map.next_value()?); + } + } + } + Ok(TxMsgData { + data: data__.unwrap_or_default(), + msg_responses: msg_responses__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.TxMsgData", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for TxResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if !self.txhash.is_empty() { + len += 1; + } + if !self.codespace.is_empty() { + len += 1; + } + if self.code != 0 { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + if !self.raw_log.is_empty() { + len += 1; + } + if !self.logs.is_empty() { + len += 1; + } + if !self.info.is_empty() { + len += 1; + } + if self.gas_wanted != 0 { + len += 1; + } + if self.gas_used != 0 { + len += 1; + } + if self.tx.is_some() { + len += 1; + } + if !self.timestamp.is_empty() { + len += 1; + } + if !self.events.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.abci.v1beta1.TxResponse", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if !self.txhash.is_empty() { + struct_ser.serialize_field("txhash", &self.txhash)?; + } + if !self.codespace.is_empty() { + struct_ser.serialize_field("codespace", &self.codespace)?; + } + if self.code != 0 { + struct_ser.serialize_field("code", &self.code)?; + } + if !self.data.is_empty() { + struct_ser.serialize_field("data", &self.data)?; + } + if !self.raw_log.is_empty() { + struct_ser.serialize_field("rawLog", &self.raw_log)?; + } + if !self.logs.is_empty() { + struct_ser.serialize_field("logs", &self.logs)?; + } + if !self.info.is_empty() { + struct_ser.serialize_field("info", &self.info)?; + } + if self.gas_wanted != 0 { + struct_ser + .serialize_field("gasWanted", ToString::to_string(&self.gas_wanted).as_str())?; + } + if self.gas_used != 0 { + struct_ser.serialize_field("gasUsed", ToString::to_string(&self.gas_used).as_str())?; + } + if let Some(v) = self.tx.as_ref() { + struct_ser.serialize_field("tx", v)?; + } + if !self.timestamp.is_empty() { + struct_ser.serialize_field("timestamp", &self.timestamp)?; + } + if !self.events.is_empty() { + struct_ser.serialize_field("events", &self.events)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TxResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "height", + "txhash", + "codespace", + "code", + "data", + "raw_log", + "rawLog", + "logs", + "info", + "gas_wanted", + "gasWanted", + "gas_used", + "gasUsed", + "tx", + "timestamp", + "events", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Txhash, + Codespace, + Code, + Data, + RawLog, + Logs, + Info, + GasWanted, + GasUsed, + Tx, + Timestamp, + Events, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + "txhash" => Ok(GeneratedField::Txhash), + "codespace" => Ok(GeneratedField::Codespace), + "code" => Ok(GeneratedField::Code), + "data" => Ok(GeneratedField::Data), + "rawLog" | "raw_log" => Ok(GeneratedField::RawLog), + "logs" => Ok(GeneratedField::Logs), + "info" => Ok(GeneratedField::Info), + "gasWanted" | "gas_wanted" => Ok(GeneratedField::GasWanted), + "gasUsed" | "gas_used" => Ok(GeneratedField::GasUsed), + "tx" => Ok(GeneratedField::Tx), + "timestamp" => Ok(GeneratedField::Timestamp), + "events" => Ok(GeneratedField::Events), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TxResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.abci.v1beta1.TxResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut txhash__ = None; + let mut codespace__ = None; + let mut code__ = None; + let mut data__ = None; + let mut raw_log__ = None; + let mut logs__ = None; + let mut info__ = None; + let mut gas_wanted__ = None; + let mut gas_used__ = None; + let mut tx__ = None; + let mut timestamp__ = None; + let mut events__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Txhash => { + if txhash__.is_some() { + return Err(serde::de::Error::duplicate_field("txhash")); + } + txhash__ = Some(map.next_value()?); + } + GeneratedField::Codespace => { + if codespace__.is_some() { + return Err(serde::de::Error::duplicate_field("codespace")); + } + codespace__ = Some(map.next_value()?); + } + GeneratedField::Code => { + if code__.is_some() { + return Err(serde::de::Error::duplicate_field("code")); + } + code__ = 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()?); + } + GeneratedField::RawLog => { + if raw_log__.is_some() { + return Err(serde::de::Error::duplicate_field("rawLog")); + } + raw_log__ = Some(map.next_value()?); + } + GeneratedField::Logs => { + if logs__.is_some() { + return Err(serde::de::Error::duplicate_field("logs")); + } + logs__ = Some(map.next_value()?); + } + GeneratedField::Info => { + if info__.is_some() { + return Err(serde::de::Error::duplicate_field("info")); + } + info__ = Some(map.next_value()?); + } + GeneratedField::GasWanted => { + if gas_wanted__.is_some() { + return Err(serde::de::Error::duplicate_field("gasWanted")); + } + gas_wanted__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::GasUsed => { + if gas_used__.is_some() { + return Err(serde::de::Error::duplicate_field("gasUsed")); + } + gas_used__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Tx => { + if tx__.is_some() { + return Err(serde::de::Error::duplicate_field("tx")); + } + tx__ = map.next_value()?; + } + GeneratedField::Timestamp => { + if timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("timestamp")); + } + timestamp__ = Some(map.next_value()?); + } + GeneratedField::Events => { + if events__.is_some() { + return Err(serde::de::Error::duplicate_field("events")); + } + events__ = Some(map.next_value()?); + } + } + } + Ok(TxResponse { + height: height__.unwrap_or_default(), + txhash: txhash__.unwrap_or_default(), + codespace: codespace__.unwrap_or_default(), + code: code__.unwrap_or_default(), + data: data__.unwrap_or_default(), + raw_log: raw_log__.unwrap_or_default(), + logs: logs__.unwrap_or_default(), + info: info__.unwrap_or_default(), + gas_wanted: gas_wanted__.unwrap_or_default(), + gas_used: gas_used__.unwrap_or_default(), + tx: tx__, + timestamp: timestamp__.unwrap_or_default(), + events: events__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.abci.v1beta1.TxResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs index ac1906db..79623a3a 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs @@ -13,4 +13,5 @@ pub struct Pair { #[prost(bytes = "vec", tag = "2")] pub value: ::prost::alloc::vec::Vec, } +include!("cosmos.base.kv.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs new file mode 100644 index 00000000..5ed923da --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs @@ -0,0 +1,211 @@ +// @generated +impl serde::Serialize for Pair { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.kv.v1beta1.Pair", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if !self.value.is_empty() { + struct_ser.serialize_field( + "value", + pbjson::private::base64::encode(&self.value).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Pair { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Pair; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.kv.v1beta1.Pair") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + let mut value__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Pair { + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.kv.v1beta1.Pair", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Pairs { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.pairs.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.kv.v1beta1.Pairs", len)?; + if !self.pairs.is_empty() { + struct_ser.serialize_field("pairs", &self.pairs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Pairs { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pairs"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pairs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pairs" => Ok(GeneratedField::Pairs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Pairs; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.kv.v1beta1.Pairs") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pairs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pairs => { + if pairs__.is_some() { + return Err(serde::de::Error::duplicate_field("pairs")); + } + pairs__ = Some(map.next_value()?); + } + } + } + Ok(Pairs { + pairs: pairs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.kv.v1beta1.Pairs", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs index 20a2cbf8..3b2ae2a6 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs @@ -8,5 +8,6 @@ pub struct ConfigResponse { #[prost(string, tag = "1")] pub minimum_gas_price: ::prost::alloc::string::String, } +include!("cosmos.base.node.v1beta1.serde.rs"); include!("cosmos.base.node.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs new file mode 100644 index 00000000..9488d617 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs @@ -0,0 +1,176 @@ +// @generated +impl serde::Serialize for ConfigRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.base.node.v1beta1.ConfigRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConfigRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = ConfigRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.node.v1beta1.ConfigRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(ConfigRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.node.v1beta1.ConfigRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ConfigResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.minimum_gas_price.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.node.v1beta1.ConfigResponse", len)?; + if !self.minimum_gas_price.is_empty() { + struct_ser.serialize_field("minimumGasPrice", &self.minimum_gas_price)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConfigResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["minimum_gas_price", "minimumGasPrice"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MinimumGasPrice, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "minimumGasPrice" | "minimum_gas_price" => { + Ok(GeneratedField::MinimumGasPrice) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConfigResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.node.v1beta1.ConfigResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut minimum_gas_price__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MinimumGasPrice => { + if minimum_gas_price__.is_some() { + return Err(serde::de::Error::duplicate_field("minimumGasPrice")); + } + minimum_gas_price__ = Some(map.next_value()?); + } + } + } + Ok(ConfigResponse { + minimum_gas_price: minimum_gas_price__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.node.v1beta1.ConfigResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs index f37d3872..748232b7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs @@ -53,4 +53,5 @@ pub struct PageResponse { #[prost(uint64, tag = "2")] pub total: u64, } +include!("cosmos.base.query.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs new file mode 100644 index 00000000..ff0d0276 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs @@ -0,0 +1,301 @@ +// @generated +impl serde::Serialize for PageRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + if self.offset != 0 { + len += 1; + } + if self.limit != 0 { + len += 1; + } + if self.count_total { + len += 1; + } + if self.reverse { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.query.v1beta1.PageRequest", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if self.offset != 0 { + struct_ser.serialize_field("offset", ToString::to_string(&self.offset).as_str())?; + } + if self.limit != 0 { + struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?; + } + if self.count_total { + struct_ser.serialize_field("countTotal", &self.count_total)?; + } + if self.reverse { + struct_ser.serialize_field("reverse", &self.reverse)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PageRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "key", + "offset", + "limit", + "count_total", + "countTotal", + "reverse", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Offset, + Limit, + CountTotal, + Reverse, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + "offset" => Ok(GeneratedField::Offset), + "limit" => Ok(GeneratedField::Limit), + "countTotal" | "count_total" => Ok(GeneratedField::CountTotal), + "reverse" => Ok(GeneratedField::Reverse), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PageRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.query.v1beta1.PageRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + let mut offset__ = None; + let mut limit__ = None; + let mut count_total__ = None; + let mut reverse__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Offset => { + if offset__.is_some() { + return Err(serde::de::Error::duplicate_field("offset")); + } + offset__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Limit => { + if limit__.is_some() { + return Err(serde::de::Error::duplicate_field("limit")); + } + limit__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::CountTotal => { + if count_total__.is_some() { + return Err(serde::de::Error::duplicate_field("countTotal")); + } + count_total__ = Some(map.next_value()?); + } + GeneratedField::Reverse => { + if reverse__.is_some() { + return Err(serde::de::Error::duplicate_field("reverse")); + } + reverse__ = Some(map.next_value()?); + } + } + } + Ok(PageRequest { + key: key__.unwrap_or_default(), + offset: offset__.unwrap_or_default(), + limit: limit__.unwrap_or_default(), + count_total: count_total__.unwrap_or_default(), + reverse: reverse__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.query.v1beta1.PageRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for PageResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.next_key.is_empty() { + len += 1; + } + if self.total != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.query.v1beta1.PageResponse", len)?; + if !self.next_key.is_empty() { + struct_ser.serialize_field( + "nextKey", + pbjson::private::base64::encode(&self.next_key).as_str(), + )?; + } + if self.total != 0 { + struct_ser.serialize_field("total", ToString::to_string(&self.total).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PageResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["next_key", "nextKey", "total"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + NextKey, + Total, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "nextKey" | "next_key" => Ok(GeneratedField::NextKey), + "total" => Ok(GeneratedField::Total), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PageResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.query.v1beta1.PageResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut next_key__ = None; + let mut total__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::NextKey => { + if next_key__.is_some() { + return Err(serde::de::Error::duplicate_field("nextKey")); + } + next_key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Total => { + if total__.is_some() { + return Err(serde::de::Error::duplicate_field("total")); + } + total__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PageResponse { + next_key: next_key__.unwrap_or_default(), + total: total__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.query.v1beta1.PageResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs index d640d9f6..769f6f2f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs @@ -24,5 +24,6 @@ pub struct ListImplementationsResponse { #[prost(string, repeated, tag = "1")] pub implementation_message_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +include!("cosmos.base.reflection.v1beta1.serde.rs"); include!("cosmos.base.reflection.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs new file mode 100644 index 00000000..58834489 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs @@ -0,0 +1,402 @@ +// @generated +impl serde::Serialize for ListAllInterfacesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = ListAllInterfacesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v1beta1.ListAllInterfacesRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(ListAllInterfacesRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ListAllInterfacesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.interface_names.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", + len, + )?; + if !self.interface_names.is_empty() { + struct_ser.serialize_field("interfaceNames", &self.interface_names)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["interface_names", "interfaceNames"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + InterfaceNames, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "interfaceNames" | "interface_names" => { + Ok(GeneratedField::InterfaceNames) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ListAllInterfacesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v1beta1.ListAllInterfacesResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut interface_names__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::InterfaceNames => { + if interface_names__.is_some() { + return Err(serde::de::Error::duplicate_field("interfaceNames")); + } + interface_names__ = Some(map.next_value()?); + } + } + } + Ok(ListAllInterfacesResponse { + interface_names: interface_names__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ListImplementationsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.interface_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v1beta1.ListImplementationsRequest", + len, + )?; + if !self.interface_name.is_empty() { + struct_ser.serialize_field("interfaceName", &self.interface_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["interface_name", "interfaceName"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + InterfaceName, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "interfaceName" | "interface_name" => Ok(GeneratedField::InterfaceName), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ListImplementationsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v1beta1.ListImplementationsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut interface_name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::InterfaceName => { + if interface_name__.is_some() { + return Err(serde::de::Error::duplicate_field("interfaceName")); + } + interface_name__ = Some(map.next_value()?); + } + } + } + Ok(ListImplementationsRequest { + interface_name: interface_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v1beta1.ListImplementationsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ListImplementationsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.implementation_message_names.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v1beta1.ListImplementationsResponse", + len, + )?; + if !self.implementation_message_names.is_empty() { + struct_ser.serialize_field( + "implementationMessageNames", + &self.implementation_message_names, + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ListImplementationsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["implementation_message_names", "implementationMessageNames"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ImplementationMessageNames, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "implementationMessageNames" | "implementation_message_names" => { + Ok(GeneratedField::ImplementationMessageNames) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ListImplementationsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v1beta1.ListImplementationsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut implementation_message_names__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ImplementationMessageNames => { + if implementation_message_names__.is_some() { + return Err(serde::de::Error::duplicate_field( + "implementationMessageNames", + )); + } + implementation_message_names__ = Some(map.next_value()?); + } + } + } + Ok(ListImplementationsResponse { + implementation_message_names: implementation_message_names__ + .unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v1beta1.ListImplementationsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs index e50492c5..d3b5e7c0 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs @@ -221,5 +221,6 @@ pub struct QueryMethodDescriptor { #[prost(string, tag = "2")] pub full_query_path: ::prost::alloc::string::String, } +include!("cosmos.base.reflection.v2alpha1.serde.rs"); include!("cosmos.base.reflection.v2alpha1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs new file mode 100644 index 00000000..26e06121 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs @@ -0,0 +1,2797 @@ +// @generated +impl serde::Serialize for AppDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.authn.is_some() { + len += 1; + } + if self.chain.is_some() { + len += 1; + } + if self.codec.is_some() { + len += 1; + } + if self.configuration.is_some() { + len += 1; + } + if self.query_services.is_some() { + len += 1; + } + if self.tx.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.reflection.v2alpha1.AppDescriptor", len)?; + if let Some(v) = self.authn.as_ref() { + struct_ser.serialize_field("authn", v)?; + } + if let Some(v) = self.chain.as_ref() { + struct_ser.serialize_field("chain", v)?; + } + if let Some(v) = self.codec.as_ref() { + struct_ser.serialize_field("codec", v)?; + } + if let Some(v) = self.configuration.as_ref() { + struct_ser.serialize_field("configuration", v)?; + } + if let Some(v) = self.query_services.as_ref() { + struct_ser.serialize_field("queryServices", v)?; + } + if let Some(v) = self.tx.as_ref() { + struct_ser.serialize_field("tx", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AppDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "authn", + "chain", + "codec", + "configuration", + "query_services", + "queryServices", + "tx", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authn, + Chain, + Codec, + Configuration, + QueryServices, + Tx, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authn" => Ok(GeneratedField::Authn), + "chain" => Ok(GeneratedField::Chain), + "codec" => Ok(GeneratedField::Codec), + "configuration" => Ok(GeneratedField::Configuration), + "queryServices" | "query_services" => Ok(GeneratedField::QueryServices), + "tx" => Ok(GeneratedField::Tx), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AppDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.AppDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authn__ = None; + let mut chain__ = None; + let mut codec__ = None; + let mut configuration__ = None; + let mut query_services__ = None; + let mut tx__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Authn => { + if authn__.is_some() { + return Err(serde::de::Error::duplicate_field("authn")); + } + authn__ = map.next_value()?; + } + GeneratedField::Chain => { + if chain__.is_some() { + return Err(serde::de::Error::duplicate_field("chain")); + } + chain__ = map.next_value()?; + } + GeneratedField::Codec => { + if codec__.is_some() { + return Err(serde::de::Error::duplicate_field("codec")); + } + codec__ = map.next_value()?; + } + GeneratedField::Configuration => { + if configuration__.is_some() { + return Err(serde::de::Error::duplicate_field("configuration")); + } + configuration__ = map.next_value()?; + } + GeneratedField::QueryServices => { + if query_services__.is_some() { + return Err(serde::de::Error::duplicate_field("queryServices")); + } + query_services__ = map.next_value()?; + } + GeneratedField::Tx => { + if tx__.is_some() { + return Err(serde::de::Error::duplicate_field("tx")); + } + tx__ = map.next_value()?; + } + } + } + Ok(AppDescriptor { + authn: authn__, + chain: chain__, + codec: codec__, + configuration: configuration__, + query_services: query_services__, + tx: tx__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.AppDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AuthnDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sign_modes.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.reflection.v2alpha1.AuthnDescriptor", len)?; + if !self.sign_modes.is_empty() { + struct_ser.serialize_field("signModes", &self.sign_modes)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AuthnDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sign_modes", "signModes"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SignModes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "signModes" | "sign_modes" => Ok(GeneratedField::SignModes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AuthnDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.AuthnDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sign_modes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::SignModes => { + if sign_modes__.is_some() { + return Err(serde::de::Error::duplicate_field("signModes")); + } + sign_modes__ = Some(map.next_value()?); + } + } + } + Ok(AuthnDescriptor { + sign_modes: sign_modes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.AuthnDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ChainDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.id.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.reflection.v2alpha1.ChainDescriptor", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ChainDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["id"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ChainDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.ChainDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + } + } + Ok(ChainDescriptor { + id: id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.ChainDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for CodecDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.interfaces.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.reflection.v2alpha1.CodecDescriptor", len)?; + if !self.interfaces.is_empty() { + struct_ser.serialize_field("interfaces", &self.interfaces)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CodecDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["interfaces"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Interfaces, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "interfaces" => Ok(GeneratedField::Interfaces), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CodecDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.CodecDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut interfaces__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Interfaces => { + if interfaces__.is_some() { + return Err(serde::de::Error::duplicate_field("interfaces")); + } + interfaces__ = Some(map.next_value()?); + } + } + } + Ok(CodecDescriptor { + interfaces: interfaces__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.CodecDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ConfigurationDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.bech32_account_address_prefix.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.ConfigurationDescriptor", + len, + )?; + if !self.bech32_account_address_prefix.is_empty() { + struct_ser.serialize_field( + "bech32AccountAddressPrefix", + &self.bech32_account_address_prefix, + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "bech32_account_address_prefix", + "bech32AccountAddressPrefix", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Bech32AccountAddressPrefix, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "bech32AccountAddressPrefix" | "bech32_account_address_prefix" => { + Ok(GeneratedField::Bech32AccountAddressPrefix) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConfigurationDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.ConfigurationDescriptor") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut bech32_account_address_prefix__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Bech32AccountAddressPrefix => { + if bech32_account_address_prefix__.is_some() { + return Err(serde::de::Error::duplicate_field( + "bech32AccountAddressPrefix", + )); + } + bech32_account_address_prefix__ = Some(map.next_value()?); + } + } + } + Ok(ConfigurationDescriptor { + bech32_account_address_prefix: bech32_account_address_prefix__ + .unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.ConfigurationDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetAuthnDescriptorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetAuthnDescriptorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetAuthnDescriptorRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetAuthnDescriptorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.authn.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse", + len, + )?; + if let Some(v) = self.authn.as_ref() { + struct_ser.serialize_field("authn", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["authn"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authn, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authn" => Ok(GeneratedField::Authn), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetAuthnDescriptorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authn__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Authn => { + if authn__.is_some() { + return Err(serde::de::Error::duplicate_field("authn")); + } + authn__ = map.next_value()?; + } + } + } + Ok(GetAuthnDescriptorResponse { authn: authn__ }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetChainDescriptorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetChainDescriptorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetChainDescriptorRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetChainDescriptorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.chain.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse", + len, + )?; + if let Some(v) = self.chain.as_ref() { + struct_ser.serialize_field("chain", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["chain"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Chain, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "chain" => Ok(GeneratedField::Chain), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetChainDescriptorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut chain__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Chain => { + if chain__.is_some() { + return Err(serde::de::Error::duplicate_field("chain")); + } + chain__ = map.next_value()?; + } + } + } + Ok(GetChainDescriptorResponse { chain: chain__ }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetCodecDescriptorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetCodecDescriptorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetCodecDescriptorRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetCodecDescriptorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.codec.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse", + len, + )?; + if let Some(v) = self.codec.as_ref() { + struct_ser.serialize_field("codec", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["codec"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Codec, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codec" => Ok(GeneratedField::Codec), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetCodecDescriptorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut codec__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Codec => { + if codec__.is_some() { + return Err(serde::de::Error::duplicate_field("codec")); + } + codec__ = map.next_value()?; + } + } + } + Ok(GetCodecDescriptorResponse { codec: codec__ }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetConfigurationDescriptorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetConfigurationDescriptorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetConfigurationDescriptorRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetConfigurationDescriptorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.config.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse", + len, + )?; + if let Some(v) = self.config.as_ref() { + struct_ser.serialize_field("config", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["config"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Config, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "config" => Ok(GeneratedField::Config), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetConfigurationDescriptorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut config__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Config => { + if config__.is_some() { + return Err(serde::de::Error::duplicate_field("config")); + } + config__ = map.next_value()?; + } + } + } + Ok(GetConfigurationDescriptorResponse { config: config__ }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetQueryServicesDescriptorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetQueryServicesDescriptorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetQueryServicesDescriptorRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetQueryServicesDescriptorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.queries.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse", + len, + )?; + if let Some(v) = self.queries.as_ref() { + struct_ser.serialize_field("queries", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["queries"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Queries, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "queries" => Ok(GeneratedField::Queries), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetQueryServicesDescriptorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut queries__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Queries => { + if queries__.is_some() { + return Err(serde::de::Error::duplicate_field("queries")); + } + queries__ = map.next_value()?; + } + } + } + Ok(GetQueryServicesDescriptorResponse { queries: queries__ }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetTxDescriptorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetTxDescriptorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetTxDescriptorRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetTxDescriptorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.tx.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse", + len, + )?; + if let Some(v) = self.tx.as_ref() { + struct_ser.serialize_field("tx", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["tx"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Tx, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "tx" => Ok(GeneratedField::Tx), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTxDescriptorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut tx__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Tx => { + if tx__.is_some() { + return Err(serde::de::Error::duplicate_field("tx")); + } + tx__ = map.next_value()?; + } + } + } + Ok(GetTxDescriptorResponse { tx: tx__ }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for InterfaceAcceptingMessageDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.fullname.is_empty() { + len += 1; + } + if !self.field_descriptor_names.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor", + len, + )?; + if !self.fullname.is_empty() { + struct_ser.serialize_field("fullname", &self.fullname)?; + } + if !self.field_descriptor_names.is_empty() { + struct_ser.serialize_field("fieldDescriptorNames", &self.field_descriptor_names)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["fullname", "field_descriptor_names", "fieldDescriptorNames"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Fullname, + FieldDescriptorNames, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fullname" => Ok(GeneratedField::Fullname), + "fieldDescriptorNames" | "field_descriptor_names" => { + Ok(GeneratedField::FieldDescriptorNames) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = InterfaceAcceptingMessageDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut fullname__ = None; + let mut field_descriptor_names__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Fullname => { + if fullname__.is_some() { + return Err(serde::de::Error::duplicate_field("fullname")); + } + fullname__ = Some(map.next_value()?); + } + GeneratedField::FieldDescriptorNames => { + if field_descriptor_names__.is_some() { + return Err(serde::de::Error::duplicate_field( + "fieldDescriptorNames", + )); + } + field_descriptor_names__ = Some(map.next_value()?); + } + } + } + Ok(InterfaceAcceptingMessageDescriptor { + fullname: fullname__.unwrap_or_default(), + field_descriptor_names: field_descriptor_names__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for InterfaceDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.fullname.is_empty() { + len += 1; + } + if !self.interface_accepting_messages.is_empty() { + len += 1; + } + if !self.interface_implementers.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.base.reflection.v2alpha1.InterfaceDescriptor", len)?; + if !self.fullname.is_empty() { + struct_ser.serialize_field("fullname", &self.fullname)?; + } + if !self.interface_accepting_messages.is_empty() { + struct_ser.serialize_field( + "interfaceAcceptingMessages", + &self.interface_accepting_messages, + )?; + } + if !self.interface_implementers.is_empty() { + struct_ser.serialize_field("interfaceImplementers", &self.interface_implementers)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "fullname", + "interface_accepting_messages", + "interfaceAcceptingMessages", + "interface_implementers", + "interfaceImplementers", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Fullname, + InterfaceAcceptingMessages, + InterfaceImplementers, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fullname" => Ok(GeneratedField::Fullname), + "interfaceAcceptingMessages" | "interface_accepting_messages" => { + Ok(GeneratedField::InterfaceAcceptingMessages) + } + "interfaceImplementers" | "interface_implementers" => { + Ok(GeneratedField::InterfaceImplementers) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = InterfaceDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.InterfaceDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut fullname__ = None; + let mut interface_accepting_messages__ = None; + let mut interface_implementers__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Fullname => { + if fullname__.is_some() { + return Err(serde::de::Error::duplicate_field("fullname")); + } + fullname__ = Some(map.next_value()?); + } + GeneratedField::InterfaceAcceptingMessages => { + if interface_accepting_messages__.is_some() { + return Err(serde::de::Error::duplicate_field( + "interfaceAcceptingMessages", + )); + } + interface_accepting_messages__ = Some(map.next_value()?); + } + GeneratedField::InterfaceImplementers => { + if interface_implementers__.is_some() { + return Err(serde::de::Error::duplicate_field( + "interfaceImplementers", + )); + } + interface_implementers__ = Some(map.next_value()?); + } + } + } + Ok(InterfaceDescriptor { + fullname: fullname__.unwrap_or_default(), + interface_accepting_messages: interface_accepting_messages__ + .unwrap_or_default(), + interface_implementers: interface_implementers__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.InterfaceDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for InterfaceImplementerDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.fullname.is_empty() { + len += 1; + } + if !self.type_url.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor", + len, + )?; + if !self.fullname.is_empty() { + struct_ser.serialize_field("fullname", &self.fullname)?; + } + if !self.type_url.is_empty() { + struct_ser.serialize_field("typeUrl", &self.type_url)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["fullname", "type_url", "typeUrl"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Fullname, + TypeUrl, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fullname" => Ok(GeneratedField::Fullname), + "typeUrl" | "type_url" => Ok(GeneratedField::TypeUrl), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = InterfaceImplementerDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut fullname__ = None; + let mut type_url__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Fullname => { + if fullname__.is_some() { + return Err(serde::de::Error::duplicate_field("fullname")); + } + fullname__ = Some(map.next_value()?); + } + GeneratedField::TypeUrl => { + if type_url__.is_some() { + return Err(serde::de::Error::duplicate_field("typeUrl")); + } + type_url__ = Some(map.next_value()?); + } + } + } + Ok(InterfaceImplementerDescriptor { + fullname: fullname__.unwrap_or_default(), + type_url: type_url__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.msg_type_url.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.reflection.v2alpha1.MsgDescriptor", len)?; + if !self.msg_type_url.is_empty() { + struct_ser.serialize_field("msgTypeUrl", &self.msg_type_url)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["msg_type_url", "msgTypeUrl"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MsgTypeUrl, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "msgTypeUrl" | "msg_type_url" => Ok(GeneratedField::MsgTypeUrl), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.MsgDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut msg_type_url__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MsgTypeUrl => { + if msg_type_url__.is_some() { + return Err(serde::de::Error::duplicate_field("msgTypeUrl")); + } + msg_type_url__ = Some(map.next_value()?); + } + } + } + Ok(MsgDescriptor { + msg_type_url: msg_type_url__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.MsgDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryMethodDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if !self.full_query_path.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.base.reflection.v2alpha1.QueryMethodDescriptor", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.full_query_path.is_empty() { + struct_ser.serialize_field("fullQueryPath", &self.full_query_path)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "full_query_path", "fullQueryPath"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + FullQueryPath, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "fullQueryPath" | "full_query_path" => { + Ok(GeneratedField::FullQueryPath) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryMethodDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.QueryMethodDescriptor") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut full_query_path__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::FullQueryPath => { + if full_query_path__.is_some() { + return Err(serde::de::Error::duplicate_field("fullQueryPath")); + } + full_query_path__ = Some(map.next_value()?); + } + } + } + Ok(QueryMethodDescriptor { + name: name__.unwrap_or_default(), + full_query_path: full_query_path__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.QueryMethodDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryServiceDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.fullname.is_empty() { + len += 1; + } + if self.is_module { + len += 1; + } + if !self.methods.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor", + len, + )?; + if !self.fullname.is_empty() { + struct_ser.serialize_field("fullname", &self.fullname)?; + } + if self.is_module { + struct_ser.serialize_field("isModule", &self.is_module)?; + } + if !self.methods.is_empty() { + struct_ser.serialize_field("methods", &self.methods)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["fullname", "is_module", "isModule", "methods"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Fullname, + IsModule, + Methods, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fullname" => Ok(GeneratedField::Fullname), + "isModule" | "is_module" => Ok(GeneratedField::IsModule), + "methods" => Ok(GeneratedField::Methods), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryServiceDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.QueryServiceDescriptor") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut fullname__ = None; + let mut is_module__ = None; + let mut methods__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Fullname => { + if fullname__.is_some() { + return Err(serde::de::Error::duplicate_field("fullname")); + } + fullname__ = Some(map.next_value()?); + } + GeneratedField::IsModule => { + if is_module__.is_some() { + return Err(serde::de::Error::duplicate_field("isModule")); + } + is_module__ = Some(map.next_value()?); + } + GeneratedField::Methods => { + if methods__.is_some() { + return Err(serde::de::Error::duplicate_field("methods")); + } + methods__ = Some(map.next_value()?); + } + } + } + Ok(QueryServiceDescriptor { + fullname: fullname__.unwrap_or_default(), + is_module: is_module__.unwrap_or_default(), + methods: methods__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.QueryServiceDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryServicesDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.query_services.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.reflection.v2alpha1.QueryServicesDescriptor", + len, + )?; + if !self.query_services.is_empty() { + struct_ser.serialize_field("queryServices", &self.query_services)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["query_services", "queryServices"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + QueryServices, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "queryServices" | "query_services" => Ok(GeneratedField::QueryServices), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryServicesDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.reflection.v2alpha1.QueryServicesDescriptor") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut query_services__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::QueryServices => { + if query_services__.is_some() { + return Err(serde::de::Error::duplicate_field("queryServices")); + } + query_services__ = Some(map.next_value()?); + } + } + } + Ok(QueryServicesDescriptor { + query_services: query_services__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.QueryServicesDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SigningModeDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if self.number != 0 { + len += 1; + } + if !self.authn_info_provider_method_fullname.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.base.reflection.v2alpha1.SigningModeDescriptor", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if self.number != 0 { + struct_ser.serialize_field("number", &self.number)?; + } + if !self.authn_info_provider_method_fullname.is_empty() { + struct_ser.serialize_field( + "authnInfoProviderMethodFullname", + &self.authn_info_provider_method_fullname, + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "name", + "number", + "authn_info_provider_method_fullname", + "authnInfoProviderMethodFullname", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Number, + AuthnInfoProviderMethodFullname, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "number" => Ok(GeneratedField::Number), + "authnInfoProviderMethodFullname" + | "authn_info_provider_method_fullname" => { + Ok(GeneratedField::AuthnInfoProviderMethodFullname) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SigningModeDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.SigningModeDescriptor") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut number__ = None; + let mut authn_info_provider_method_fullname__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Number => { + if number__.is_some() { + return Err(serde::de::Error::duplicate_field("number")); + } + number__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::AuthnInfoProviderMethodFullname => { + if authn_info_provider_method_fullname__.is_some() { + return Err(serde::de::Error::duplicate_field( + "authnInfoProviderMethodFullname", + )); + } + authn_info_provider_method_fullname__ = Some(map.next_value()?); + } + } + } + Ok(SigningModeDescriptor { + name: name__.unwrap_or_default(), + number: number__.unwrap_or_default(), + authn_info_provider_method_fullname: authn_info_provider_method_fullname__ + .unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.SigningModeDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for TxDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.fullname.is_empty() { + len += 1; + } + if !self.msgs.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.reflection.v2alpha1.TxDescriptor", len)?; + if !self.fullname.is_empty() { + struct_ser.serialize_field("fullname", &self.fullname)?; + } + if !self.msgs.is_empty() { + struct_ser.serialize_field("msgs", &self.msgs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TxDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["fullname", "msgs"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Fullname, + Msgs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fullname" => Ok(GeneratedField::Fullname), + "msgs" => Ok(GeneratedField::Msgs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TxDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.reflection.v2alpha1.TxDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut fullname__ = None; + let mut msgs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Fullname => { + if fullname__.is_some() { + return Err(serde::de::Error::duplicate_field("fullname")); + } + fullname__ = Some(map.next_value()?); + } + GeneratedField::Msgs => { + if msgs__.is_some() { + return Err(serde::de::Error::duplicate_field("msgs")); + } + msgs__ = Some(map.next_value()?); + } + } + } + Ok(TxDescriptor { + fullname: fullname__.unwrap_or_default(), + msgs: msgs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.reflection.v2alpha1.TxDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs index 8d80a25d..73be1e76 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs @@ -108,4 +108,5 @@ pub struct SnapshotSchema { #[prost(bytes = "vec", repeated, tag = "1")] pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } +include!("cosmos.base.snapshots.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs new file mode 100644 index 00000000..ecc4e5ba --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs @@ -0,0 +1,1177 @@ +// @generated +impl serde::Serialize for Metadata { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.chunk_hashes.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.snapshots.v1beta1.Metadata", len)?; + if !self.chunk_hashes.is_empty() { + struct_ser.serialize_field( + "chunkHashes", + &self + .chunk_hashes + .iter() + .map(pbjson::private::base64::encode) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Metadata { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["chunk_hashes", "chunkHashes"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ChunkHashes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "chunkHashes" | "chunk_hashes" => Ok(GeneratedField::ChunkHashes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Metadata; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.Metadata") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut chunk_hashes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ChunkHashes => { + if chunk_hashes__.is_some() { + return Err(serde::de::Error::duplicate_field("chunkHashes")); + } + chunk_hashes__ = Some( + map.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(Metadata { + chunk_hashes: chunk_hashes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.Metadata", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Snapshot { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if self.format != 0 { + len += 1; + } + if self.chunks != 0 { + len += 1; + } + if !self.hash.is_empty() { + len += 1; + } + if self.metadata.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.snapshots.v1beta1.Snapshot", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if self.format != 0 { + struct_ser.serialize_field("format", &self.format)?; + } + if self.chunks != 0 { + struct_ser.serialize_field("chunks", &self.chunks)?; + } + if !self.hash.is_empty() { + struct_ser + .serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; + } + if let Some(v) = self.metadata.as_ref() { + struct_ser.serialize_field("metadata", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Snapshot { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["height", "format", "chunks", "hash", "metadata"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Format, + Chunks, + Hash, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + "format" => Ok(GeneratedField::Format), + "chunks" => Ok(GeneratedField::Chunks), + "hash" => Ok(GeneratedField::Hash), + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Snapshot; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.Snapshot") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut format__ = None; + let mut chunks__ = None; + let mut hash__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Format => { + if format__.is_some() { + return Err(serde::de::Error::duplicate_field("format")); + } + format__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Chunks => { + if chunks__.is_some() { + return Err(serde::de::Error::duplicate_field("chunks")); + } + chunks__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = map.next_value()?; + } + } + } + Ok(Snapshot { + height: height__.unwrap_or_default(), + format: format__.unwrap_or_default(), + chunks: chunks__.unwrap_or_default(), + hash: hash__.unwrap_or_default(), + metadata: metadata__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.Snapshot", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SnapshotExtensionMeta { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if self.format != 0 { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if self.format != 0 { + struct_ser.serialize_field("format", &self.format)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "format"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Format, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "format" => Ok(GeneratedField::Format), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SnapshotExtensionMeta; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut format__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Format => { + if format__.is_some() { + return Err(serde::de::Error::duplicate_field("format")); + } + format__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(SnapshotExtensionMeta { + name: name__.unwrap_or_default(), + format: format__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SnapshotExtensionPayload { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.payload.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", + len, + )?; + if !self.payload.is_empty() { + struct_ser.serialize_field( + "payload", + pbjson::private::base64::encode(&self.payload).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["payload"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Payload, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "payload" => Ok(GeneratedField::Payload), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SnapshotExtensionPayload; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut payload__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Payload => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("payload")); + } + payload__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(SnapshotExtensionPayload { + payload: payload__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SnapshotIavlItem { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + if self.version != 0 { + len += 1; + } + if self.height != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if !self.value.is_empty() { + struct_ser.serialize_field( + "value", + pbjson::private::base64::encode(&self.value).as_str(), + )?; + } + if self.version != 0 { + struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; + } + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key", "value", "version", "height"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Value, + Version, + Height, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + "version" => Ok(GeneratedField::Version), + "height" => Ok(GeneratedField::Height), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SnapshotIavlItem; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotIAVLItem") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + let mut value__ = None; + let mut version__ = None; + let mut height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(SnapshotIavlItem { + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + version: version__.unwrap_or_default(), + height: height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SnapshotItem { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.item.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotItem", len)?; + if let Some(v) = self.item.as_ref() { + match v { + snapshot_item::Item::Store(v) => { + struct_ser.serialize_field("store", v)?; + } + snapshot_item::Item::Iavl(v) => { + struct_ser.serialize_field("iavl", v)?; + } + snapshot_item::Item::Extension(v) => { + struct_ser.serialize_field("extension", v)?; + } + snapshot_item::Item::ExtensionPayload(v) => { + struct_ser.serialize_field("extensionPayload", v)?; + } + snapshot_item::Item::Kv(v) => { + struct_ser.serialize_field("kv", v)?; + } + snapshot_item::Item::Schema(v) => { + struct_ser.serialize_field("schema", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SnapshotItem { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "store", + "iavl", + "extension", + "extension_payload", + "extensionPayload", + "kv", + "schema", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Store, + Iavl, + Extension, + ExtensionPayload, + Kv, + Schema, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "store" => Ok(GeneratedField::Store), + "iavl" => Ok(GeneratedField::Iavl), + "extension" => Ok(GeneratedField::Extension), + "extensionPayload" | "extension_payload" => { + Ok(GeneratedField::ExtensionPayload) + } + "kv" => Ok(GeneratedField::Kv), + "schema" => Ok(GeneratedField::Schema), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SnapshotItem; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotItem") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut item__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Store => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("store")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(snapshot_item::Item::Store); + } + GeneratedField::Iavl => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("iavl")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(snapshot_item::Item::Iavl); + } + GeneratedField::Extension => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("extension")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(snapshot_item::Item::Extension); + } + GeneratedField::ExtensionPayload => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("extensionPayload")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(snapshot_item::Item::ExtensionPayload); + } + GeneratedField::Kv => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("kv")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(snapshot_item::Item::Kv); + } + GeneratedField::Schema => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("schema")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(snapshot_item::Item::Schema); + } + } + } + Ok(SnapshotItem { item: item__ }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.SnapshotItem", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SnapshotKvItem { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotKVItem", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if !self.value.is_empty() { + struct_ser.serialize_field( + "value", + pbjson::private::base64::encode(&self.value).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SnapshotKvItem { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SnapshotKvItem; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotKVItem") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + let mut value__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(SnapshotKvItem { + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.SnapshotKVItem", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SnapshotSchema { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.keys.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotSchema", len)?; + if !self.keys.is_empty() { + struct_ser.serialize_field( + "keys", + &self + .keys + .iter() + .map(pbjson::private::base64::encode) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SnapshotSchema { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["keys"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Keys, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "keys" => Ok(GeneratedField::Keys), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SnapshotSchema; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotSchema") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut keys__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Keys => { + if keys__.is_some() { + return Err(serde::de::Error::duplicate_field("keys")); + } + keys__ = Some( + map.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(SnapshotSchema { + keys: keys__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.SnapshotSchema", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SnapshotStoreItem { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotStoreItem", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SnapshotStoreItem { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SnapshotStoreItem; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotStoreItem") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + } + } + Ok(SnapshotStoreItem { + name: name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.snapshots.v1beta1.SnapshotStoreItem", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs index 63f94a6d..39a113e9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs @@ -75,4 +75,5 @@ pub mod block_metadata { pub response: ::core::option::Option<::tendermint_proto::v0_34::abci::ResponseDeliverTx>, } } +include!("cosmos.base.store.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs new file mode 100644 index 00000000..dd0f8fe6 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs @@ -0,0 +1,823 @@ +// @generated +impl serde::Serialize for BlockMetadata { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.request_begin_block.is_some() { + len += 1; + } + if self.response_begin_block.is_some() { + len += 1; + } + if !self.deliver_txs.is_empty() { + len += 1; + } + if self.request_end_block.is_some() { + len += 1; + } + if self.response_end_block.is_some() { + len += 1; + } + if self.response_commit.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.store.v1beta1.BlockMetadata", len)?; + if let Some(v) = self.request_begin_block.as_ref() { + struct_ser.serialize_field("requestBeginBlock", v)?; + } + if let Some(v) = self.response_begin_block.as_ref() { + struct_ser.serialize_field("responseBeginBlock", v)?; + } + if !self.deliver_txs.is_empty() { + struct_ser.serialize_field("deliverTxs", &self.deliver_txs)?; + } + if let Some(v) = self.request_end_block.as_ref() { + struct_ser.serialize_field("requestEndBlock", v)?; + } + if let Some(v) = self.response_end_block.as_ref() { + struct_ser.serialize_field("responseEndBlock", v)?; + } + if let Some(v) = self.response_commit.as_ref() { + struct_ser.serialize_field("responseCommit", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BlockMetadata { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "request_begin_block", + "requestBeginBlock", + "response_begin_block", + "responseBeginBlock", + "deliver_txs", + "deliverTxs", + "request_end_block", + "requestEndBlock", + "response_end_block", + "responseEndBlock", + "response_commit", + "responseCommit", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RequestBeginBlock, + ResponseBeginBlock, + DeliverTxs, + RequestEndBlock, + ResponseEndBlock, + ResponseCommit, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "requestBeginBlock" | "request_begin_block" => { + Ok(GeneratedField::RequestBeginBlock) + } + "responseBeginBlock" | "response_begin_block" => { + Ok(GeneratedField::ResponseBeginBlock) + } + "deliverTxs" | "deliver_txs" => Ok(GeneratedField::DeliverTxs), + "requestEndBlock" | "request_end_block" => { + Ok(GeneratedField::RequestEndBlock) + } + "responseEndBlock" | "response_end_block" => { + Ok(GeneratedField::ResponseEndBlock) + } + "responseCommit" | "response_commit" => { + Ok(GeneratedField::ResponseCommit) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BlockMetadata; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.store.v1beta1.BlockMetadata") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut request_begin_block__ = None; + let mut response_begin_block__ = None; + let mut deliver_txs__ = None; + let mut request_end_block__ = None; + let mut response_end_block__ = None; + let mut response_commit__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::RequestBeginBlock => { + if request_begin_block__.is_some() { + return Err(serde::de::Error::duplicate_field("requestBeginBlock")); + } + request_begin_block__ = map.next_value()?; + } + GeneratedField::ResponseBeginBlock => { + if response_begin_block__.is_some() { + return Err(serde::de::Error::duplicate_field( + "responseBeginBlock", + )); + } + response_begin_block__ = map.next_value()?; + } + GeneratedField::DeliverTxs => { + if deliver_txs__.is_some() { + return Err(serde::de::Error::duplicate_field("deliverTxs")); + } + deliver_txs__ = Some(map.next_value()?); + } + GeneratedField::RequestEndBlock => { + if request_end_block__.is_some() { + return Err(serde::de::Error::duplicate_field("requestEndBlock")); + } + request_end_block__ = map.next_value()?; + } + GeneratedField::ResponseEndBlock => { + if response_end_block__.is_some() { + return Err(serde::de::Error::duplicate_field("responseEndBlock")); + } + response_end_block__ = map.next_value()?; + } + GeneratedField::ResponseCommit => { + if response_commit__.is_some() { + return Err(serde::de::Error::duplicate_field("responseCommit")); + } + response_commit__ = map.next_value()?; + } + } + } + Ok(BlockMetadata { + request_begin_block: request_begin_block__, + response_begin_block: response_begin_block__, + deliver_txs: deliver_txs__.unwrap_or_default(), + request_end_block: request_end_block__, + response_end_block: response_end_block__, + response_commit: response_commit__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.store.v1beta1.BlockMetadata", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for block_metadata::DeliverTx { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.request.is_some() { + len += 1; + } + if self.response.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.base.store.v1beta1.BlockMetadata.DeliverTx", len)?; + if let Some(v) = self.request.as_ref() { + struct_ser.serialize_field("request", v)?; + } + if let Some(v) = self.response.as_ref() { + struct_ser.serialize_field("response", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["request", "response"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Request, + Response, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "request" => Ok(GeneratedField::Request), + "response" => Ok(GeneratedField::Response), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = block_metadata::DeliverTx; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.store.v1beta1.BlockMetadata.DeliverTx") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut request__ = None; + let mut response__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Request => { + if request__.is_some() { + return Err(serde::de::Error::duplicate_field("request")); + } + request__ = map.next_value()?; + } + GeneratedField::Response => { + if response__.is_some() { + return Err(serde::de::Error::duplicate_field("response")); + } + response__ = map.next_value()?; + } + } + } + Ok(block_metadata::DeliverTx { + request: request__, + response: response__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.store.v1beta1.BlockMetadata.DeliverTx", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for CommitId { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.version != 0 { + len += 1; + } + if !self.hash.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.store.v1beta1.CommitID", len)?; + if self.version != 0 { + struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; + } + if !self.hash.is_empty() { + struct_ser + .serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CommitId { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["version", "hash"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Version, + Hash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "version" => Ok(GeneratedField::Version), + "hash" => Ok(GeneratedField::Hash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CommitId; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.store.v1beta1.CommitID") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut version__ = None; + let mut hash__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(CommitId { + version: version__.unwrap_or_default(), + hash: hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.store.v1beta1.CommitID", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for CommitInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.version != 0 { + len += 1; + } + if !self.store_infos.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.store.v1beta1.CommitInfo", len)?; + if self.version != 0 { + struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; + } + if !self.store_infos.is_empty() { + struct_ser.serialize_field("storeInfos", &self.store_infos)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CommitInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["version", "store_infos", "storeInfos"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Version, + StoreInfos, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "version" => Ok(GeneratedField::Version), + "storeInfos" | "store_infos" => Ok(GeneratedField::StoreInfos), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CommitInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.store.v1beta1.CommitInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut version__ = None; + let mut store_infos__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::StoreInfos => { + if store_infos__.is_some() { + return Err(serde::de::Error::duplicate_field("storeInfos")); + } + store_infos__ = Some(map.next_value()?); + } + } + } + Ok(CommitInfo { + version: version__.unwrap_or_default(), + store_infos: store_infos__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.store.v1beta1.CommitInfo", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for StoreInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if self.commit_id.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.store.v1beta1.StoreInfo", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if let Some(v) = self.commit_id.as_ref() { + struct_ser.serialize_field("commitId", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for StoreInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "commit_id", "commitId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + CommitId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "commitId" | "commit_id" => Ok(GeneratedField::CommitId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StoreInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.store.v1beta1.StoreInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut commit_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::CommitId => { + if commit_id__.is_some() { + return Err(serde::de::Error::duplicate_field("commitId")); + } + commit_id__ = map.next_value()?; + } + } + } + Ok(StoreInfo { + name: name__.unwrap_or_default(), + commit_id: commit_id__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.store.v1beta1.StoreInfo", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for StoreKvPair { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.store_key.is_empty() { + len += 1; + } + if self.delete { + len += 1; + } + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.store.v1beta1.StoreKVPair", len)?; + if !self.store_key.is_empty() { + struct_ser.serialize_field("storeKey", &self.store_key)?; + } + if self.delete { + struct_ser.serialize_field("delete", &self.delete)?; + } + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if !self.value.is_empty() { + struct_ser.serialize_field( + "value", + pbjson::private::base64::encode(&self.value).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for StoreKvPair { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["store_key", "storeKey", "delete", "key", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + StoreKey, + Delete, + Key, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "storeKey" | "store_key" => Ok(GeneratedField::StoreKey), + "delete" => Ok(GeneratedField::Delete), + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StoreKvPair; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.store.v1beta1.StoreKVPair") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut store_key__ = None; + let mut delete__ = None; + let mut key__ = None; + let mut value__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::StoreKey => { + if store_key__.is_some() { + return Err(serde::de::Error::duplicate_field("storeKey")); + } + store_key__ = Some(map.next_value()?); + } + GeneratedField::Delete => { + if delete__.is_some() { + return Err(serde::de::Error::duplicate_field("delete")); + } + delete__ = Some(map.next_value()?); + } + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(StoreKvPair { + store_key: store_key__.unwrap_or_default(), + delete: delete__.unwrap_or_default(), + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.store.v1beta1.StoreKVPair", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs index e6de1499..d4c36abf 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs @@ -275,5 +275,6 @@ pub struct ProofOps { #[prost(message, repeated, tag = "1")] pub ops: ::prost::alloc::vec::Vec, } +include!("cosmos.base.tendermint.v1beta1.serde.rs"); include!("cosmos.base.tendermint.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs new file mode 100644 index 00000000..794fdd91 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs @@ -0,0 +1,3037 @@ +// @generated +impl serde::Serialize for AbciQueryRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + if !self.path.is_empty() { + len += 1; + } + if self.height != 0 { + len += 1; + } + if self.prove { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.ABCIQueryRequest", len)?; + if !self.data.is_empty() { + struct_ser + .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + } + if !self.path.is_empty() { + struct_ser.serialize_field("path", &self.path)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if self.prove { + struct_ser.serialize_field("prove", &self.prove)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AbciQueryRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data", "path", "height", "prove"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + Path, + Height, + Prove, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "data" => Ok(GeneratedField::Data), + "path" => Ok(GeneratedField::Path), + "height" => Ok(GeneratedField::Height), + "prove" => Ok(GeneratedField::Prove), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AbciQueryRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.ABCIQueryRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + let mut path__ = None; + let mut height__ = None; + let mut prove__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Path => { + if path__.is_some() { + return Err(serde::de::Error::duplicate_field("path")); + } + path__ = Some(map.next_value()?); + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Prove => { + if prove__.is_some() { + return Err(serde::de::Error::duplicate_field("prove")); + } + prove__ = Some(map.next_value()?); + } + } + } + Ok(AbciQueryRequest { + data: data__.unwrap_or_default(), + path: path__.unwrap_or_default(), + height: height__.unwrap_or_default(), + prove: prove__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.ABCIQueryRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AbciQueryResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code != 0 { + len += 1; + } + if !self.log.is_empty() { + len += 1; + } + if !self.info.is_empty() { + len += 1; + } + if self.index != 0 { + len += 1; + } + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + if self.proof_ops.is_some() { + len += 1; + } + if self.height != 0 { + len += 1; + } + if !self.codespace.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.ABCIQueryResponse", len)?; + if self.code != 0 { + struct_ser.serialize_field("code", &self.code)?; + } + if !self.log.is_empty() { + struct_ser.serialize_field("log", &self.log)?; + } + if !self.info.is_empty() { + struct_ser.serialize_field("info", &self.info)?; + } + if self.index != 0 { + struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; + } + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if !self.value.is_empty() { + struct_ser.serialize_field( + "value", + pbjson::private::base64::encode(&self.value).as_str(), + )?; + } + if let Some(v) = self.proof_ops.as_ref() { + struct_ser.serialize_field("proofOps", v)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if !self.codespace.is_empty() { + struct_ser.serialize_field("codespace", &self.codespace)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AbciQueryResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code", + "log", + "info", + "index", + "key", + "value", + "proof_ops", + "proofOps", + "height", + "codespace", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Code, + Log, + Info, + Index, + Key, + Value, + ProofOps, + Height, + Codespace, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "code" => Ok(GeneratedField::Code), + "log" => Ok(GeneratedField::Log), + "info" => Ok(GeneratedField::Info), + "index" => Ok(GeneratedField::Index), + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + "proofOps" | "proof_ops" => Ok(GeneratedField::ProofOps), + "height" => Ok(GeneratedField::Height), + "codespace" => Ok(GeneratedField::Codespace), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AbciQueryResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.ABCIQueryResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code__ = None; + let mut log__ = None; + let mut info__ = None; + let mut index__ = None; + let mut key__ = None; + let mut value__ = None; + let mut proof_ops__ = None; + let mut height__ = None; + let mut codespace__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Code => { + if code__.is_some() { + return Err(serde::de::Error::duplicate_field("code")); + } + code__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Log => { + if log__.is_some() { + return Err(serde::de::Error::duplicate_field("log")); + } + log__ = Some(map.next_value()?); + } + GeneratedField::Info => { + if info__.is_some() { + return Err(serde::de::Error::duplicate_field("info")); + } + info__ = Some(map.next_value()?); + } + GeneratedField::Index => { + if index__.is_some() { + return Err(serde::de::Error::duplicate_field("index")); + } + index__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::ProofOps => { + if proof_ops__.is_some() { + return Err(serde::de::Error::duplicate_field("proofOps")); + } + proof_ops__ = map.next_value()?; + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Codespace => { + if codespace__.is_some() { + return Err(serde::de::Error::duplicate_field("codespace")); + } + codespace__ = Some(map.next_value()?); + } + } + } + Ok(AbciQueryResponse { + code: code__.unwrap_or_default(), + log: log__.unwrap_or_default(), + info: info__.unwrap_or_default(), + index: index__.unwrap_or_default(), + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + proof_ops: proof_ops__, + height: height__.unwrap_or_default(), + codespace: codespace__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.ABCIQueryResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Block { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.header.is_some() { + len += 1; + } + if self.data.is_some() { + len += 1; + } + if self.evidence.is_some() { + len += 1; + } + if self.last_commit.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.Block", len)?; + if let Some(v) = self.header.as_ref() { + struct_ser.serialize_field("header", v)?; + } + if let Some(v) = self.data.as_ref() { + struct_ser.serialize_field("data", v)?; + } + if let Some(v) = self.evidence.as_ref() { + struct_ser.serialize_field("evidence", v)?; + } + if let Some(v) = self.last_commit.as_ref() { + struct_ser.serialize_field("lastCommit", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Block { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["header", "data", "evidence", "last_commit", "lastCommit"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Header, + Data, + Evidence, + LastCommit, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "header" => Ok(GeneratedField::Header), + "data" => Ok(GeneratedField::Data), + "evidence" => Ok(GeneratedField::Evidence), + "lastCommit" | "last_commit" => Ok(GeneratedField::LastCommit), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Block; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.Block") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut header__ = None; + let mut data__ = None; + let mut evidence__ = None; + let mut last_commit__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Header => { + if header__.is_some() { + return Err(serde::de::Error::duplicate_field("header")); + } + header__ = map.next_value()?; + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = map.next_value()?; + } + GeneratedField::Evidence => { + if evidence__.is_some() { + return Err(serde::de::Error::duplicate_field("evidence")); + } + evidence__ = map.next_value()?; + } + GeneratedField::LastCommit => { + if last_commit__.is_some() { + return Err(serde::de::Error::duplicate_field("lastCommit")); + } + last_commit__ = map.next_value()?; + } + } + } + Ok(Block { + header: header__, + data: data__, + evidence: evidence__, + last_commit: last_commit__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.Block", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetBlockByHeightRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest", + len, + )?; + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockByHeightRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["height"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockByHeightRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(GetBlockByHeightRequest { + height: height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetBlockByHeightResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.block_id.is_some() { + len += 1; + } + if self.block.is_some() { + len += 1; + } + if self.sdk_block.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse", + len, + )?; + if let Some(v) = self.block_id.as_ref() { + struct_ser.serialize_field("blockId", v)?; + } + if let Some(v) = self.block.as_ref() { + struct_ser.serialize_field("block", v)?; + } + if let Some(v) = self.sdk_block.as_ref() { + struct_ser.serialize_field("sdkBlock", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["block_id", "blockId", "block", "sdk_block", "sdkBlock"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BlockId, + Block, + SdkBlock, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "blockId" | "block_id" => Ok(GeneratedField::BlockId), + "block" => Ok(GeneratedField::Block), + "sdkBlock" | "sdk_block" => Ok(GeneratedField::SdkBlock), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockByHeightResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut block_id__ = None; + let mut block__ = None; + let mut sdk_block__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BlockId => { + if block_id__.is_some() { + return Err(serde::de::Error::duplicate_field("blockId")); + } + block_id__ = map.next_value()?; + } + GeneratedField::Block => { + if block__.is_some() { + return Err(serde::de::Error::duplicate_field("block")); + } + block__ = map.next_value()?; + } + GeneratedField::SdkBlock => { + if sdk_block__.is_some() { + return Err(serde::de::Error::duplicate_field("sdkBlock")); + } + sdk_block__ = map.next_value()?; + } + } + } + Ok(GetBlockByHeightResponse { + block_id: block_id__, + block: block__, + sdk_block: sdk_block__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetLatestBlockRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.base.tendermint.v1beta1.GetLatestBlockRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetLatestBlockRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetLatestBlockRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetLatestBlockRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetLatestBlockRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetLatestBlockRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetLatestBlockResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.block_id.is_some() { + len += 1; + } + if self.block.is_some() { + len += 1; + } + if self.sdk_block.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.base.tendermint.v1beta1.GetLatestBlockResponse", len)?; + if let Some(v) = self.block_id.as_ref() { + struct_ser.serialize_field("blockId", v)?; + } + if let Some(v) = self.block.as_ref() { + struct_ser.serialize_field("block", v)?; + } + if let Some(v) = self.sdk_block.as_ref() { + struct_ser.serialize_field("sdkBlock", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["block_id", "blockId", "block", "sdk_block", "sdkBlock"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BlockId, + Block, + SdkBlock, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "blockId" | "block_id" => Ok(GeneratedField::BlockId), + "block" => Ok(GeneratedField::Block), + "sdkBlock" | "sdk_block" => Ok(GeneratedField::SdkBlock), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetLatestBlockResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetLatestBlockResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut block_id__ = None; + let mut block__ = None; + let mut sdk_block__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BlockId => { + if block_id__.is_some() { + return Err(serde::de::Error::duplicate_field("blockId")); + } + block_id__ = map.next_value()?; + } + GeneratedField::Block => { + if block__.is_some() { + return Err(serde::de::Error::duplicate_field("block")); + } + block__ = map.next_value()?; + } + GeneratedField::SdkBlock => { + if sdk_block__.is_some() { + return Err(serde::de::Error::duplicate_field("sdkBlock")); + } + sdk_block__ = map.next_value()?; + } + } + } + Ok(GetLatestBlockResponse { + block_id: block_id__, + block: block__, + sdk_block: sdk_block__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetLatestValidatorSetRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest", + len, + )?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetLatestValidatorSetRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(GetLatestValidatorSetRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetLatestValidatorSetResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.block_height != 0 { + len += 1; + } + if !self.validators.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse", + len, + )?; + if self.block_height != 0 { + struct_ser.serialize_field( + "blockHeight", + ToString::to_string(&self.block_height).as_str(), + )?; + } + if !self.validators.is_empty() { + struct_ser.serialize_field("validators", &self.validators)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["block_height", "blockHeight", "validators", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BlockHeight, + Validators, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "blockHeight" | "block_height" => Ok(GeneratedField::BlockHeight), + "validators" => Ok(GeneratedField::Validators), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetLatestValidatorSetResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut block_height__ = None; + let mut validators__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BlockHeight => { + if block_height__.is_some() { + return Err(serde::de::Error::duplicate_field("blockHeight")); + } + block_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Validators => { + if validators__.is_some() { + return Err(serde::de::Error::duplicate_field("validators")); + } + validators__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(GetLatestValidatorSetResponse { + block_height: block_height__.unwrap_or_default(), + validators: validators__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetNodeInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.base.tendermint.v1beta1.GetNodeInfoRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetNodeInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetNodeInfoRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetNodeInfoRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetNodeInfoRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetNodeInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.default_node_info.is_some() { + len += 1; + } + if self.application_version.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.base.tendermint.v1beta1.GetNodeInfoResponse", len)?; + if let Some(v) = self.default_node_info.as_ref() { + struct_ser.serialize_field("defaultNodeInfo", v)?; + } + if let Some(v) = self.application_version.as_ref() { + struct_ser.serialize_field("applicationVersion", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "default_node_info", + "defaultNodeInfo", + "application_version", + "applicationVersion", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DefaultNodeInfo, + ApplicationVersion, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "defaultNodeInfo" | "default_node_info" => { + Ok(GeneratedField::DefaultNodeInfo) + } + "applicationVersion" | "application_version" => { + Ok(GeneratedField::ApplicationVersion) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetNodeInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetNodeInfoResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut default_node_info__ = None; + let mut application_version__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DefaultNodeInfo => { + if default_node_info__.is_some() { + return Err(serde::de::Error::duplicate_field("defaultNodeInfo")); + } + default_node_info__ = map.next_value()?; + } + GeneratedField::ApplicationVersion => { + if application_version__.is_some() { + return Err(serde::de::Error::duplicate_field( + "applicationVersion", + )); + } + application_version__ = map.next_value()?; + } + } + } + Ok(GetNodeInfoResponse { + default_node_info: default_node_info__, + application_version: application_version__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetSyncingRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.GetSyncingRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetSyncingRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = GetSyncingRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetSyncingRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetSyncingRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetSyncingRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetSyncingResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.syncing { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.base.tendermint.v1beta1.GetSyncingResponse", len)?; + if self.syncing { + struct_ser.serialize_field("syncing", &self.syncing)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetSyncingResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["syncing"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Syncing, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "syncing" => Ok(GeneratedField::Syncing), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetSyncingResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetSyncingResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut syncing__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Syncing => { + if syncing__.is_some() { + return Err(serde::de::Error::duplicate_field("syncing")); + } + syncing__ = Some(map.next_value()?); + } + } + } + Ok(GetSyncingResponse { + syncing: syncing__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetSyncingResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetValidatorSetByHeightRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest", + len, + )?; + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["height", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorSetByHeightRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(GetValidatorSetByHeightRequest { + height: height__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetValidatorSetByHeightResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.block_height != 0 { + len += 1; + } + if !self.validators.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse", + len, + )?; + if self.block_height != 0 { + struct_ser.serialize_field( + "blockHeight", + ToString::to_string(&self.block_height).as_str(), + )?; + } + if !self.validators.is_empty() { + struct_ser.serialize_field("validators", &self.validators)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["block_height", "blockHeight", "validators", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BlockHeight, + Validators, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "blockHeight" | "block_height" => Ok(GeneratedField::BlockHeight), + "validators" => Ok(GeneratedField::Validators), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorSetByHeightResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut block_height__ = None; + let mut validators__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BlockHeight => { + if block_height__.is_some() { + return Err(serde::de::Error::duplicate_field("blockHeight")); + } + block_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Validators => { + if validators__.is_some() { + return Err(serde::de::Error::duplicate_field("validators")); + } + validators__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(GetValidatorSetByHeightResponse { + block_height: block_height__.unwrap_or_default(), + validators: validators__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Header { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.version.is_some() { + len += 1; + } + if !self.chain_id.is_empty() { + len += 1; + } + if self.height != 0 { + len += 1; + } + if self.time.is_some() { + len += 1; + } + if self.last_block_id.is_some() { + len += 1; + } + if !self.last_commit_hash.is_empty() { + len += 1; + } + if !self.data_hash.is_empty() { + len += 1; + } + if !self.validators_hash.is_empty() { + len += 1; + } + if !self.next_validators_hash.is_empty() { + len += 1; + } + if !self.consensus_hash.is_empty() { + len += 1; + } + if !self.app_hash.is_empty() { + len += 1; + } + if !self.last_results_hash.is_empty() { + len += 1; + } + if !self.evidence_hash.is_empty() { + len += 1; + } + if !self.proposer_address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.Header", len)?; + if let Some(v) = self.version.as_ref() { + struct_ser.serialize_field("version", v)?; + } + if !self.chain_id.is_empty() { + struct_ser.serialize_field("chainId", &self.chain_id)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if let Some(v) = self.time.as_ref() { + struct_ser.serialize_field("time", v)?; + } + if let Some(v) = self.last_block_id.as_ref() { + struct_ser.serialize_field("lastBlockId", v)?; + } + if !self.last_commit_hash.is_empty() { + struct_ser.serialize_field( + "lastCommitHash", + pbjson::private::base64::encode(&self.last_commit_hash).as_str(), + )?; + } + if !self.data_hash.is_empty() { + struct_ser.serialize_field( + "dataHash", + pbjson::private::base64::encode(&self.data_hash).as_str(), + )?; + } + if !self.validators_hash.is_empty() { + struct_ser.serialize_field( + "validatorsHash", + pbjson::private::base64::encode(&self.validators_hash).as_str(), + )?; + } + if !self.next_validators_hash.is_empty() { + struct_ser.serialize_field( + "nextValidatorsHash", + pbjson::private::base64::encode(&self.next_validators_hash).as_str(), + )?; + } + if !self.consensus_hash.is_empty() { + struct_ser.serialize_field( + "consensusHash", + pbjson::private::base64::encode(&self.consensus_hash).as_str(), + )?; + } + if !self.app_hash.is_empty() { + struct_ser.serialize_field( + "appHash", + pbjson::private::base64::encode(&self.app_hash).as_str(), + )?; + } + if !self.last_results_hash.is_empty() { + struct_ser.serialize_field( + "lastResultsHash", + pbjson::private::base64::encode(&self.last_results_hash).as_str(), + )?; + } + if !self.evidence_hash.is_empty() { + struct_ser.serialize_field( + "evidenceHash", + pbjson::private::base64::encode(&self.evidence_hash).as_str(), + )?; + } + if !self.proposer_address.is_empty() { + struct_ser.serialize_field("proposerAddress", &self.proposer_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Header { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "version", + "chain_id", + "chainId", + "height", + "time", + "last_block_id", + "lastBlockId", + "last_commit_hash", + "lastCommitHash", + "data_hash", + "dataHash", + "validators_hash", + "validatorsHash", + "next_validators_hash", + "nextValidatorsHash", + "consensus_hash", + "consensusHash", + "app_hash", + "appHash", + "last_results_hash", + "lastResultsHash", + "evidence_hash", + "evidenceHash", + "proposer_address", + "proposerAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Version, + ChainId, + Height, + Time, + LastBlockId, + LastCommitHash, + DataHash, + ValidatorsHash, + NextValidatorsHash, + ConsensusHash, + AppHash, + LastResultsHash, + EvidenceHash, + ProposerAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "version" => Ok(GeneratedField::Version), + "chainId" | "chain_id" => Ok(GeneratedField::ChainId), + "height" => Ok(GeneratedField::Height), + "time" => Ok(GeneratedField::Time), + "lastBlockId" | "last_block_id" => Ok(GeneratedField::LastBlockId), + "lastCommitHash" | "last_commit_hash" => { + Ok(GeneratedField::LastCommitHash) + } + "dataHash" | "data_hash" => Ok(GeneratedField::DataHash), + "validatorsHash" | "validators_hash" => { + Ok(GeneratedField::ValidatorsHash) + } + "nextValidatorsHash" | "next_validators_hash" => { + Ok(GeneratedField::NextValidatorsHash) + } + "consensusHash" | "consensus_hash" => Ok(GeneratedField::ConsensusHash), + "appHash" | "app_hash" => Ok(GeneratedField::AppHash), + "lastResultsHash" | "last_results_hash" => { + Ok(GeneratedField::LastResultsHash) + } + "evidenceHash" | "evidence_hash" => Ok(GeneratedField::EvidenceHash), + "proposerAddress" | "proposer_address" => { + Ok(GeneratedField::ProposerAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Header; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.Header") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut version__ = None; + let mut chain_id__ = None; + let mut height__ = None; + let mut time__ = None; + let mut last_block_id__ = None; + let mut last_commit_hash__ = None; + let mut data_hash__ = None; + let mut validators_hash__ = None; + let mut next_validators_hash__ = None; + let mut consensus_hash__ = None; + let mut app_hash__ = None; + let mut last_results_hash__ = None; + let mut evidence_hash__ = None; + let mut proposer_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = map.next_value()?; + } + GeneratedField::ChainId => { + if chain_id__.is_some() { + return Err(serde::de::Error::duplicate_field("chainId")); + } + chain_id__ = Some(map.next_value()?); + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Time => { + if time__.is_some() { + return Err(serde::de::Error::duplicate_field("time")); + } + time__ = map.next_value()?; + } + GeneratedField::LastBlockId => { + if last_block_id__.is_some() { + return Err(serde::de::Error::duplicate_field("lastBlockId")); + } + last_block_id__ = map.next_value()?; + } + GeneratedField::LastCommitHash => { + if last_commit_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("lastCommitHash")); + } + last_commit_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::DataHash => { + if data_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("dataHash")); + } + data_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::ValidatorsHash => { + if validators_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorsHash")); + } + validators_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::NextValidatorsHash => { + if next_validators_hash__.is_some() { + return Err(serde::de::Error::duplicate_field( + "nextValidatorsHash", + )); + } + next_validators_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::ConsensusHash => { + if consensus_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("consensusHash")); + } + consensus_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::AppHash => { + if app_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("appHash")); + } + app_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::LastResultsHash => { + if last_results_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("lastResultsHash")); + } + last_results_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::EvidenceHash => { + if evidence_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("evidenceHash")); + } + evidence_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::ProposerAddress => { + if proposer_address__.is_some() { + return Err(serde::de::Error::duplicate_field("proposerAddress")); + } + proposer_address__ = Some(map.next_value()?); + } + } + } + Ok(Header { + version: version__, + chain_id: chain_id__.unwrap_or_default(), + height: height__.unwrap_or_default(), + time: time__, + last_block_id: last_block_id__, + last_commit_hash: last_commit_hash__.unwrap_or_default(), + data_hash: data_hash__.unwrap_or_default(), + validators_hash: validators_hash__.unwrap_or_default(), + next_validators_hash: next_validators_hash__.unwrap_or_default(), + consensus_hash: consensus_hash__.unwrap_or_default(), + app_hash: app_hash__.unwrap_or_default(), + last_results_hash: last_results_hash__.unwrap_or_default(), + evidence_hash: evidence_hash__.unwrap_or_default(), + proposer_address: proposer_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.Header", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Module { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.path.is_empty() { + len += 1; + } + if !self.version.is_empty() { + len += 1; + } + if !self.sum.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.Module", len)?; + if !self.path.is_empty() { + struct_ser.serialize_field("path", &self.path)?; + } + if !self.version.is_empty() { + struct_ser.serialize_field("version", &self.version)?; + } + if !self.sum.is_empty() { + struct_ser.serialize_field("sum", &self.sum)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Module { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["path", "version", "sum"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Path, + Version, + Sum, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "path" => Ok(GeneratedField::Path), + "version" => Ok(GeneratedField::Version), + "sum" => Ok(GeneratedField::Sum), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Module; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.Module") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut path__ = None; + let mut version__ = None; + let mut sum__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Path => { + if path__.is_some() { + return Err(serde::de::Error::duplicate_field("path")); + } + path__ = Some(map.next_value()?); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some(map.next_value()?); + } + GeneratedField::Sum => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("sum")); + } + sum__ = Some(map.next_value()?); + } + } + } + Ok(Module { + path: path__.unwrap_or_default(), + version: version__.unwrap_or_default(), + sum: sum__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.Module", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ProofOp { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.r#type.is_empty() { + len += 1; + } + if !self.key.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.ProofOp", len)?; + if !self.r#type.is_empty() { + struct_ser.serialize_field("type", &self.r#type)?; + } + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if !self.data.is_empty() { + struct_ser + .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ProofOp { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["type", "key", "data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Type, + Key, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "type" => Ok(GeneratedField::Type), + "key" => Ok(GeneratedField::Key), + "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 = ProofOp; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.ProofOp") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut r#type__ = None; + let mut key__ = None; + let mut data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Type => { + if r#type__.is_some() { + return Err(serde::de::Error::duplicate_field("type")); + } + r#type__ = Some(map.next_value()?); + } + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .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(ProofOp { + r#type: r#type__.unwrap_or_default(), + key: key__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.ProofOp", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ProofOps { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.ops.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.ProofOps", len)?; + if !self.ops.is_empty() { + struct_ser.serialize_field("ops", &self.ops)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ProofOps { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["ops"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Ops, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "ops" => Ok(GeneratedField::Ops), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ProofOps; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.ProofOps") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut ops__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Ops => { + if ops__.is_some() { + return Err(serde::de::Error::duplicate_field("ops")); + } + ops__ = Some(map.next_value()?); + } + } + } + Ok(ProofOps { + ops: ops__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.ProofOps", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Validator { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.pub_key.is_some() { + len += 1; + } + if self.voting_power != 0 { + len += 1; + } + if self.proposer_priority != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.Validator", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pub_key.as_ref() { + struct_ser.serialize_field("pubKey", v)?; + } + if self.voting_power != 0 { + struct_ser.serialize_field( + "votingPower", + ToString::to_string(&self.voting_power).as_str(), + )?; + } + if self.proposer_priority != 0 { + struct_ser.serialize_field( + "proposerPriority", + ToString::to_string(&self.proposer_priority).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Validator { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + "pub_key", + "pubKey", + "voting_power", + "votingPower", + "proposer_priority", + "proposerPriority", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + PubKey, + VotingPower, + ProposerPriority, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "pubKey" | "pub_key" => Ok(GeneratedField::PubKey), + "votingPower" | "voting_power" => Ok(GeneratedField::VotingPower), + "proposerPriority" | "proposer_priority" => { + Ok(GeneratedField::ProposerPriority) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Validator; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.Validator") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut pub_key__ = None; + let mut voting_power__ = None; + let mut proposer_priority__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::PubKey => { + if pub_key__.is_some() { + return Err(serde::de::Error::duplicate_field("pubKey")); + } + pub_key__ = map.next_value()?; + } + GeneratedField::VotingPower => { + if voting_power__.is_some() { + return Err(serde::de::Error::duplicate_field("votingPower")); + } + voting_power__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::ProposerPriority => { + if proposer_priority__.is_some() { + return Err(serde::de::Error::duplicate_field("proposerPriority")); + } + proposer_priority__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Validator { + address: address__.unwrap_or_default(), + pub_key: pub_key__, + voting_power: voting_power__.unwrap_or_default(), + proposer_priority: proposer_priority__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.Validator", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for VersionInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if !self.app_name.is_empty() { + len += 1; + } + if !self.version.is_empty() { + len += 1; + } + if !self.git_commit.is_empty() { + len += 1; + } + if !self.build_tags.is_empty() { + len += 1; + } + if !self.go_version.is_empty() { + len += 1; + } + if !self.build_deps.is_empty() { + len += 1; + } + if !self.cosmos_sdk_version.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.tendermint.v1beta1.VersionInfo", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.app_name.is_empty() { + struct_ser.serialize_field("appName", &self.app_name)?; + } + if !self.version.is_empty() { + struct_ser.serialize_field("version", &self.version)?; + } + if !self.git_commit.is_empty() { + struct_ser.serialize_field("gitCommit", &self.git_commit)?; + } + if !self.build_tags.is_empty() { + struct_ser.serialize_field("buildTags", &self.build_tags)?; + } + if !self.go_version.is_empty() { + struct_ser.serialize_field("goVersion", &self.go_version)?; + } + if !self.build_deps.is_empty() { + struct_ser.serialize_field("buildDeps", &self.build_deps)?; + } + if !self.cosmos_sdk_version.is_empty() { + struct_ser.serialize_field("cosmosSdkVersion", &self.cosmos_sdk_version)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for VersionInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "name", + "app_name", + "appName", + "version", + "git_commit", + "gitCommit", + "build_tags", + "buildTags", + "go_version", + "goVersion", + "build_deps", + "buildDeps", + "cosmos_sdk_version", + "cosmosSdkVersion", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + AppName, + Version, + GitCommit, + BuildTags, + GoVersion, + BuildDeps, + CosmosSdkVersion, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "appName" | "app_name" => Ok(GeneratedField::AppName), + "version" => Ok(GeneratedField::Version), + "gitCommit" | "git_commit" => Ok(GeneratedField::GitCommit), + "buildTags" | "build_tags" => Ok(GeneratedField::BuildTags), + "goVersion" | "go_version" => Ok(GeneratedField::GoVersion), + "buildDeps" | "build_deps" => Ok(GeneratedField::BuildDeps), + "cosmosSdkVersion" | "cosmos_sdk_version" => { + Ok(GeneratedField::CosmosSdkVersion) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VersionInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.tendermint.v1beta1.VersionInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut app_name__ = None; + let mut version__ = None; + let mut git_commit__ = None; + let mut build_tags__ = None; + let mut go_version__ = None; + let mut build_deps__ = None; + let mut cosmos_sdk_version__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::AppName => { + if app_name__.is_some() { + return Err(serde::de::Error::duplicate_field("appName")); + } + app_name__ = Some(map.next_value()?); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some(map.next_value()?); + } + GeneratedField::GitCommit => { + if git_commit__.is_some() { + return Err(serde::de::Error::duplicate_field("gitCommit")); + } + git_commit__ = Some(map.next_value()?); + } + GeneratedField::BuildTags => { + if build_tags__.is_some() { + return Err(serde::de::Error::duplicate_field("buildTags")); + } + build_tags__ = Some(map.next_value()?); + } + GeneratedField::GoVersion => { + if go_version__.is_some() { + return Err(serde::de::Error::duplicate_field("goVersion")); + } + go_version__ = Some(map.next_value()?); + } + GeneratedField::BuildDeps => { + if build_deps__.is_some() { + return Err(serde::de::Error::duplicate_field("buildDeps")); + } + build_deps__ = Some(map.next_value()?); + } + GeneratedField::CosmosSdkVersion => { + if cosmos_sdk_version__.is_some() { + return Err(serde::de::Error::duplicate_field("cosmosSdkVersion")); + } + cosmos_sdk_version__ = Some(map.next_value()?); + } + } + } + Ok(VersionInfo { + name: name__.unwrap_or_default(), + app_name: app_name__.unwrap_or_default(), + version: version__.unwrap_or_default(), + git_commit: git_commit__.unwrap_or_default(), + build_tags: build_tags__.unwrap_or_default(), + go_version: go_version__.unwrap_or_default(), + build_deps: build_deps__.unwrap_or_default(), + cosmos_sdk_version: cosmos_sdk_version__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.tendermint.v1beta1.VersionInfo", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs index cc4421b2..b536e326 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs @@ -33,4 +33,5 @@ pub struct DecProto { #[prost(string, tag = "1")] pub dec: ::prost::alloc::string::String, } +include!("cosmos.base.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs new file mode 100644 index 00000000..27675988 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs @@ -0,0 +1,401 @@ +// @generated +impl serde::Serialize for Coin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.Coin", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Coin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Coin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.v1beta1.Coin") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(Coin { + denom: denom__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.v1beta1.Coin", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DecCoin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.DecCoin", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DecCoin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DecCoin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.v1beta1.DecCoin") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(DecCoin { + denom: denom__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.v1beta1.DecCoin", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DecProto { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.dec.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.DecProto", len)?; + if !self.dec.is_empty() { + struct_ser.serialize_field("dec", &self.dec)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DecProto { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["dec"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Dec, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "dec" => Ok(GeneratedField::Dec), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DecProto; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.v1beta1.DecProto") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut dec__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Dec => { + if dec__.is_some() { + return Err(serde::de::Error::duplicate_field("dec")); + } + dec__ = Some(map.next_value()?); + } + } + } + Ok(DecProto { + dec: dec__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.v1beta1.DecProto", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for IntProto { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.int.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.IntProto", len)?; + if !self.int.is_empty() { + struct_ser.serialize_field("int", &self.int)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for IntProto { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["int"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Int, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "int" => Ok(GeneratedField::Int), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = IntProto; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.v1beta1.IntProto") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut int__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Int => { + if int__.is_some() { + return Err(serde::de::Error::duplicate_field("int")); + } + int__ = Some(map.next_value()?); + } + } + } + Ok(IntProto { + int: int__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.v1beta1.IntProto", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs index b1c83050..d095b226 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs @@ -43,4 +43,5 @@ pub struct GenesisState { #[prost(message, repeated, tag = "2")] pub owners: ::prost::alloc::vec::Vec, } +include!("cosmos.capability.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs new file mode 100644 index 00000000..6a3201d0 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs @@ -0,0 +1,538 @@ +// @generated +impl serde::Serialize for Capability { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.index != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.capability.v1beta1.Capability", len)?; + if self.index != 0 { + struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Capability { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["index"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Index, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "index" => Ok(GeneratedField::Index), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Capability; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.capability.v1beta1.Capability") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut index__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Index => { + if index__.is_some() { + return Err(serde::de::Error::duplicate_field("index")); + } + index__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Capability { + index: index__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.capability.v1beta1.Capability", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for CapabilityOwners { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.owners.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.capability.v1beta1.CapabilityOwners", len)?; + if !self.owners.is_empty() { + struct_ser.serialize_field("owners", &self.owners)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CapabilityOwners { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["owners"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Owners, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "owners" => Ok(GeneratedField::Owners), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CapabilityOwners; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.capability.v1beta1.CapabilityOwners") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut owners__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Owners => { + if owners__.is_some() { + return Err(serde::de::Error::duplicate_field("owners")); + } + owners__ = Some(map.next_value()?); + } + } + } + Ok(CapabilityOwners { + owners: owners__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.capability.v1beta1.CapabilityOwners", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisOwners { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.index != 0 { + len += 1; + } + if self.index_owners.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.capability.v1beta1.GenesisOwners", len)?; + if self.index != 0 { + struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; + } + if let Some(v) = self.index_owners.as_ref() { + struct_ser.serialize_field("indexOwners", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisOwners { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["index", "index_owners", "indexOwners"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Index, + IndexOwners, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "index" => Ok(GeneratedField::Index), + "indexOwners" | "index_owners" => Ok(GeneratedField::IndexOwners), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisOwners; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.capability.v1beta1.GenesisOwners") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut index__ = None; + let mut index_owners__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Index => { + if index__.is_some() { + return Err(serde::de::Error::duplicate_field("index")); + } + index__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::IndexOwners => { + if index_owners__.is_some() { + return Err(serde::de::Error::duplicate_field("indexOwners")); + } + index_owners__ = map.next_value()?; + } + } + } + Ok(GenesisOwners { + index: index__.unwrap_or_default(), + index_owners: index_owners__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.capability.v1beta1.GenesisOwners", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.index != 0 { + len += 1; + } + if !self.owners.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.capability.v1beta1.GenesisState", len)?; + if self.index != 0 { + struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; + } + if !self.owners.is_empty() { + struct_ser.serialize_field("owners", &self.owners)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["index", "owners"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Index, + Owners, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "index" => Ok(GeneratedField::Index), + "owners" => Ok(GeneratedField::Owners), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.capability.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut index__ = None; + let mut owners__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Index => { + if index__.is_some() { + return Err(serde::de::Error::duplicate_field("index")); + } + index__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Owners => { + if owners__.is_some() { + return Err(serde::de::Error::duplicate_field("owners")); + } + owners__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + index: index__.unwrap_or_default(), + owners: owners__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.capability.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Owner { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.module.is_empty() { + len += 1; + } + if !self.name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.capability.v1beta1.Owner", len)?; + if !self.module.is_empty() { + struct_ser.serialize_field("module", &self.module)?; + } + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Owner { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["module", "name"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Module, + Name, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "module" => Ok(GeneratedField::Module), + "name" => Ok(GeneratedField::Name), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Owner; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.capability.v1beta1.Owner") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut module__ = None; + let mut name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Module => { + if module__.is_some() { + return Err(serde::de::Error::duplicate_field("module")); + } + module__ = Some(map.next_value()?); + } + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + } + } + Ok(Owner { + module: module__.unwrap_or_default(), + name: name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.capability.v1beta1.Owner", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs index b26eda40..fa7fb771 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs @@ -20,5 +20,6 @@ pub struct MsgVerifyInvariant { /// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVerifyInvariantResponse {} +include!("cosmos.crisis.v1beta1.serde.rs"); include!("cosmos.crisis.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs new file mode 100644 index 00000000..edcf9600 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs @@ -0,0 +1,318 @@ +// @generated +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.constant_fee.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.crisis.v1beta1.GenesisState", len)?; + if let Some(v) = self.constant_fee.as_ref() { + struct_ser.serialize_field("constantFee", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["constant_fee", "constantFee"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ConstantFee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "constantFee" | "constant_fee" => Ok(GeneratedField::ConstantFee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crisis.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut constant_fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ConstantFee => { + if constant_fee__.is_some() { + return Err(serde::de::Error::duplicate_field("constantFee")); + } + constant_fee__ = map.next_value()?; + } + } + } + Ok(GenesisState { + constant_fee: constant_fee__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.crisis.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgVerifyInvariant { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.invariant_module_name.is_empty() { + len += 1; + } + if !self.invariant_route.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.crisis.v1beta1.MsgVerifyInvariant", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.invariant_module_name.is_empty() { + struct_ser.serialize_field("invariantModuleName", &self.invariant_module_name)?; + } + if !self.invariant_route.is_empty() { + struct_ser.serialize_field("invariantRoute", &self.invariant_route)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "invariant_module_name", + "invariantModuleName", + "invariant_route", + "invariantRoute", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + InvariantModuleName, + InvariantRoute, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "invariantModuleName" | "invariant_module_name" => { + Ok(GeneratedField::InvariantModuleName) + } + "invariantRoute" | "invariant_route" => { + Ok(GeneratedField::InvariantRoute) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgVerifyInvariant; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crisis.v1beta1.MsgVerifyInvariant") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut invariant_module_name__ = None; + let mut invariant_route__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::InvariantModuleName => { + if invariant_module_name__.is_some() { + return Err(serde::de::Error::duplicate_field( + "invariantModuleName", + )); + } + invariant_module_name__ = Some(map.next_value()?); + } + GeneratedField::InvariantRoute => { + if invariant_route__.is_some() { + return Err(serde::de::Error::duplicate_field("invariantRoute")); + } + invariant_route__ = Some(map.next_value()?); + } + } + } + Ok(MsgVerifyInvariant { + sender: sender__.unwrap_or_default(), + invariant_module_name: invariant_module_name__.unwrap_or_default(), + invariant_route: invariant_route__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.crisis.v1beta1.MsgVerifyInvariant", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgVerifyInvariantResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.crisis.v1beta1.MsgVerifyInvariantResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVerifyInvariantResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgVerifyInvariantResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crisis.v1beta1.MsgVerifyInvariantResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgVerifyInvariantResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.crisis.v1beta1.MsgVerifyInvariantResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs index 238b361a..9b0590f2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs @@ -16,4 +16,5 @@ pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, } +include!("cosmos.crypto.ed25519.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs new file mode 100644 index 00000000..50f53da1 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs @@ -0,0 +1,193 @@ +// @generated +impl serde::Serialize for PrivKey { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.crypto.ed25519.PrivKey", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PrivKey { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PrivKey; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.ed25519.PrivKey") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PrivKey { + key: key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.crypto.ed25519.PrivKey", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PubKey { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.crypto.ed25519.PubKey", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PubKey { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PubKey; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.ed25519.PubKey") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PubKey { + key: key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.crypto.ed25519.PubKey", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs index 1ff415b4..a873cedb 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs @@ -19,4 +19,5 @@ pub struct Bip44Params { #[prost(uint32, tag = "5")] pub address_index: u32, } +include!("cosmos.crypto.hd.v1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs new file mode 100644 index 00000000..96350051 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs @@ -0,0 +1,177 @@ +// @generated +impl serde::Serialize for Bip44Params { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.purpose != 0 { + len += 1; + } + if self.coin_type != 0 { + len += 1; + } + if self.account != 0 { + len += 1; + } + if self.change { + len += 1; + } + if self.address_index != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.crypto.hd.v1.BIP44Params", len)?; + if self.purpose != 0 { + struct_ser.serialize_field("purpose", &self.purpose)?; + } + if self.coin_type != 0 { + struct_ser.serialize_field("coinType", &self.coin_type)?; + } + if self.account != 0 { + struct_ser.serialize_field("account", &self.account)?; + } + if self.change { + struct_ser.serialize_field("change", &self.change)?; + } + if self.address_index != 0 { + struct_ser.serialize_field("addressIndex", &self.address_index)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Bip44Params { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "purpose", + "coin_type", + "coinType", + "account", + "change", + "address_index", + "addressIndex", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Purpose, + CoinType, + Account, + Change, + AddressIndex, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "purpose" => Ok(GeneratedField::Purpose), + "coinType" | "coin_type" => Ok(GeneratedField::CoinType), + "account" => Ok(GeneratedField::Account), + "change" => Ok(GeneratedField::Change), + "addressIndex" | "address_index" => Ok(GeneratedField::AddressIndex), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Bip44Params; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.hd.v1.BIP44Params") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut purpose__ = None; + let mut coin_type__ = None; + let mut account__ = None; + let mut change__ = None; + let mut address_index__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Purpose => { + if purpose__.is_some() { + return Err(serde::de::Error::duplicate_field("purpose")); + } + purpose__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::CoinType => { + if coin_type__.is_some() { + return Err(serde::de::Error::duplicate_field("coinType")); + } + coin_type__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Account => { + if account__.is_some() { + return Err(serde::de::Error::duplicate_field("account")); + } + account__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Change => { + if change__.is_some() { + return Err(serde::de::Error::duplicate_field("change")); + } + change__ = Some(map.next_value()?); + } + GeneratedField::AddressIndex => { + if address_index__.is_some() { + return Err(serde::de::Error::duplicate_field("addressIndex")); + } + address_index__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Bip44Params { + purpose: purpose__.unwrap_or_default(), + coin_type: coin_type__.unwrap_or_default(), + account: account__.unwrap_or_default(), + change: change__.unwrap_or_default(), + address_index: address_index__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.crypto.hd.v1.BIP44Params", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs index 6f72e275..5a7c39f6 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs @@ -50,4 +50,5 @@ pub mod record { Offline(Offline), } } +include!("cosmos.crypto.keyring.v1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs new file mode 100644 index 00000000..8c2bff9f --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs @@ -0,0 +1,516 @@ +// @generated +impl serde::Serialize for Record { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if self.pub_key.is_some() { + len += 1; + } + if self.item.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.crypto.keyring.v1.Record", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if let Some(v) = self.pub_key.as_ref() { + struct_ser.serialize_field("pubKey", v)?; + } + if let Some(v) = self.item.as_ref() { + match v { + record::Item::Local(v) => { + struct_ser.serialize_field("local", v)?; + } + record::Item::Ledger(v) => { + struct_ser.serialize_field("ledger", v)?; + } + record::Item::Multi(v) => { + struct_ser.serialize_field("multi", v)?; + } + record::Item::Offline(v) => { + struct_ser.serialize_field("offline", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Record { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "name", "pub_key", "pubKey", "local", "ledger", "multi", "offline", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + PubKey, + Local, + Ledger, + Multi, + Offline, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "pubKey" | "pub_key" => Ok(GeneratedField::PubKey), + "local" => Ok(GeneratedField::Local), + "ledger" => Ok(GeneratedField::Ledger), + "multi" => Ok(GeneratedField::Multi), + "offline" => Ok(GeneratedField::Offline), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Record; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.keyring.v1.Record") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut pub_key__ = None; + let mut item__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::PubKey => { + if pub_key__.is_some() { + return Err(serde::de::Error::duplicate_field("pubKey")); + } + pub_key__ = map.next_value()?; + } + GeneratedField::Local => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("local")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(record::Item::Local); + } + GeneratedField::Ledger => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("ledger")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(record::Item::Ledger); + } + GeneratedField::Multi => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("multi")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(record::Item::Multi); + } + GeneratedField::Offline => { + if item__.is_some() { + return Err(serde::de::Error::duplicate_field("offline")); + } + item__ = map + .next_value::<::std::option::Option<_>>()? + .map(record::Item::Offline); + } + } + } + Ok(Record { + name: name__.unwrap_or_default(), + pub_key: pub_key__, + item: item__, + }) + } + } + deserializer.deserialize_struct("cosmos.crypto.keyring.v1.Record", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for record::Ledger { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.path.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.crypto.keyring.v1.Record.Ledger", len)?; + if let Some(v) = self.path.as_ref() { + struct_ser.serialize_field("path", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for record::Ledger { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["path"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Path, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "path" => Ok(GeneratedField::Path), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = record::Ledger; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Ledger") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut path__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Path => { + if path__.is_some() { + return Err(serde::de::Error::duplicate_field("path")); + } + path__ = map.next_value()?; + } + } + } + Ok(record::Ledger { path: path__ }) + } + } + deserializer.deserialize_struct( + "cosmos.crypto.keyring.v1.Record.Ledger", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for record::Local { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.priv_key.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.crypto.keyring.v1.Record.Local", len)?; + if let Some(v) = self.priv_key.as_ref() { + struct_ser.serialize_field("privKey", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for record::Local { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["priv_key", "privKey"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PrivKey, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "privKey" | "priv_key" => Ok(GeneratedField::PrivKey), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = record::Local; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Local") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut priv_key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PrivKey => { + if priv_key__.is_some() { + return Err(serde::de::Error::duplicate_field("privKey")); + } + priv_key__ = map.next_value()?; + } + } + } + Ok(record::Local { + priv_key: priv_key__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.crypto.keyring.v1.Record.Local", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for record::Multi { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.crypto.keyring.v1.Record.Multi", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for record::Multi { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = record::Multi; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Multi") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(record::Multi {}) + } + } + deserializer.deserialize_struct( + "cosmos.crypto.keyring.v1.Record.Multi", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for record::Offline { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.crypto.keyring.v1.Record.Offline", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for record::Offline { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = record::Offline; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Offline") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(record::Offline {}) + } + } + deserializer.deserialize_struct( + "cosmos.crypto.keyring.v1.Record.Offline", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs index 974b4bc0..fd122cdd 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs @@ -9,4 +9,5 @@ pub struct LegacyAminoPubKey { #[prost(message, repeated, tag = "2")] pub public_keys: ::prost::alloc::vec::Vec<::prost_types::Any>, } +include!("cosmos.crypto.multisig.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs new file mode 100644 index 00000000..cd754931 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs @@ -0,0 +1,117 @@ +// @generated +impl serde::Serialize for LegacyAminoPubKey { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.threshold != 0 { + len += 1; + } + if !self.public_keys.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.crypto.multisig.LegacyAminoPubKey", len)?; + if self.threshold != 0 { + struct_ser.serialize_field("threshold", &self.threshold)?; + } + if !self.public_keys.is_empty() { + struct_ser.serialize_field("publicKeys", &self.public_keys)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for LegacyAminoPubKey { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["threshold", "public_keys", "publicKeys"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Threshold, + PublicKeys, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "threshold" => Ok(GeneratedField::Threshold), + "publicKeys" | "public_keys" => Ok(GeneratedField::PublicKeys), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = LegacyAminoPubKey; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.multisig.LegacyAminoPubKey") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut threshold__ = None; + let mut public_keys__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Threshold => { + if threshold__.is_some() { + return Err(serde::de::Error::duplicate_field("threshold")); + } + threshold__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::PublicKeys => { + if public_keys__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKeys")); + } + public_keys__ = Some(map.next_value()?); + } + } + } + Ok(LegacyAminoPubKey { + threshold: threshold__.unwrap_or_default(), + public_keys: public_keys__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.crypto.multisig.LegacyAminoPubKey", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs index 9898f38e..497374dc 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs @@ -18,4 +18,5 @@ pub struct CompactBitArray { #[prost(bytes = "vec", tag = "2")] pub elems: ::prost::alloc::vec::Vec, } +include!("cosmos.crypto.multisig.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs new file mode 100644 index 00000000..c9110507 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs @@ -0,0 +1,234 @@ +// @generated +impl serde::Serialize for CompactBitArray { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.extra_bits_stored != 0 { + len += 1; + } + if !self.elems.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.crypto.multisig.v1beta1.CompactBitArray", len)?; + if self.extra_bits_stored != 0 { + struct_ser.serialize_field("extraBitsStored", &self.extra_bits_stored)?; + } + if !self.elems.is_empty() { + struct_ser.serialize_field( + "elems", + pbjson::private::base64::encode(&self.elems).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CompactBitArray { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["extra_bits_stored", "extraBitsStored", "elems"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ExtraBitsStored, + Elems, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "extraBitsStored" | "extra_bits_stored" => { + Ok(GeneratedField::ExtraBitsStored) + } + "elems" => Ok(GeneratedField::Elems), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CompactBitArray; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.multisig.v1beta1.CompactBitArray") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut extra_bits_stored__ = None; + let mut elems__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ExtraBitsStored => { + if extra_bits_stored__.is_some() { + return Err(serde::de::Error::duplicate_field("extraBitsStored")); + } + extra_bits_stored__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Elems => { + if elems__.is_some() { + return Err(serde::de::Error::duplicate_field("elems")); + } + elems__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(CompactBitArray { + extra_bits_stored: extra_bits_stored__.unwrap_or_default(), + elems: elems__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.crypto.multisig.v1beta1.CompactBitArray", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MultiSignature { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.signatures.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.crypto.multisig.v1beta1.MultiSignature", len)?; + if !self.signatures.is_empty() { + struct_ser.serialize_field( + "signatures", + &self + .signatures + .iter() + .map(pbjson::private::base64::encode) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MultiSignature { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["signatures"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Signatures, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "signatures" => Ok(GeneratedField::Signatures), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MultiSignature; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.multisig.v1beta1.MultiSignature") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signatures__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Signatures => { + if signatures__.is_some() { + return Err(serde::de::Error::duplicate_field("signatures")); + } + signatures__ = Some( + map.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(MultiSignature { + signatures: signatures__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.crypto.multisig.v1beta1.MultiSignature", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs index 1f145b3c..fe5e61b2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs @@ -15,4 +15,5 @@ pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, } +include!("cosmos.crypto.secp256k1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs new file mode 100644 index 00000000..2cab5fd6 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs @@ -0,0 +1,193 @@ +// @generated +impl serde::Serialize for PrivKey { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256k1.PrivKey", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PrivKey { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PrivKey; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.secp256k1.PrivKey") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PrivKey { + key: key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.crypto.secp256k1.PrivKey", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PubKey { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256k1.PubKey", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PubKey { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PubKey; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.secp256k1.PubKey") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PubKey { + key: key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.crypto.secp256k1.PubKey", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs index ec7fc762..5301b9c3 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs @@ -14,4 +14,5 @@ pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] pub secret: ::prost::alloc::vec::Vec, } +include!("cosmos.crypto.secp256r1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs new file mode 100644 index 00000000..d909334b --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs @@ -0,0 +1,195 @@ +// @generated +impl serde::Serialize for PrivKey { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.secret.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256r1.PrivKey", len)?; + if !self.secret.is_empty() { + struct_ser.serialize_field( + "secret", + pbjson::private::base64::encode(&self.secret).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PrivKey { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["secret"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Secret, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "secret" => Ok(GeneratedField::Secret), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PrivKey; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.secp256r1.PrivKey") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut secret__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Secret => { + if secret__.is_some() { + return Err(serde::de::Error::duplicate_field("secret")); + } + secret__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PrivKey { + secret: secret__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.crypto.secp256r1.PrivKey", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PubKey { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256r1.PubKey", len)?; + if !self.key.is_empty() { + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PubKey { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PubKey; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.crypto.secp256r1.PubKey") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PubKey { + key: key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.crypto.secp256r1.PubKey", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs index 85d64736..3612c905 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs @@ -456,5 +456,6 @@ pub struct MsgFundCommunityPool { /// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgFundCommunityPoolResponse {} +include!("cosmos.distribution.v1beta1.serde.rs"); include!("cosmos.distribution.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs new file mode 100644 index 00000000..c6aa7370 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs @@ -0,0 +1,5559 @@ +// @generated +impl serde::Serialize for CommunityPoolSpendProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.recipient.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.CommunityPoolSpendProposal", + len, + )?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.recipient.is_empty() { + struct_ser.serialize_field("recipient", &self.recipient)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "recipient", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + Recipient, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "recipient" => Ok(GeneratedField::Recipient), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CommunityPoolSpendProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.CommunityPoolSpendProposal") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut recipient__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + GeneratedField::Recipient => { + if recipient__.is_some() { + return Err(serde::de::Error::duplicate_field("recipient")); + } + recipient__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(CommunityPoolSpendProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + recipient: recipient__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.CommunityPoolSpendProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for CommunityPoolSpendProposalWithDeposit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.recipient.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + if !self.deposit.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", + len, + )?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.recipient.is_empty() { + struct_ser.serialize_field("recipient", &self.recipient)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + if !self.deposit.is_empty() { + struct_ser.serialize_field("deposit", &self.deposit)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "recipient", "amount", "deposit"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + Recipient, + Amount, + Deposit, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "recipient" => Ok(GeneratedField::Recipient), + "amount" => Ok(GeneratedField::Amount), + "deposit" => Ok(GeneratedField::Deposit), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CommunityPoolSpendProposalWithDeposit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut recipient__ = None; + let mut amount__ = None; + let mut deposit__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + GeneratedField::Recipient => { + if recipient__.is_some() { + return Err(serde::de::Error::duplicate_field("recipient")); + } + recipient__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + GeneratedField::Deposit => { + if deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("deposit")); + } + deposit__ = Some(map.next_value()?); + } + } + } + Ok(CommunityPoolSpendProposalWithDeposit { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + recipient: recipient__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + deposit: deposit__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for DelegationDelegatorReward { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if !self.reward.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.distribution.v1beta1.DelegationDelegatorReward", len)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if !self.reward.is_empty() { + struct_ser.serialize_field("reward", &self.reward)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DelegationDelegatorReward { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_address", "validatorAddress", "reward"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + Reward, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "reward" => Ok(GeneratedField::Reward), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DelegationDelegatorReward; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.DelegationDelegatorReward") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut reward__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Reward => { + if reward__.is_some() { + return Err(serde::de::Error::duplicate_field("reward")); + } + reward__ = Some(map.next_value()?); + } + } + } + Ok(DelegationDelegatorReward { + validator_address: validator_address__.unwrap_or_default(), + reward: reward__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.DelegationDelegatorReward", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for DelegatorStartingInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.previous_period != 0 { + len += 1; + } + if !self.stake.is_empty() { + len += 1; + } + if self.height != 0 { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.distribution.v1beta1.DelegatorStartingInfo", len)?; + if self.previous_period != 0 { + struct_ser.serialize_field( + "previousPeriod", + ToString::to_string(&self.previous_period).as_str(), + )?; + } + if !self.stake.is_empty() { + struct_ser.serialize_field("stake", &self.stake)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["previous_period", "previousPeriod", "stake", "height"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PreviousPeriod, + Stake, + Height, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "previousPeriod" | "previous_period" => { + Ok(GeneratedField::PreviousPeriod) + } + "stake" => Ok(GeneratedField::Stake), + "height" => Ok(GeneratedField::Height), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DelegatorStartingInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.DelegatorStartingInfo") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut previous_period__ = None; + let mut stake__ = None; + let mut height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PreviousPeriod => { + if previous_period__.is_some() { + return Err(serde::de::Error::duplicate_field("previousPeriod")); + } + previous_period__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Stake => { + if stake__.is_some() { + return Err(serde::de::Error::duplicate_field("stake")); + } + stake__ = Some(map.next_value()?); + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(DelegatorStartingInfo { + previous_period: previous_period__.unwrap_or_default(), + stake: stake__.unwrap_or_default(), + height: height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.DelegatorStartingInfo", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for DelegatorStartingInfoRecord { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + if self.starting_info.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord", + len, + )?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if let Some(v) = self.starting_info.as_ref() { + struct_ser.serialize_field("startingInfo", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + "starting_info", + "startingInfo", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + StartingInfo, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "startingInfo" | "starting_info" => Ok(GeneratedField::StartingInfo), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DelegatorStartingInfoRecord; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.DelegatorStartingInfoRecord") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + let mut starting_info__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::StartingInfo => { + if starting_info__.is_some() { + return Err(serde::de::Error::duplicate_field("startingInfo")); + } + starting_info__ = map.next_value()?; + } + } + } + Ok(DelegatorStartingInfoRecord { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + starting_info: starting_info__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for DelegatorWithdrawInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.withdraw_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.distribution.v1beta1.DelegatorWithdrawInfo", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.withdraw_address.is_empty() { + struct_ser.serialize_field("withdrawAddress", &self.withdraw_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DelegatorWithdrawInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "withdraw_address", + "withdrawAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + WithdrawAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "withdrawAddress" | "withdraw_address" => { + Ok(GeneratedField::WithdrawAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DelegatorWithdrawInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.DelegatorWithdrawInfo") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut withdraw_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::WithdrawAddress => { + if withdraw_address__.is_some() { + return Err(serde::de::Error::duplicate_field("withdrawAddress")); + } + withdraw_address__ = Some(map.next_value()?); + } + } + } + Ok(DelegatorWithdrawInfo { + delegator_address: delegator_address__.unwrap_or_default(), + withdraw_address: withdraw_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.DelegatorWithdrawInfo", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for FeePool { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.community_pool.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.distribution.v1beta1.FeePool", len)?; + if !self.community_pool.is_empty() { + struct_ser.serialize_field("communityPool", &self.community_pool)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for FeePool { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["community_pool", "communityPool"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CommunityPool, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "communityPool" | "community_pool" => Ok(GeneratedField::CommunityPool), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = FeePool; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.FeePool") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut community_pool__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CommunityPool => { + if community_pool__.is_some() { + return Err(serde::de::Error::duplicate_field("communityPool")); + } + community_pool__ = Some(map.next_value()?); + } + } + } + Ok(FeePool { + community_pool: community_pool__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.FeePool", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + if self.fee_pool.is_some() { + len += 1; + } + if !self.delegator_withdraw_infos.is_empty() { + len += 1; + } + if !self.previous_proposer.is_empty() { + len += 1; + } + if !self.outstanding_rewards.is_empty() { + len += 1; + } + if !self.validator_accumulated_commissions.is_empty() { + len += 1; + } + if !self.validator_historical_rewards.is_empty() { + len += 1; + } + if !self.validator_current_rewards.is_empty() { + len += 1; + } + if !self.delegator_starting_infos.is_empty() { + len += 1; + } + if !self.validator_slash_events.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.distribution.v1beta1.GenesisState", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + if let Some(v) = self.fee_pool.as_ref() { + struct_ser.serialize_field("feePool", v)?; + } + if !self.delegator_withdraw_infos.is_empty() { + struct_ser.serialize_field("delegatorWithdrawInfos", &self.delegator_withdraw_infos)?; + } + if !self.previous_proposer.is_empty() { + struct_ser.serialize_field("previousProposer", &self.previous_proposer)?; + } + if !self.outstanding_rewards.is_empty() { + struct_ser.serialize_field("outstandingRewards", &self.outstanding_rewards)?; + } + if !self.validator_accumulated_commissions.is_empty() { + struct_ser.serialize_field( + "validatorAccumulatedCommissions", + &self.validator_accumulated_commissions, + )?; + } + if !self.validator_historical_rewards.is_empty() { + struct_ser.serialize_field( + "validatorHistoricalRewards", + &self.validator_historical_rewards, + )?; + } + if !self.validator_current_rewards.is_empty() { + struct_ser + .serialize_field("validatorCurrentRewards", &self.validator_current_rewards)?; + } + if !self.delegator_starting_infos.is_empty() { + struct_ser.serialize_field("delegatorStartingInfos", &self.delegator_starting_infos)?; + } + if !self.validator_slash_events.is_empty() { + struct_ser.serialize_field("validatorSlashEvents", &self.validator_slash_events)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "params", + "fee_pool", + "feePool", + "delegator_withdraw_infos", + "delegatorWithdrawInfos", + "previous_proposer", + "previousProposer", + "outstanding_rewards", + "outstandingRewards", + "validator_accumulated_commissions", + "validatorAccumulatedCommissions", + "validator_historical_rewards", + "validatorHistoricalRewards", + "validator_current_rewards", + "validatorCurrentRewards", + "delegator_starting_infos", + "delegatorStartingInfos", + "validator_slash_events", + "validatorSlashEvents", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + FeePool, + DelegatorWithdrawInfos, + PreviousProposer, + OutstandingRewards, + ValidatorAccumulatedCommissions, + ValidatorHistoricalRewards, + ValidatorCurrentRewards, + DelegatorStartingInfos, + ValidatorSlashEvents, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "params" => Ok(GeneratedField::Params), + "feePool" | "fee_pool" => Ok(GeneratedField::FeePool), + "delegatorWithdrawInfos" | "delegator_withdraw_infos" => { + Ok(GeneratedField::DelegatorWithdrawInfos) + } + "previousProposer" | "previous_proposer" => { + Ok(GeneratedField::PreviousProposer) + } + "outstandingRewards" | "outstanding_rewards" => { + Ok(GeneratedField::OutstandingRewards) + } + "validatorAccumulatedCommissions" + | "validator_accumulated_commissions" => { + Ok(GeneratedField::ValidatorAccumulatedCommissions) + } + "validatorHistoricalRewards" | "validator_historical_rewards" => { + Ok(GeneratedField::ValidatorHistoricalRewards) + } + "validatorCurrentRewards" | "validator_current_rewards" => { + Ok(GeneratedField::ValidatorCurrentRewards) + } + "delegatorStartingInfos" | "delegator_starting_infos" => { + Ok(GeneratedField::DelegatorStartingInfos) + } + "validatorSlashEvents" | "validator_slash_events" => { + Ok(GeneratedField::ValidatorSlashEvents) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + let mut fee_pool__ = None; + let mut delegator_withdraw_infos__ = None; + let mut previous_proposer__ = None; + let mut outstanding_rewards__ = None; + let mut validator_accumulated_commissions__ = None; + let mut validator_historical_rewards__ = None; + let mut validator_current_rewards__ = None; + let mut delegator_starting_infos__ = None; + let mut validator_slash_events__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + GeneratedField::FeePool => { + if fee_pool__.is_some() { + return Err(serde::de::Error::duplicate_field("feePool")); + } + fee_pool__ = map.next_value()?; + } + GeneratedField::DelegatorWithdrawInfos => { + if delegator_withdraw_infos__.is_some() { + return Err(serde::de::Error::duplicate_field( + "delegatorWithdrawInfos", + )); + } + delegator_withdraw_infos__ = Some(map.next_value()?); + } + GeneratedField::PreviousProposer => { + if previous_proposer__.is_some() { + return Err(serde::de::Error::duplicate_field("previousProposer")); + } + previous_proposer__ = Some(map.next_value()?); + } + GeneratedField::OutstandingRewards => { + if outstanding_rewards__.is_some() { + return Err(serde::de::Error::duplicate_field( + "outstandingRewards", + )); + } + outstanding_rewards__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAccumulatedCommissions => { + if validator_accumulated_commissions__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorAccumulatedCommissions", + )); + } + validator_accumulated_commissions__ = Some(map.next_value()?); + } + GeneratedField::ValidatorHistoricalRewards => { + if validator_historical_rewards__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorHistoricalRewards", + )); + } + validator_historical_rewards__ = Some(map.next_value()?); + } + GeneratedField::ValidatorCurrentRewards => { + if validator_current_rewards__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorCurrentRewards", + )); + } + validator_current_rewards__ = Some(map.next_value()?); + } + GeneratedField::DelegatorStartingInfos => { + if delegator_starting_infos__.is_some() { + return Err(serde::de::Error::duplicate_field( + "delegatorStartingInfos", + )); + } + delegator_starting_infos__ = Some(map.next_value()?); + } + GeneratedField::ValidatorSlashEvents => { + if validator_slash_events__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorSlashEvents", + )); + } + validator_slash_events__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + params: params__, + fee_pool: fee_pool__, + delegator_withdraw_infos: delegator_withdraw_infos__.unwrap_or_default(), + previous_proposer: previous_proposer__.unwrap_or_default(), + outstanding_rewards: outstanding_rewards__.unwrap_or_default(), + validator_accumulated_commissions: validator_accumulated_commissions__ + .unwrap_or_default(), + validator_historical_rewards: validator_historical_rewards__ + .unwrap_or_default(), + validator_current_rewards: validator_current_rewards__.unwrap_or_default(), + delegator_starting_infos: delegator_starting_infos__.unwrap_or_default(), + validator_slash_events: validator_slash_events__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgFundCommunityPool { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.amount.is_empty() { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.distribution.v1beta1.MsgFundCommunityPool", len)?; + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgFundCommunityPool { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amount", "depositor"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + Depositor, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + "depositor" => Ok(GeneratedField::Depositor), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgFundCommunityPool; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.MsgFundCommunityPool") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + let mut depositor__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + } + } + Ok(MsgFundCommunityPool { + amount: amount__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.MsgFundCommunityPool", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgFundCommunityPoolResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgFundCommunityPoolResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgFundCommunityPoolResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgFundCommunityPoolResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSetWithdrawAddress { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.withdraw_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.distribution.v1beta1.MsgSetWithdrawAddress", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.withdraw_address.is_empty() { + struct_ser.serialize_field("withdrawAddress", &self.withdraw_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddress { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "withdraw_address", + "withdrawAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + WithdrawAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "withdrawAddress" | "withdraw_address" => { + Ok(GeneratedField::WithdrawAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSetWithdrawAddress; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.MsgSetWithdrawAddress") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut withdraw_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::WithdrawAddress => { + if withdraw_address__.is_some() { + return Err(serde::de::Error::duplicate_field("withdrawAddress")); + } + withdraw_address__ = Some(map.next_value()?); + } + } + } + Ok(MsgSetWithdrawAddress { + delegator_address: delegator_address__.unwrap_or_default(), + withdraw_address: withdraw_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.MsgSetWithdrawAddress", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSetWithdrawAddressResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddressResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgSetWithdrawAddressResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgSetWithdrawAddressResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgWithdrawDelegatorReward { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + len, + )?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorReward { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgWithdrawDelegatorReward; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } + } + Ok(MsgWithdrawDelegatorReward { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgWithdrawDelegatorRewardResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", + len, + )?; + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorRewardResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgWithdrawDelegatorRewardResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(MsgWithdrawDelegatorRewardResponse { + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgWithdrawValidatorCommission { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + len, + )?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommission { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_address", "validatorAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgWithdrawValidatorCommission; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } + } + Ok(MsgWithdrawValidatorCommission { + validator_address: validator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgWithdrawValidatorCommissionResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", + len, + )?; + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommissionResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgWithdrawValidatorCommissionResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(MsgWithdrawValidatorCommissionResponse { + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Params { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.community_tax.is_empty() { + len += 1; + } + if !self.base_proposer_reward.is_empty() { + len += 1; + } + if !self.bonus_proposer_reward.is_empty() { + len += 1; + } + if self.withdraw_addr_enabled { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.distribution.v1beta1.Params", len)?; + if !self.community_tax.is_empty() { + struct_ser.serialize_field("communityTax", &self.community_tax)?; + } + if !self.base_proposer_reward.is_empty() { + struct_ser.serialize_field("baseProposerReward", &self.base_proposer_reward)?; + } + if !self.bonus_proposer_reward.is_empty() { + struct_ser.serialize_field("bonusProposerReward", &self.bonus_proposer_reward)?; + } + if self.withdraw_addr_enabled { + struct_ser.serialize_field("withdrawAddrEnabled", &self.withdraw_addr_enabled)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Params { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "community_tax", + "communityTax", + "base_proposer_reward", + "baseProposerReward", + "bonus_proposer_reward", + "bonusProposerReward", + "withdraw_addr_enabled", + "withdrawAddrEnabled", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CommunityTax, + BaseProposerReward, + BonusProposerReward, + WithdrawAddrEnabled, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "communityTax" | "community_tax" => Ok(GeneratedField::CommunityTax), + "baseProposerReward" | "base_proposer_reward" => { + Ok(GeneratedField::BaseProposerReward) + } + "bonusProposerReward" | "bonus_proposer_reward" => { + Ok(GeneratedField::BonusProposerReward) + } + "withdrawAddrEnabled" | "withdraw_addr_enabled" => { + Ok(GeneratedField::WithdrawAddrEnabled) + } + _ => 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 std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.Params") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut community_tax__ = None; + let mut base_proposer_reward__ = None; + let mut bonus_proposer_reward__ = None; + let mut withdraw_addr_enabled__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CommunityTax => { + if community_tax__.is_some() { + return Err(serde::de::Error::duplicate_field("communityTax")); + } + community_tax__ = Some(map.next_value()?); + } + GeneratedField::BaseProposerReward => { + if base_proposer_reward__.is_some() { + return Err(serde::de::Error::duplicate_field( + "baseProposerReward", + )); + } + base_proposer_reward__ = Some(map.next_value()?); + } + GeneratedField::BonusProposerReward => { + if bonus_proposer_reward__.is_some() { + return Err(serde::de::Error::duplicate_field( + "bonusProposerReward", + )); + } + bonus_proposer_reward__ = Some(map.next_value()?); + } + GeneratedField::WithdrawAddrEnabled => { + if withdraw_addr_enabled__.is_some() { + return Err(serde::de::Error::duplicate_field( + "withdrawAddrEnabled", + )); + } + withdraw_addr_enabled__ = Some(map.next_value()?); + } + } + } + Ok(Params { + community_tax: community_tax__.unwrap_or_default(), + base_proposer_reward: base_proposer_reward__.unwrap_or_default(), + bonus_proposer_reward: bonus_proposer_reward__.unwrap_or_default(), + withdraw_addr_enabled: withdraw_addr_enabled__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.Params", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryCommunityPoolRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.distribution.v1beta1.QueryCommunityPoolRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCommunityPoolRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryCommunityPoolRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.QueryCommunityPoolRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryCommunityPoolRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryCommunityPoolRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryCommunityPoolResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.pool.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryCommunityPoolResponse", + len, + )?; + if !self.pool.is_empty() { + struct_ser.serialize_field("pool", &self.pool)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCommunityPoolResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pool"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pool, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pool" => Ok(GeneratedField::Pool), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryCommunityPoolResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.QueryCommunityPoolResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pool__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pool => { + if pool__.is_some() { + return Err(serde::de::Error::duplicate_field("pool")); + } + pool__ = Some(map.next_value()?); + } + } + } + Ok(QueryCommunityPoolResponse { + pool: pool__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryCommunityPoolResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegationRewardsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest", + len, + )?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegationRewardsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.QueryDelegationRewardsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegationRewardsRequest { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegationRewardsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.rewards.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse", + len, + )?; + if !self.rewards.is_empty() { + struct_ser.serialize_field("rewards", &self.rewards)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["rewards"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Rewards, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "rewards" => Ok(GeneratedField::Rewards), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegationRewardsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.QueryDelegationRewardsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut rewards__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Rewards => { + if rewards__.is_some() { + return Err(serde::de::Error::duplicate_field("rewards")); + } + rewards__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegationRewardsResponse { + rewards: rewards__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegationTotalRewardsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest", + len, + )?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegator_address", "delegatorAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegationTotalRewardsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegationTotalRewardsRequest { + delegator_address: delegator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegationTotalRewardsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.rewards.is_empty() { + len += 1; + } + if !self.total.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse", + len, + )?; + if !self.rewards.is_empty() { + struct_ser.serialize_field("rewards", &self.rewards)?; + } + if !self.total.is_empty() { + struct_ser.serialize_field("total", &self.total)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["rewards", "total"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Rewards, + Total, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "rewards" => Ok(GeneratedField::Rewards), + "total" => Ok(GeneratedField::Total), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegationTotalRewardsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut rewards__ = None; + let mut total__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Rewards => { + if rewards__.is_some() { + return Err(serde::de::Error::duplicate_field("rewards")); + } + rewards__ = Some(map.next_value()?); + } + GeneratedField::Total => { + if total__.is_some() { + return Err(serde::de::Error::duplicate_field("total")); + } + total__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegationTotalRewardsResponse { + rewards: rewards__.unwrap_or_default(), + total: total__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorValidatorsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest", + len, + )?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegator_address", "delegatorAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorValidatorsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegatorValidatorsRequest { + delegator_address: delegator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorValidatorsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validators.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse", + len, + )?; + if !self.validators.is_empty() { + struct_ser.serialize_field("validators", &self.validators)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validators"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Validators, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validators" => Ok(GeneratedField::Validators), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorValidatorsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validators__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Validators => { + if validators__.is_some() { + return Err(serde::de::Error::duplicate_field("validators")); + } + validators__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegatorValidatorsResponse { + validators: validators__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorWithdrawAddressRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest", + len, + )?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegator_address", "delegatorAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorWithdrawAddressRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegatorWithdrawAddressRequest { + delegator_address: delegator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorWithdrawAddressResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.withdraw_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse", + len, + )?; + if !self.withdraw_address.is_empty() { + struct_ser.serialize_field("withdrawAddress", &self.withdraw_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["withdraw_address", "withdrawAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WithdrawAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "withdrawAddress" | "withdraw_address" => { + Ok(GeneratedField::WithdrawAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorWithdrawAddressResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut withdraw_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WithdrawAddress => { + if withdraw_address__.is_some() { + return Err(serde::de::Error::duplicate_field("withdrawAddress")); + } + withdraw_address__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegatorWithdrawAddressResponse { + withdraw_address: withdraw_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.distribution.v1beta1.QueryParamsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryParamsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.distribution.v1beta1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { params: params__ }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorCommissionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest", + len, + )?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_address", "validatorAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorCommissionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.QueryValidatorCommissionRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } + } + Ok(QueryValidatorCommissionRequest { + validator_address: validator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorCommissionResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.commission.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse", + len, + )?; + if let Some(v) = self.commission.as_ref() { + struct_ser.serialize_field("commission", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["commission"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Commission, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "commission" => Ok(GeneratedField::Commission), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorCommissionResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.QueryValidatorCommissionResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut commission__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Commission => { + if commission__.is_some() { + return Err(serde::de::Error::duplicate_field("commission")); + } + commission__ = map.next_value()?; + } + } + } + Ok(QueryValidatorCommissionResponse { + commission: commission__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorOutstandingRewardsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest", + len, + )?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_address", "validatorAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorOutstandingRewardsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } + } + Ok(QueryValidatorOutstandingRewardsRequest { + validator_address: validator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorOutstandingRewardsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.rewards.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse", + len, + )?; + if let Some(v) = self.rewards.as_ref() { + struct_ser.serialize_field("rewards", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["rewards"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Rewards, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "rewards" => Ok(GeneratedField::Rewards), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorOutstandingRewardsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut rewards__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Rewards => { + if rewards__.is_some() { + return Err(serde::de::Error::duplicate_field("rewards")); + } + rewards__ = map.next_value()?; + } + } + } + Ok(QueryValidatorOutstandingRewardsResponse { rewards: rewards__ }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorSlashesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if self.starting_height != 0 { + len += 1; + } + if self.ending_height != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest", + len, + )?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if self.starting_height != 0 { + struct_ser.serialize_field( + "startingHeight", + ToString::to_string(&self.starting_height).as_str(), + )?; + } + if self.ending_height != 0 { + struct_ser.serialize_field( + "endingHeight", + ToString::to_string(&self.ending_height).as_str(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator_address", + "validatorAddress", + "starting_height", + "startingHeight", + "ending_height", + "endingHeight", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + StartingHeight, + EndingHeight, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "startingHeight" | "starting_height" => { + Ok(GeneratedField::StartingHeight) + } + "endingHeight" | "ending_height" => Ok(GeneratedField::EndingHeight), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorSlashesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.QueryValidatorSlashesRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut starting_height__ = None; + let mut ending_height__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::StartingHeight => { + if starting_height__.is_some() { + return Err(serde::de::Error::duplicate_field("startingHeight")); + } + starting_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::EndingHeight => { + if ending_height__.is_some() { + return Err(serde::de::Error::duplicate_field("endingHeight")); + } + ending_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryValidatorSlashesRequest { + validator_address: validator_address__.unwrap_or_default(), + starting_height: starting_height__.unwrap_or_default(), + ending_height: ending_height__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorSlashesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.slashes.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse", + len, + )?; + if !self.slashes.is_empty() { + struct_ser.serialize_field("slashes", &self.slashes)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["slashes", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Slashes, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "slashes" => Ok(GeneratedField::Slashes), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorSlashesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.QueryValidatorSlashesResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut slashes__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Slashes => { + if slashes__.is_some() { + return Err(serde::de::Error::duplicate_field("slashes")); + } + slashes__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryValidatorSlashesResponse { + slashes: slashes__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorAccumulatedCommission { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.commission.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", + len, + )?; + if !self.commission.is_empty() { + struct_ser.serialize_field("commission", &self.commission)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommission { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["commission"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Commission, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "commission" => Ok(GeneratedField::Commission), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorAccumulatedCommission; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.ValidatorAccumulatedCommission") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut commission__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Commission => { + if commission__.is_some() { + return Err(serde::de::Error::duplicate_field("commission")); + } + commission__ = Some(map.next_value()?); + } + } + } + Ok(ValidatorAccumulatedCommission { + commission: commission__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorAccumulatedCommissionRecord { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if self.accumulated.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord", + len, + )?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if let Some(v) = self.accumulated.as_ref() { + struct_ser.serialize_field("accumulated", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommissionRecord { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_address", "validatorAddress", "accumulated"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + Accumulated, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "accumulated" => Ok(GeneratedField::Accumulated), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorAccumulatedCommissionRecord; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut accumulated__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Accumulated => { + if accumulated__.is_some() { + return Err(serde::de::Error::duplicate_field("accumulated")); + } + accumulated__ = map.next_value()?; + } + } + } + Ok(ValidatorAccumulatedCommissionRecord { + validator_address: validator_address__.unwrap_or_default(), + accumulated: accumulated__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorCurrentRewards { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.rewards.is_empty() { + len += 1; + } + if self.period != 0 { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.distribution.v1beta1.ValidatorCurrentRewards", len)?; + if !self.rewards.is_empty() { + struct_ser.serialize_field("rewards", &self.rewards)?; + } + if self.period != 0 { + struct_ser.serialize_field("period", ToString::to_string(&self.period).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewards { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["rewards", "period"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Rewards, + Period, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "rewards" => Ok(GeneratedField::Rewards), + "period" => Ok(GeneratedField::Period), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorCurrentRewards; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.ValidatorCurrentRewards") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut rewards__ = None; + let mut period__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Rewards => { + if rewards__.is_some() { + return Err(serde::de::Error::duplicate_field("rewards")); + } + rewards__ = Some(map.next_value()?); + } + GeneratedField::Period => { + if period__.is_some() { + return Err(serde::de::Error::duplicate_field("period")); + } + period__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(ValidatorCurrentRewards { + rewards: rewards__.unwrap_or_default(), + period: period__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorCurrentRewards", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorCurrentRewardsRecord { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if self.rewards.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord", + len, + )?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if let Some(v) = self.rewards.as_ref() { + struct_ser.serialize_field("rewards", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewardsRecord { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_address", "validatorAddress", "rewards"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + Rewards, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "rewards" => Ok(GeneratedField::Rewards), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorCurrentRewardsRecord; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut rewards__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Rewards => { + if rewards__.is_some() { + return Err(serde::de::Error::duplicate_field("rewards")); + } + rewards__ = map.next_value()?; + } + } + } + Ok(ValidatorCurrentRewardsRecord { + validator_address: validator_address__.unwrap_or_default(), + rewards: rewards__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorHistoricalRewards { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.cumulative_reward_ratio.is_empty() { + len += 1; + } + if self.reference_count != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.ValidatorHistoricalRewards", + len, + )?; + if !self.cumulative_reward_ratio.is_empty() { + struct_ser.serialize_field("cumulativeRewardRatio", &self.cumulative_reward_ratio)?; + } + if self.reference_count != 0 { + struct_ser.serialize_field("referenceCount", &self.reference_count)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "cumulative_reward_ratio", + "cumulativeRewardRatio", + "reference_count", + "referenceCount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CumulativeRewardRatio, + ReferenceCount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "cumulativeRewardRatio" | "cumulative_reward_ratio" => { + Ok(GeneratedField::CumulativeRewardRatio) + } + "referenceCount" | "reference_count" => { + Ok(GeneratedField::ReferenceCount) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorHistoricalRewards; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.ValidatorHistoricalRewards") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut cumulative_reward_ratio__ = None; + let mut reference_count__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CumulativeRewardRatio => { + if cumulative_reward_ratio__.is_some() { + return Err(serde::de::Error::duplicate_field( + "cumulativeRewardRatio", + )); + } + cumulative_reward_ratio__ = Some(map.next_value()?); + } + GeneratedField::ReferenceCount => { + if reference_count__.is_some() { + return Err(serde::de::Error::duplicate_field("referenceCount")); + } + reference_count__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(ValidatorHistoricalRewards { + cumulative_reward_ratio: cumulative_reward_ratio__.unwrap_or_default(), + reference_count: reference_count__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorHistoricalRewards", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorHistoricalRewardsRecord { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if self.period != 0 { + len += 1; + } + if self.rewards.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord", + len, + )?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if self.period != 0 { + struct_ser.serialize_field("period", ToString::to_string(&self.period).as_str())?; + } + if let Some(v) = self.rewards.as_ref() { + struct_ser.serialize_field("rewards", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_address", "validatorAddress", "period", "rewards"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + Period, + Rewards, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "period" => Ok(GeneratedField::Period), + "rewards" => Ok(GeneratedField::Rewards), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorHistoricalRewardsRecord; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut period__ = None; + let mut rewards__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Period => { + if period__.is_some() { + return Err(serde::de::Error::duplicate_field("period")); + } + period__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Rewards => { + if rewards__.is_some() { + return Err(serde::de::Error::duplicate_field("rewards")); + } + rewards__ = map.next_value()?; + } + } + } + Ok(ValidatorHistoricalRewardsRecord { + validator_address: validator_address__.unwrap_or_default(), + period: period__.unwrap_or_default(), + rewards: rewards__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorOutstandingRewards { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.rewards.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.ValidatorOutstandingRewards", + len, + )?; + if !self.rewards.is_empty() { + struct_ser.serialize_field("rewards", &self.rewards)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewards { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["rewards"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Rewards, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "rewards" => Ok(GeneratedField::Rewards), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorOutstandingRewards; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.distribution.v1beta1.ValidatorOutstandingRewards") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut rewards__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Rewards => { + if rewards__.is_some() { + return Err(serde::de::Error::duplicate_field("rewards")); + } + rewards__ = Some(map.next_value()?); + } + } + } + Ok(ValidatorOutstandingRewards { + rewards: rewards__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorOutstandingRewards", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorOutstandingRewardsRecord { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if !self.outstanding_rewards.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord", + len, + )?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if !self.outstanding_rewards.is_empty() { + struct_ser.serialize_field("outstandingRewards", &self.outstanding_rewards)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator_address", + "validatorAddress", + "outstanding_rewards", + "outstandingRewards", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + OutstandingRewards, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "outstandingRewards" | "outstanding_rewards" => { + Ok(GeneratedField::OutstandingRewards) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorOutstandingRewardsRecord; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut outstanding_rewards__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::OutstandingRewards => { + if outstanding_rewards__.is_some() { + return Err(serde::de::Error::duplicate_field( + "outstandingRewards", + )); + } + outstanding_rewards__ = Some(map.next_value()?); + } + } + } + Ok(ValidatorOutstandingRewardsRecord { + validator_address: validator_address__.unwrap_or_default(), + outstanding_rewards: outstanding_rewards__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorSlashEvent { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.validator_period != 0 { + len += 1; + } + if !self.fraction.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.distribution.v1beta1.ValidatorSlashEvent", len)?; + if self.validator_period != 0 { + struct_ser.serialize_field( + "validatorPeriod", + ToString::to_string(&self.validator_period).as_str(), + )?; + } + if !self.fraction.is_empty() { + struct_ser.serialize_field("fraction", &self.fraction)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_period", "validatorPeriod", "fraction"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorPeriod, + Fraction, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorPeriod" | "validator_period" => { + Ok(GeneratedField::ValidatorPeriod) + } + "fraction" => Ok(GeneratedField::Fraction), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorSlashEvent; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.ValidatorSlashEvent") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_period__ = None; + let mut fraction__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorPeriod => { + if validator_period__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorPeriod")); + } + validator_period__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Fraction => { + if fraction__.is_some() { + return Err(serde::de::Error::duplicate_field("fraction")); + } + fraction__ = Some(map.next_value()?); + } + } + } + Ok(ValidatorSlashEvent { + validator_period: validator_period__.unwrap_or_default(), + fraction: fraction__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorSlashEvent", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorSlashEventRecord { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if self.height != 0 { + len += 1; + } + if self.period != 0 { + len += 1; + } + if self.validator_slash_event.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.distribution.v1beta1.ValidatorSlashEventRecord", len)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if self.period != 0 { + struct_ser.serialize_field("period", ToString::to_string(&self.period).as_str())?; + } + if let Some(v) = self.validator_slash_event.as_ref() { + struct_ser.serialize_field("validatorSlashEvent", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator_address", + "validatorAddress", + "height", + "period", + "validator_slash_event", + "validatorSlashEvent", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + Height, + Period, + ValidatorSlashEvent, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "height" => Ok(GeneratedField::Height), + "period" => Ok(GeneratedField::Period), + "validatorSlashEvent" | "validator_slash_event" => { + Ok(GeneratedField::ValidatorSlashEvent) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorSlashEventRecord; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.ValidatorSlashEventRecord") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut height__ = None; + let mut period__ = None; + let mut validator_slash_event__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Period => { + if period__.is_some() { + return Err(serde::de::Error::duplicate_field("period")); + } + period__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::ValidatorSlashEvent => { + if validator_slash_event__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorSlashEvent", + )); + } + validator_slash_event__ = map.next_value()?; + } + } + } + Ok(ValidatorSlashEventRecord { + validator_address: validator_address__.unwrap_or_default(), + height: height__.unwrap_or_default(), + period: period__.unwrap_or_default(), + validator_slash_event: validator_slash_event__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorSlashEventRecord", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorSlashEvents { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_slash_events.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.distribution.v1beta1.ValidatorSlashEvents", len)?; + if !self.validator_slash_events.is_empty() { + struct_ser.serialize_field("validatorSlashEvents", &self.validator_slash_events)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorSlashEvents { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_slash_events", "validatorSlashEvents"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorSlashEvents, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorSlashEvents" | "validator_slash_events" => { + Ok(GeneratedField::ValidatorSlashEvents) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorSlashEvents; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.distribution.v1beta1.ValidatorSlashEvents") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_slash_events__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorSlashEvents => { + if validator_slash_events__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorSlashEvents", + )); + } + validator_slash_events__ = Some(map.next_value()?); + } + } + } + Ok(ValidatorSlashEvents { + validator_slash_events: validator_slash_events__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.distribution.v1beta1.ValidatorSlashEvents", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs index 6ef949d0..556828eb 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs @@ -68,5 +68,6 @@ pub struct MsgSubmitEvidenceResponse { #[prost(bytes = "vec", tag = "4")] pub hash: ::prost::alloc::vec::Vec, } +include!("cosmos.evidence.v1beta1.serde.rs"); include!("cosmos.evidence.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs new file mode 100644 index 00000000..8e8e3941 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs @@ -0,0 +1,893 @@ +// @generated +impl serde::Serialize for Equivocation { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if self.time.is_some() { + len += 1; + } + if self.power != 0 { + len += 1; + } + if !self.consensus_address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.evidence.v1beta1.Equivocation", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if let Some(v) = self.time.as_ref() { + struct_ser.serialize_field("time", v)?; + } + if self.power != 0 { + struct_ser.serialize_field("power", ToString::to_string(&self.power).as_str())?; + } + if !self.consensus_address.is_empty() { + struct_ser.serialize_field("consensusAddress", &self.consensus_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Equivocation { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "height", + "time", + "power", + "consensus_address", + "consensusAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Time, + Power, + ConsensusAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + "time" => Ok(GeneratedField::Time), + "power" => Ok(GeneratedField::Power), + "consensusAddress" | "consensus_address" => { + Ok(GeneratedField::ConsensusAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Equivocation; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.evidence.v1beta1.Equivocation") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut time__ = None; + let mut power__ = None; + let mut consensus_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Time => { + if time__.is_some() { + return Err(serde::de::Error::duplicate_field("time")); + } + time__ = map.next_value()?; + } + GeneratedField::Power => { + if power__.is_some() { + return Err(serde::de::Error::duplicate_field("power")); + } + power__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::ConsensusAddress => { + if consensus_address__.is_some() { + return Err(serde::de::Error::duplicate_field("consensusAddress")); + } + consensus_address__ = Some(map.next_value()?); + } + } + } + Ok(Equivocation { + height: height__.unwrap_or_default(), + time: time__, + power: power__.unwrap_or_default(), + consensus_address: consensus_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.evidence.v1beta1.Equivocation", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.evidence.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.evidence.v1beta1.GenesisState", len)?; + if !self.evidence.is_empty() { + struct_ser.serialize_field("evidence", &self.evidence)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["evidence"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Evidence, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "evidence" => Ok(GeneratedField::Evidence), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.evidence.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut evidence__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Evidence => { + if evidence__.is_some() { + return Err(serde::de::Error::duplicate_field("evidence")); + } + evidence__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + evidence: evidence__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.evidence.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSubmitEvidence { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.submitter.is_empty() { + len += 1; + } + if self.evidence.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.evidence.v1beta1.MsgSubmitEvidence", len)?; + if !self.submitter.is_empty() { + struct_ser.serialize_field("submitter", &self.submitter)?; + } + if let Some(v) = self.evidence.as_ref() { + struct_ser.serialize_field("evidence", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSubmitEvidence { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["submitter", "evidence"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Submitter, + Evidence, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "submitter" => Ok(GeneratedField::Submitter), + "evidence" => Ok(GeneratedField::Evidence), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSubmitEvidence; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.evidence.v1beta1.MsgSubmitEvidence") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut submitter__ = None; + let mut evidence__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Submitter => { + if submitter__.is_some() { + return Err(serde::de::Error::duplicate_field("submitter")); + } + submitter__ = Some(map.next_value()?); + } + GeneratedField::Evidence => { + if evidence__.is_some() { + return Err(serde::de::Error::duplicate_field("evidence")); + } + evidence__ = map.next_value()?; + } + } + } + Ok(MsgSubmitEvidence { + submitter: submitter__.unwrap_or_default(), + evidence: evidence__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.evidence.v1beta1.MsgSubmitEvidence", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSubmitEvidenceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.hash.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse", len)?; + if !self.hash.is_empty() { + struct_ser + .serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSubmitEvidenceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["hash"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Hash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "hash" => Ok(GeneratedField::Hash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSubmitEvidenceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut hash__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgSubmitEvidenceResponse { + hash: hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllEvidenceRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.evidence.v1beta1.QueryAllEvidenceRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllEvidenceRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllEvidenceRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.evidence.v1beta1.QueryAllEvidenceRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAllEvidenceRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.evidence.v1beta1.QueryAllEvidenceRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllEvidenceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.evidence.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.evidence.v1beta1.QueryAllEvidenceResponse", len)?; + if !self.evidence.is_empty() { + struct_ser.serialize_field("evidence", &self.evidence)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllEvidenceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["evidence", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Evidence, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "evidence" => Ok(GeneratedField::Evidence), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllEvidenceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.evidence.v1beta1.QueryAllEvidenceResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut evidence__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Evidence => { + if evidence__.is_some() { + return Err(serde::de::Error::duplicate_field("evidence")); + } + evidence__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAllEvidenceResponse { + evidence: evidence__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.evidence.v1beta1.QueryAllEvidenceResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryEvidenceRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.evidence_hash.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.evidence.v1beta1.QueryEvidenceRequest", len)?; + if !self.evidence_hash.is_empty() { + struct_ser.serialize_field( + "evidenceHash", + pbjson::private::base64::encode(&self.evidence_hash).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryEvidenceRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["evidence_hash", "evidenceHash"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + EvidenceHash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "evidenceHash" | "evidence_hash" => Ok(GeneratedField::EvidenceHash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryEvidenceRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.evidence.v1beta1.QueryEvidenceRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut evidence_hash__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::EvidenceHash => { + if evidence_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("evidenceHash")); + } + evidence_hash__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryEvidenceRequest { + evidence_hash: evidence_hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.evidence.v1beta1.QueryEvidenceRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryEvidenceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.evidence.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.evidence.v1beta1.QueryEvidenceResponse", len)?; + if let Some(v) = self.evidence.as_ref() { + struct_ser.serialize_field("evidence", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryEvidenceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["evidence"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Evidence, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "evidence" => Ok(GeneratedField::Evidence), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryEvidenceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.evidence.v1beta1.QueryEvidenceResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut evidence__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Evidence => { + if evidence__.is_some() { + return Err(serde::de::Error::duplicate_field("evidence")); + } + evidence__ = map.next_value()?; + } + } + } + Ok(QueryEvidenceResponse { + evidence: evidence__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.evidence.v1beta1.QueryEvidenceResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs index 6715da41..5469e27f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs @@ -154,5 +154,6 @@ pub struct MsgRevokeAllowance { /// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeAllowanceResponse {} +include!("cosmos.feegrant.v1beta1.serde.rs"); include!("cosmos.feegrant.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs new file mode 100644 index 00000000..1d438797 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs @@ -0,0 +1,1710 @@ +// @generated +impl serde::Serialize for AllowedMsgAllowance { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.allowance.is_some() { + len += 1; + } + if !self.allowed_messages.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.AllowedMsgAllowance", len)?; + if let Some(v) = self.allowance.as_ref() { + struct_ser.serialize_field("allowance", v)?; + } + if !self.allowed_messages.is_empty() { + struct_ser.serialize_field("allowedMessages", &self.allowed_messages)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AllowedMsgAllowance { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["allowance", "allowed_messages", "allowedMessages"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Allowance, + AllowedMessages, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "allowance" => Ok(GeneratedField::Allowance), + "allowedMessages" | "allowed_messages" => { + Ok(GeneratedField::AllowedMessages) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AllowedMsgAllowance; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.AllowedMsgAllowance") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut allowance__ = None; + let mut allowed_messages__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Allowance => { + if allowance__.is_some() { + return Err(serde::de::Error::duplicate_field("allowance")); + } + allowance__ = map.next_value()?; + } + GeneratedField::AllowedMessages => { + if allowed_messages__.is_some() { + return Err(serde::de::Error::duplicate_field("allowedMessages")); + } + allowed_messages__ = Some(map.next_value()?); + } + } + } + Ok(AllowedMsgAllowance { + allowance: allowance__, + allowed_messages: allowed_messages__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.AllowedMsgAllowance", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for BasicAllowance { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.spend_limit.is_empty() { + len += 1; + } + if self.expiration.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.BasicAllowance", len)?; + if !self.spend_limit.is_empty() { + struct_ser.serialize_field("spendLimit", &self.spend_limit)?; + } + if let Some(v) = self.expiration.as_ref() { + struct_ser.serialize_field("expiration", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BasicAllowance { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["spend_limit", "spendLimit", "expiration"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SpendLimit, + Expiration, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "spendLimit" | "spend_limit" => Ok(GeneratedField::SpendLimit), + "expiration" => Ok(GeneratedField::Expiration), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BasicAllowance; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.BasicAllowance") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut spend_limit__ = None; + let mut expiration__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::SpendLimit => { + if spend_limit__.is_some() { + return Err(serde::de::Error::duplicate_field("spendLimit")); + } + spend_limit__ = Some(map.next_value()?); + } + GeneratedField::Expiration => { + if expiration__.is_some() { + return Err(serde::de::Error::duplicate_field("expiration")); + } + expiration__ = map.next_value()?; + } + } + } + Ok(BasicAllowance { + spend_limit: spend_limit__.unwrap_or_default(), + expiration: expiration__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.BasicAllowance", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.allowances.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.GenesisState", len)?; + if !self.allowances.is_empty() { + struct_ser.serialize_field("allowances", &self.allowances)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["allowances"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Allowances, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "allowances" => Ok(GeneratedField::Allowances), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut allowances__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Allowances => { + if allowances__.is_some() { + return Err(serde::de::Error::duplicate_field("allowances")); + } + allowances__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + allowances: allowances__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Grant { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + if self.allowance.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.feegrant.v1beta1.Grant", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if let Some(v) = self.allowance.as_ref() { + struct_ser.serialize_field("allowance", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Grant { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "grantee", "allowance"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Grantee, + Allowance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + "allowance" => Ok(GeneratedField::Allowance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Grant; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.Grant") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut grantee__ = None; + let mut allowance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::Allowance => { + if allowance__.is_some() { + return Err(serde::de::Error::duplicate_field("allowance")); + } + allowance__ = map.next_value()?; + } + } + } + Ok(Grant { + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + allowance: allowance__, + }) + } + } + deserializer.deserialize_struct("cosmos.feegrant.v1beta1.Grant", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgGrantAllowance { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + if self.allowance.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.MsgGrantAllowance", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if let Some(v) = self.allowance.as_ref() { + struct_ser.serialize_field("allowance", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgGrantAllowance { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "grantee", "allowance"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Grantee, + Allowance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + "allowance" => Ok(GeneratedField::Allowance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgGrantAllowance; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.MsgGrantAllowance") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut grantee__ = None; + let mut allowance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::Allowance => { + if allowance__.is_some() { + return Err(serde::de::Error::duplicate_field("allowance")); + } + allowance__ = map.next_value()?; + } + } + } + Ok(MsgGrantAllowance { + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + allowance: allowance__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.MsgGrantAllowance", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgGrantAllowanceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgGrantAllowanceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgGrantAllowanceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgGrantAllowanceResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgRevokeAllowance { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.MsgRevokeAllowance", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgRevokeAllowance { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "grantee"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Grantee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgRevokeAllowance; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.MsgRevokeAllowance") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut grantee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + } + } + Ok(MsgRevokeAllowance { + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.MsgRevokeAllowance", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgRevokeAllowanceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgRevokeAllowanceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgRevokeAllowanceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgRevokeAllowanceResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for PeriodicAllowance { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.basic.is_some() { + len += 1; + } + if self.period.is_some() { + len += 1; + } + if !self.period_spend_limit.is_empty() { + len += 1; + } + if !self.period_can_spend.is_empty() { + len += 1; + } + if self.period_reset.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.PeriodicAllowance", len)?; + if let Some(v) = self.basic.as_ref() { + struct_ser.serialize_field("basic", v)?; + } + if let Some(v) = self.period.as_ref() { + struct_ser.serialize_field("period", v)?; + } + if !self.period_spend_limit.is_empty() { + struct_ser.serialize_field("periodSpendLimit", &self.period_spend_limit)?; + } + if !self.period_can_spend.is_empty() { + struct_ser.serialize_field("periodCanSpend", &self.period_can_spend)?; + } + if let Some(v) = self.period_reset.as_ref() { + struct_ser.serialize_field("periodReset", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PeriodicAllowance { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "basic", + "period", + "period_spend_limit", + "periodSpendLimit", + "period_can_spend", + "periodCanSpend", + "period_reset", + "periodReset", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Basic, + Period, + PeriodSpendLimit, + PeriodCanSpend, + PeriodReset, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "basic" => Ok(GeneratedField::Basic), + "period" => Ok(GeneratedField::Period), + "periodSpendLimit" | "period_spend_limit" => { + Ok(GeneratedField::PeriodSpendLimit) + } + "periodCanSpend" | "period_can_spend" => { + Ok(GeneratedField::PeriodCanSpend) + } + "periodReset" | "period_reset" => Ok(GeneratedField::PeriodReset), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PeriodicAllowance; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.PeriodicAllowance") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut basic__ = None; + let mut period__ = None; + let mut period_spend_limit__ = None; + let mut period_can_spend__ = None; + let mut period_reset__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Basic => { + if basic__.is_some() { + return Err(serde::de::Error::duplicate_field("basic")); + } + basic__ = map.next_value()?; + } + GeneratedField::Period => { + if period__.is_some() { + return Err(serde::de::Error::duplicate_field("period")); + } + period__ = map.next_value()?; + } + GeneratedField::PeriodSpendLimit => { + if period_spend_limit__.is_some() { + return Err(serde::de::Error::duplicate_field("periodSpendLimit")); + } + period_spend_limit__ = Some(map.next_value()?); + } + GeneratedField::PeriodCanSpend => { + if period_can_spend__.is_some() { + return Err(serde::de::Error::duplicate_field("periodCanSpend")); + } + period_can_spend__ = Some(map.next_value()?); + } + GeneratedField::PeriodReset => { + if period_reset__.is_some() { + return Err(serde::de::Error::duplicate_field("periodReset")); + } + period_reset__ = map.next_value()?; + } + } + } + Ok(PeriodicAllowance { + basic: basic__, + period: period__, + period_spend_limit: period_spend_limit__.unwrap_or_default(), + period_can_spend: period_can_spend__.unwrap_or_default(), + period_reset: period_reset__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.PeriodicAllowance", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllowanceRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if !self.grantee.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.QueryAllowanceRequest", len)?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllowanceRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "grantee"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Grantee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "grantee" => Ok(GeneratedField::Grantee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllowanceRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.QueryAllowanceRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut grantee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + } + } + Ok(QueryAllowanceRequest { + granter: granter__.unwrap_or_default(), + grantee: grantee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.QueryAllowanceRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllowanceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.allowance.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.QueryAllowanceResponse", len)?; + if let Some(v) = self.allowance.as_ref() { + struct_ser.serialize_field("allowance", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllowanceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["allowance"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Allowance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "allowance" => Ok(GeneratedField::Allowance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllowanceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.QueryAllowanceResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut allowance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Allowance => { + if allowance__.is_some() { + return Err(serde::de::Error::duplicate_field("allowance")); + } + allowance__ = map.next_value()?; + } + } + } + Ok(QueryAllowanceResponse { + allowance: allowance__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.QueryAllowanceResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllowancesByGranterRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.granter.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest", + len, + )?; + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["granter", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Granter, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "granter" => Ok(GeneratedField::Granter), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllowancesByGranterRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut granter__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAllowancesByGranterRequest { + granter: granter__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllowancesByGranterResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.allowances.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse", + len, + )?; + if !self.allowances.is_empty() { + struct_ser.serialize_field("allowances", &self.allowances)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["allowances", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Allowances, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "allowances" => Ok(GeneratedField::Allowances), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllowancesByGranterResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut allowances__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Allowances => { + if allowances__.is_some() { + return Err(serde::de::Error::duplicate_field("allowances")); + } + allowances__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAllowancesByGranterResponse { + allowances: allowances__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllowancesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.grantee.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.QueryAllowancesRequest", len)?; + if !self.grantee.is_empty() { + struct_ser.serialize_field("grantee", &self.grantee)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllowancesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["grantee", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Grantee, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "grantee" => Ok(GeneratedField::Grantee), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllowancesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.QueryAllowancesRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut grantee__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Grantee => { + if grantee__.is_some() { + return Err(serde::de::Error::duplicate_field("grantee")); + } + grantee__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAllowancesRequest { + grantee: grantee__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.QueryAllowancesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllowancesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.allowances.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.feegrant.v1beta1.QueryAllowancesResponse", len)?; + if !self.allowances.is_empty() { + struct_ser.serialize_field("allowances", &self.allowances)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllowancesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["allowances", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Allowances, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "allowances" => Ok(GeneratedField::Allowances), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllowancesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.feegrant.v1beta1.QueryAllowancesResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut allowances__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Allowances => { + if allowances__.is_some() { + return Err(serde::de::Error::duplicate_field("allowances")); + } + allowances__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryAllowancesResponse { + allowances: allowances__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.feegrant.v1beta1.QueryAllowancesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs index 2527f9e4..acd65772 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs @@ -6,4 +6,5 @@ pub struct GenesisState { #[prost(bytes = "vec", repeated, tag = "1")] pub gen_txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } +include!("cosmos.genutil.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs new file mode 100644 index 00000000..4f5f66ea --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs @@ -0,0 +1,110 @@ +// @generated +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.gen_txs.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.genutil.v1beta1.GenesisState", len)?; + if !self.gen_txs.is_empty() { + struct_ser.serialize_field( + "genTxs", + &self + .gen_txs + .iter() + .map(pbjson::private::base64::encode) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["gen_txs", "genTxs"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GenTxs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "genTxs" | "gen_txs" => Ok(GeneratedField::GenTxs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.genutil.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut gen_txs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GenTxs => { + if gen_txs__.is_some() { + return Err(serde::de::Error::duplicate_field("genTxs")); + } + gen_txs__ = Some( + map.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(GenesisState { + gen_txs: gen_txs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.genutil.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs index 97baf541..29795791 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs @@ -422,5 +422,6 @@ pub struct MsgDeposit { /// MsgDepositResponse defines the Msg/Deposit response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDepositResponse {} +include!("cosmos.gov.v1.serde.rs"); include!("cosmos.gov.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs new file mode 100644 index 00000000..781f45f2 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs @@ -0,0 +1,4410 @@ +// @generated +impl serde::Serialize for Deposit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Deposit", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Deposit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "depositor", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Depositor, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "depositor" => Ok(GeneratedField::Depositor), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Deposit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.Deposit") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut depositor__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(Deposit { + proposal_id: proposal_id__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.Deposit", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DepositParams { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.min_deposit.is_empty() { + len += 1; + } + if self.max_deposit_period.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.DepositParams", len)?; + if !self.min_deposit.is_empty() { + struct_ser.serialize_field("minDeposit", &self.min_deposit)?; + } + if let Some(v) = self.max_deposit_period.as_ref() { + struct_ser.serialize_field("maxDepositPeriod", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DepositParams { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "min_deposit", + "minDeposit", + "max_deposit_period", + "maxDepositPeriod", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MinDeposit, + MaxDepositPeriod, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "minDeposit" | "min_deposit" => Ok(GeneratedField::MinDeposit), + "maxDepositPeriod" | "max_deposit_period" => { + Ok(GeneratedField::MaxDepositPeriod) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DepositParams; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.DepositParams") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut min_deposit__ = None; + let mut max_deposit_period__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MinDeposit => { + if min_deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("minDeposit")); + } + min_deposit__ = Some(map.next_value()?); + } + GeneratedField::MaxDepositPeriod => { + if max_deposit_period__.is_some() { + return Err(serde::de::Error::duplicate_field("maxDepositPeriod")); + } + max_deposit_period__ = map.next_value()?; + } + } + } + Ok(DepositParams { + min_deposit: min_deposit__.unwrap_or_default(), + max_deposit_period: max_deposit_period__, + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.DepositParams", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.starting_proposal_id != 0 { + len += 1; + } + if !self.deposits.is_empty() { + len += 1; + } + if !self.votes.is_empty() { + len += 1; + } + if !self.proposals.is_empty() { + len += 1; + } + if self.deposit_params.is_some() { + len += 1; + } + if self.voting_params.is_some() { + len += 1; + } + if self.tally_params.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.GenesisState", len)?; + if self.starting_proposal_id != 0 { + struct_ser.serialize_field( + "startingProposalId", + ToString::to_string(&self.starting_proposal_id).as_str(), + )?; + } + if !self.deposits.is_empty() { + struct_ser.serialize_field("deposits", &self.deposits)?; + } + if !self.votes.is_empty() { + struct_ser.serialize_field("votes", &self.votes)?; + } + if !self.proposals.is_empty() { + struct_ser.serialize_field("proposals", &self.proposals)?; + } + if let Some(v) = self.deposit_params.as_ref() { + struct_ser.serialize_field("depositParams", v)?; + } + if let Some(v) = self.voting_params.as_ref() { + struct_ser.serialize_field("votingParams", v)?; + } + if let Some(v) = self.tally_params.as_ref() { + struct_ser.serialize_field("tallyParams", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "starting_proposal_id", + "startingProposalId", + "deposits", + "votes", + "proposals", + "deposit_params", + "depositParams", + "voting_params", + "votingParams", + "tally_params", + "tallyParams", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + StartingProposalId, + Deposits, + Votes, + Proposals, + DepositParams, + VotingParams, + TallyParams, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "startingProposalId" | "starting_proposal_id" => { + Ok(GeneratedField::StartingProposalId) + } + "deposits" => Ok(GeneratedField::Deposits), + "votes" => Ok(GeneratedField::Votes), + "proposals" => Ok(GeneratedField::Proposals), + "depositParams" | "deposit_params" => Ok(GeneratedField::DepositParams), + "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), + "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut starting_proposal_id__ = None; + let mut deposits__ = None; + let mut votes__ = None; + let mut proposals__ = None; + let mut deposit_params__ = None; + let mut voting_params__ = None; + let mut tally_params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::StartingProposalId => { + if starting_proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field( + "startingProposalId", + )); + } + starting_proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Deposits => { + if deposits__.is_some() { + return Err(serde::de::Error::duplicate_field("deposits")); + } + deposits__ = Some(map.next_value()?); + } + GeneratedField::Votes => { + if votes__.is_some() { + return Err(serde::de::Error::duplicate_field("votes")); + } + votes__ = Some(map.next_value()?); + } + GeneratedField::Proposals => { + if proposals__.is_some() { + return Err(serde::de::Error::duplicate_field("proposals")); + } + proposals__ = Some(map.next_value()?); + } + GeneratedField::DepositParams => { + if deposit_params__.is_some() { + return Err(serde::de::Error::duplicate_field("depositParams")); + } + deposit_params__ = map.next_value()?; + } + GeneratedField::VotingParams => { + if voting_params__.is_some() { + return Err(serde::de::Error::duplicate_field("votingParams")); + } + voting_params__ = map.next_value()?; + } + GeneratedField::TallyParams => { + if tally_params__.is_some() { + return Err(serde::de::Error::duplicate_field("tallyParams")); + } + tally_params__ = map.next_value()?; + } + } + } + Ok(GenesisState { + starting_proposal_id: starting_proposal_id__.unwrap_or_default(), + deposits: deposits__.unwrap_or_default(), + votes: votes__.unwrap_or_default(), + proposals: proposals__.unwrap_or_default(), + deposit_params: deposit_params__, + voting_params: voting_params__, + tally_params: tally_params__, + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.GenesisState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgDeposit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgDeposit", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgDeposit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "depositor", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Depositor, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "depositor" => Ok(GeneratedField::Depositor), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgDeposit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgDeposit") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut depositor__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(MsgDeposit { + proposal_id: proposal_id__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.MsgDeposit", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgDepositResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgDepositResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgDepositResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgDepositResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgDepositResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgDepositResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.MsgDepositResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgExecLegacyContent { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.content.is_some() { + len += 1; + } + if !self.authority.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.MsgExecLegacyContent", len)?; + if let Some(v) = self.content.as_ref() { + struct_ser.serialize_field("content", v)?; + } + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["content", "authority"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Content, + Authority, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "content" => Ok(GeneratedField::Content), + "authority" => Ok(GeneratedField::Authority), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgExecLegacyContent; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgExecLegacyContent") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut content__ = None; + let mut authority__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Content => { + if content__.is_some() { + return Err(serde::de::Error::duplicate_field("content")); + } + content__ = map.next_value()?; + } + GeneratedField::Authority => { + if authority__.is_some() { + return Err(serde::de::Error::duplicate_field("authority")); + } + authority__ = Some(map.next_value()?); + } + } + } + Ok(MsgExecLegacyContent { + content: content__, + authority: authority__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.MsgExecLegacyContent", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgExecLegacyContentResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.gov.v1.MsgExecLegacyContentResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgExecLegacyContentResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgExecLegacyContentResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgExecLegacyContentResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.MsgExecLegacyContentResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSubmitProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.messages.is_empty() { + len += 1; + } + if !self.initial_deposit.is_empty() { + len += 1; + } + if !self.proposer.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgSubmitProposal", len)?; + if !self.messages.is_empty() { + struct_ser.serialize_field("messages", &self.messages)?; + } + if !self.initial_deposit.is_empty() { + struct_ser.serialize_field("initialDeposit", &self.initial_deposit)?; + } + if !self.proposer.is_empty() { + struct_ser.serialize_field("proposer", &self.proposer)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "messages", + "initial_deposit", + "initialDeposit", + "proposer", + "metadata", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Messages, + InitialDeposit, + Proposer, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "messages" => Ok(GeneratedField::Messages), + "initialDeposit" | "initial_deposit" => { + Ok(GeneratedField::InitialDeposit) + } + "proposer" => Ok(GeneratedField::Proposer), + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSubmitProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgSubmitProposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut messages__ = None; + let mut initial_deposit__ = None; + let mut proposer__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Messages => { + if messages__.is_some() { + return Err(serde::de::Error::duplicate_field("messages")); + } + messages__ = Some(map.next_value()?); + } + GeneratedField::InitialDeposit => { + if initial_deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("initialDeposit")); + } + initial_deposit__ = Some(map.next_value()?); + } + GeneratedField::Proposer => { + if proposer__.is_some() { + return Err(serde::de::Error::duplicate_field("proposer")); + } + proposer__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(MsgSubmitProposal { + messages: messages__.unwrap_or_default(), + initial_deposit: initial_deposit__.unwrap_or_default(), + proposer: proposer__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.MsgSubmitProposal", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgSubmitProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.MsgSubmitProposalResponse", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSubmitProposalResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgSubmitProposalResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgSubmitProposalResponse { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.MsgSubmitProposalResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgVote { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if self.option != 0 { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVote", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if self.option != 0 { + let v = VoteOption::from_i32(self.option).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.option)) + })?; + struct_ser.serialize_field("option", &v)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVote { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter", "option", "metadata"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + Option, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + "option" => Ok(GeneratedField::Option), + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgVote; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgVote") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + let mut option__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Option => { + if option__.is_some() { + return Err(serde::de::Error::duplicate_field("option")); + } + option__ = Some(map.next_value::()? as i32); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(MsgVote { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + option: option__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.MsgVote", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgVoteResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVoteResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVoteResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgVoteResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgVoteResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgVoteResponse {}) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgVoteWeighted { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if !self.options.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVoteWeighted", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if !self.options.is_empty() { + struct_ser.serialize_field("options", &self.options)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter", "options", "metadata"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + Options, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + "options" => Ok(GeneratedField::Options), + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgVoteWeighted; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgVoteWeighted") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + let mut options__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Options => { + if options__.is_some() { + return Err(serde::de::Error::duplicate_field("options")); + } + options__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(MsgVoteWeighted { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + options: options__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteWeighted", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgVoteWeightedResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.gov.v1.MsgVoteWeightedResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgVoteWeightedResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgVoteWeightedResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgVoteWeightedResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.MsgVoteWeightedResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Proposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.id != 0 { + len += 1; + } + if !self.messages.is_empty() { + len += 1; + } + if self.status != 0 { + len += 1; + } + if self.final_tally_result.is_some() { + len += 1; + } + if self.submit_time.is_some() { + len += 1; + } + if self.deposit_end_time.is_some() { + len += 1; + } + if !self.total_deposit.is_empty() { + len += 1; + } + if self.voting_start_time.is_some() { + len += 1; + } + if self.voting_end_time.is_some() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Proposal", len)?; + if self.id != 0 { + struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; + } + if !self.messages.is_empty() { + struct_ser.serialize_field("messages", &self.messages)?; + } + if self.status != 0 { + let v = ProposalStatus::from_i32(self.status).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.status)) + })?; + struct_ser.serialize_field("status", &v)?; + } + if let Some(v) = self.final_tally_result.as_ref() { + struct_ser.serialize_field("finalTallyResult", v)?; + } + if let Some(v) = self.submit_time.as_ref() { + struct_ser.serialize_field("submitTime", v)?; + } + if let Some(v) = self.deposit_end_time.as_ref() { + struct_ser.serialize_field("depositEndTime", v)?; + } + if !self.total_deposit.is_empty() { + struct_ser.serialize_field("totalDeposit", &self.total_deposit)?; + } + if let Some(v) = self.voting_start_time.as_ref() { + struct_ser.serialize_field("votingStartTime", v)?; + } + if let Some(v) = self.voting_end_time.as_ref() { + struct_ser.serialize_field("votingEndTime", v)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Proposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "messages", + "status", + "final_tally_result", + "finalTallyResult", + "submit_time", + "submitTime", + "deposit_end_time", + "depositEndTime", + "total_deposit", + "totalDeposit", + "voting_start_time", + "votingStartTime", + "voting_end_time", + "votingEndTime", + "metadata", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + Messages, + Status, + FinalTallyResult, + SubmitTime, + DepositEndTime, + TotalDeposit, + VotingStartTime, + VotingEndTime, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + "messages" => Ok(GeneratedField::Messages), + "status" => Ok(GeneratedField::Status), + "finalTallyResult" | "final_tally_result" => { + Ok(GeneratedField::FinalTallyResult) + } + "submitTime" | "submit_time" => Ok(GeneratedField::SubmitTime), + "depositEndTime" | "deposit_end_time" => { + Ok(GeneratedField::DepositEndTime) + } + "totalDeposit" | "total_deposit" => Ok(GeneratedField::TotalDeposit), + "votingStartTime" | "voting_start_time" => { + Ok(GeneratedField::VotingStartTime) + } + "votingEndTime" | "voting_end_time" => { + Ok(GeneratedField::VotingEndTime) + } + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Proposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.Proposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + let mut messages__ = None; + let mut status__ = None; + let mut final_tally_result__ = None; + let mut submit_time__ = None; + let mut deposit_end_time__ = None; + let mut total_deposit__ = None; + let mut voting_start_time__ = None; + let mut voting_end_time__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Messages => { + if messages__.is_some() { + return Err(serde::de::Error::duplicate_field("messages")); + } + messages__ = Some(map.next_value()?); + } + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); + } + status__ = Some(map.next_value::()? as i32); + } + GeneratedField::FinalTallyResult => { + if final_tally_result__.is_some() { + return Err(serde::de::Error::duplicate_field("finalTallyResult")); + } + final_tally_result__ = map.next_value()?; + } + GeneratedField::SubmitTime => { + if submit_time__.is_some() { + return Err(serde::de::Error::duplicate_field("submitTime")); + } + submit_time__ = map.next_value()?; + } + GeneratedField::DepositEndTime => { + if deposit_end_time__.is_some() { + return Err(serde::de::Error::duplicate_field("depositEndTime")); + } + deposit_end_time__ = map.next_value()?; + } + GeneratedField::TotalDeposit => { + if total_deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("totalDeposit")); + } + total_deposit__ = Some(map.next_value()?); + } + GeneratedField::VotingStartTime => { + if voting_start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("votingStartTime")); + } + voting_start_time__ = map.next_value()?; + } + GeneratedField::VotingEndTime => { + if voting_end_time__.is_some() { + return Err(serde::de::Error::duplicate_field("votingEndTime")); + } + voting_end_time__ = map.next_value()?; + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(Proposal { + id: id__.unwrap_or_default(), + messages: messages__.unwrap_or_default(), + status: status__.unwrap_or_default(), + final_tally_result: final_tally_result__, + submit_time: submit_time__, + deposit_end_time: deposit_end_time__, + total_deposit: total_deposit__.unwrap_or_default(), + voting_start_time: voting_start_time__, + voting_end_time: voting_end_time__, + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.Proposal", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ProposalStatus { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", + Self::DepositPeriod => "PROPOSAL_STATUS_DEPOSIT_PERIOD", + Self::VotingPeriod => "PROPOSAL_STATUS_VOTING_PERIOD", + Self::Passed => "PROPOSAL_STATUS_PASSED", + Self::Rejected => "PROPOSAL_STATUS_REJECTED", + Self::Failed => "PROPOSAL_STATUS_FAILED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ProposalStatus { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "PROPOSAL_STATUS_UNSPECIFIED", + "PROPOSAL_STATUS_DEPOSIT_PERIOD", + "PROPOSAL_STATUS_VOTING_PERIOD", + "PROPOSAL_STATUS_PASSED", + "PROPOSAL_STATUS_REJECTED", + "PROPOSAL_STATUS_FAILED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ProposalStatus; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ProposalStatus::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ProposalStatus::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Ok(ProposalStatus::Unspecified), + "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Ok(ProposalStatus::DepositPeriod), + "PROPOSAL_STATUS_VOTING_PERIOD" => Ok(ProposalStatus::VotingPeriod), + "PROPOSAL_STATUS_PASSED" => Ok(ProposalStatus::Passed), + "PROPOSAL_STATUS_REJECTED" => Ok(ProposalStatus::Rejected), + "PROPOSAL_STATUS_FAILED" => Ok(ProposalStatus::Failed), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for QueryDepositRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryDepositRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDepositRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "depositor"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Depositor, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "depositor" => Ok(GeneratedField::Depositor), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDepositRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryDepositRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut depositor__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + } + } + Ok(QueryDepositRequest { + proposal_id: proposal_id__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryDepositRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDepositResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.deposit.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryDepositResponse", len)?; + if let Some(v) = self.deposit.as_ref() { + struct_ser.serialize_field("deposit", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDepositResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["deposit"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Deposit, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "deposit" => Ok(GeneratedField::Deposit), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDepositResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryDepositResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut deposit__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Deposit => { + if deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("deposit")); + } + deposit__ = map.next_value()?; + } + } + } + Ok(QueryDepositResponse { deposit: deposit__ }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryDepositResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDepositsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryDepositsRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDepositsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryDepositsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDepositsRequest { + proposal_id: proposal_id__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryDepositsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDepositsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.deposits.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryDepositsResponse", len)?; + if !self.deposits.is_empty() { + struct_ser.serialize_field("deposits", &self.deposits)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["deposits", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Deposits, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "deposits" => Ok(GeneratedField::Deposits), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDepositsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryDepositsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut deposits__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Deposits => { + if deposits__.is_some() { + return Err(serde::de::Error::duplicate_field("deposits")); + } + deposits__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDepositsResponse { + deposits: deposits__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryDepositsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.params_type.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryParamsRequest", len)?; + if !self.params_type.is_empty() { + struct_ser.serialize_field("paramsType", &self.params_type)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params_type", "paramsType"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ParamsType, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "paramsType" | "params_type" => Ok(GeneratedField::ParamsType), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params_type__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ParamsType => { + if params_type__.is_some() { + return Err(serde::de::Error::duplicate_field("paramsType")); + } + params_type__ = Some(map.next_value()?); + } + } + } + Ok(QueryParamsRequest { + params_type: params_type__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.voting_params.is_some() { + len += 1; + } + if self.deposit_params.is_some() { + len += 1; + } + if self.tally_params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryParamsResponse", len)?; + if let Some(v) = self.voting_params.as_ref() { + struct_ser.serialize_field("votingParams", v)?; + } + if let Some(v) = self.deposit_params.as_ref() { + struct_ser.serialize_field("depositParams", v)?; + } + if let Some(v) = self.tally_params.as_ref() { + struct_ser.serialize_field("tallyParams", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "voting_params", + "votingParams", + "deposit_params", + "depositParams", + "tally_params", + "tallyParams", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + VotingParams, + DepositParams, + TallyParams, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), + "depositParams" | "deposit_params" => Ok(GeneratedField::DepositParams), + "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut voting_params__ = None; + let mut deposit_params__ = None; + let mut tally_params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::VotingParams => { + if voting_params__.is_some() { + return Err(serde::de::Error::duplicate_field("votingParams")); + } + voting_params__ = map.next_value()?; + } + GeneratedField::DepositParams => { + if deposit_params__.is_some() { + return Err(serde::de::Error::duplicate_field("depositParams")); + } + deposit_params__ = map.next_value()?; + } + GeneratedField::TallyParams => { + if tally_params__.is_some() { + return Err(serde::de::Error::duplicate_field("tallyParams")); + } + tally_params__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { + voting_params: voting_params__, + deposit_params: deposit_params__, + tally_params: tally_params__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryProposalRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryProposalRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryProposalRequest { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryProposalRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryProposalResponse", len)?; + if let Some(v) = self.proposal.as_ref() { + struct_ser.serialize_field("proposal", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Proposal, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposal" => Ok(GeneratedField::Proposal), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryProposalResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Proposal => { + if proposal__.is_some() { + return Err(serde::de::Error::duplicate_field("proposal")); + } + proposal__ = map.next_value()?; + } + } + } + Ok(QueryProposalResponse { + proposal: proposal__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryProposalResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_status != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryProposalsRequest", len)?; + if self.proposal_status != 0 { + let v = ProposalStatus::from_i32(self.proposal_status).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.proposal_status)) + })?; + struct_ser.serialize_field("proposalStatus", &v)?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal_status", + "proposalStatus", + "voter", + "depositor", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalStatus, + Voter, + Depositor, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalStatus" | "proposal_status" => { + Ok(GeneratedField::ProposalStatus) + } + "voter" => Ok(GeneratedField::Voter), + "depositor" => Ok(GeneratedField::Depositor), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryProposalsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_status__ = None; + let mut voter__ = None; + let mut depositor__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalStatus => { + if proposal_status__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalStatus")); + } + proposal_status__ = Some(map.next_value::()? as i32); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryProposalsRequest { + proposal_status: proposal_status__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryProposalsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.proposals.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryProposalsResponse", len)?; + if !self.proposals.is_empty() { + struct_ser.serialize_field("proposals", &self.proposals)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposals", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Proposals, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposals" => Ok(GeneratedField::Proposals), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryProposalsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposals__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Proposals => { + if proposals__.is_some() { + return Err(serde::de::Error::duplicate_field("proposals")); + } + proposals__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryProposalsResponse { + proposals: proposals__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryProposalsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryTallyResultRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryTallyResultRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryTallyResultRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryTallyResultRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryTallyResultRequest { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryTallyResultRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryTallyResultResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.tally.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryTallyResultResponse", len)?; + if let Some(v) = self.tally.as_ref() { + struct_ser.serialize_field("tally", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["tally"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Tally, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "tally" => Ok(GeneratedField::Tally), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryTallyResultResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryTallyResultResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut tally__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Tally => { + if tally__.is_some() { + return Err(serde::de::Error::duplicate_field("tally")); + } + tally__ = map.next_value()?; + } + } + } + Ok(QueryTallyResultResponse { tally: tally__ }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryTallyResultResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVoteRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVoteRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVoteRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVoteRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryVoteRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + } + } + Ok(QueryVoteRequest { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.QueryVoteRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryVoteResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.vote.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVoteResponse", len)?; + if let Some(v) = self.vote.as_ref() { + struct_ser.serialize_field("vote", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVoteResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["vote"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Vote, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "vote" => Ok(GeneratedField::Vote), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVoteResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryVoteResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut vote__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Vote => { + if vote__.is_some() { + return Err(serde::de::Error::duplicate_field("vote")); + } + vote__ = map.next_value()?; + } + } + } + Ok(QueryVoteResponse { vote: vote__ }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.QueryVoteResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryVotesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVotesRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVotesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVotesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryVotesRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryVotesRequest { + proposal_id: proposal_id__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.QueryVotesRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryVotesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.votes.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.QueryVotesResponse", len)?; + if !self.votes.is_empty() { + struct_ser.serialize_field("votes", &self.votes)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVotesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["votes", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Votes, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votes" => Ok(GeneratedField::Votes), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVotesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryVotesResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut votes__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Votes => { + if votes__.is_some() { + return Err(serde::de::Error::duplicate_field("votes")); + } + votes__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryVotesResponse { + votes: votes__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.QueryVotesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for TallyParams { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.quorum.is_empty() { + len += 1; + } + if !self.threshold.is_empty() { + len += 1; + } + if !self.veto_threshold.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.TallyParams", len)?; + if !self.quorum.is_empty() { + struct_ser.serialize_field("quorum", &self.quorum)?; + } + if !self.threshold.is_empty() { + struct_ser.serialize_field("threshold", &self.threshold)?; + } + if !self.veto_threshold.is_empty() { + struct_ser.serialize_field("vetoThreshold", &self.veto_threshold)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TallyParams { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["quorum", "threshold", "veto_threshold", "vetoThreshold"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Quorum, + Threshold, + VetoThreshold, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "quorum" => Ok(GeneratedField::Quorum), + "threshold" => Ok(GeneratedField::Threshold), + "vetoThreshold" | "veto_threshold" => Ok(GeneratedField::VetoThreshold), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TallyParams; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.TallyParams") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut quorum__ = None; + let mut threshold__ = None; + let mut veto_threshold__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Quorum => { + if quorum__.is_some() { + return Err(serde::de::Error::duplicate_field("quorum")); + } + quorum__ = Some(map.next_value()?); + } + GeneratedField::Threshold => { + if threshold__.is_some() { + return Err(serde::de::Error::duplicate_field("threshold")); + } + threshold__ = Some(map.next_value()?); + } + GeneratedField::VetoThreshold => { + if veto_threshold__.is_some() { + return Err(serde::de::Error::duplicate_field("vetoThreshold")); + } + veto_threshold__ = Some(map.next_value()?); + } + } + } + Ok(TallyParams { + quorum: quorum__.unwrap_or_default(), + threshold: threshold__.unwrap_or_default(), + veto_threshold: veto_threshold__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.TallyParams", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TallyResult { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.yes_count.is_empty() { + len += 1; + } + if !self.abstain_count.is_empty() { + len += 1; + } + if !self.no_count.is_empty() { + len += 1; + } + if !self.no_with_veto_count.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.TallyResult", len)?; + if !self.yes_count.is_empty() { + struct_ser.serialize_field("yesCount", &self.yes_count)?; + } + if !self.abstain_count.is_empty() { + struct_ser.serialize_field("abstainCount", &self.abstain_count)?; + } + if !self.no_count.is_empty() { + struct_ser.serialize_field("noCount", &self.no_count)?; + } + if !self.no_with_veto_count.is_empty() { + struct_ser.serialize_field("noWithVetoCount", &self.no_with_veto_count)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TallyResult { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "yes_count", + "yesCount", + "abstain_count", + "abstainCount", + "no_count", + "noCount", + "no_with_veto_count", + "noWithVetoCount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + YesCount, + AbstainCount, + NoCount, + NoWithVetoCount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "yesCount" | "yes_count" => Ok(GeneratedField::YesCount), + "abstainCount" | "abstain_count" => Ok(GeneratedField::AbstainCount), + "noCount" | "no_count" => Ok(GeneratedField::NoCount), + "noWithVetoCount" | "no_with_veto_count" => { + Ok(GeneratedField::NoWithVetoCount) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TallyResult; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.TallyResult") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut yes_count__ = None; + let mut abstain_count__ = None; + let mut no_count__ = None; + let mut no_with_veto_count__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::YesCount => { + if yes_count__.is_some() { + return Err(serde::de::Error::duplicate_field("yesCount")); + } + yes_count__ = Some(map.next_value()?); + } + GeneratedField::AbstainCount => { + if abstain_count__.is_some() { + return Err(serde::de::Error::duplicate_field("abstainCount")); + } + abstain_count__ = Some(map.next_value()?); + } + GeneratedField::NoCount => { + if no_count__.is_some() { + return Err(serde::de::Error::duplicate_field("noCount")); + } + no_count__ = Some(map.next_value()?); + } + GeneratedField::NoWithVetoCount => { + if no_with_veto_count__.is_some() { + return Err(serde::de::Error::duplicate_field("noWithVetoCount")); + } + no_with_veto_count__ = Some(map.next_value()?); + } + } + } + Ok(TallyResult { + yes_count: yes_count__.unwrap_or_default(), + abstain_count: abstain_count__.unwrap_or_default(), + no_count: no_count__.unwrap_or_default(), + no_with_veto_count: no_with_veto_count__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.TallyResult", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Vote { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if !self.options.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Vote", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if !self.options.is_empty() { + struct_ser.serialize_field("options", &self.options)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Vote { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter", "options", "metadata"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + Options, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + "options" => Ok(GeneratedField::Options), + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Vote; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.Vote") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + let mut options__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Options => { + if options__.is_some() { + return Err(serde::de::Error::duplicate_field("options")); + } + options__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(Vote { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + options: options__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.Vote", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for VoteOption { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "VOTE_OPTION_UNSPECIFIED", + Self::Yes => "VOTE_OPTION_YES", + Self::Abstain => "VOTE_OPTION_ABSTAIN", + Self::No => "VOTE_OPTION_NO", + Self::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for VoteOption { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "VOTE_OPTION_UNSPECIFIED", + "VOTE_OPTION_YES", + "VOTE_OPTION_ABSTAIN", + "VOTE_OPTION_NO", + "VOTE_OPTION_NO_WITH_VETO", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VoteOption; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(VoteOption::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(VoteOption::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "VOTE_OPTION_UNSPECIFIED" => Ok(VoteOption::Unspecified), + "VOTE_OPTION_YES" => Ok(VoteOption::Yes), + "VOTE_OPTION_ABSTAIN" => Ok(VoteOption::Abstain), + "VOTE_OPTION_NO" => Ok(VoteOption::No), + "VOTE_OPTION_NO_WITH_VETO" => Ok(VoteOption::NoWithVeto), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for VotingParams { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.voting_period.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.VotingParams", len)?; + if let Some(v) = self.voting_period.as_ref() { + struct_ser.serialize_field("votingPeriod", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for VotingParams { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["voting_period", "votingPeriod"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + VotingPeriod, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votingPeriod" | "voting_period" => Ok(GeneratedField::VotingPeriod), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VotingParams; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.VotingParams") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut voting_period__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::VotingPeriod => { + if voting_period__.is_some() { + return Err(serde::de::Error::duplicate_field("votingPeriod")); + } + voting_period__ = map.next_value()?; + } + } + } + Ok(VotingParams { + voting_period: voting_period__, + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.VotingParams", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for WeightedVoteOption { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.option != 0 { + len += 1; + } + if !self.weight.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1.WeightedVoteOption", len)?; + if self.option != 0 { + let v = VoteOption::from_i32(self.option).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.option)) + })?; + struct_ser.serialize_field("option", &v)?; + } + if !self.weight.is_empty() { + struct_ser.serialize_field("weight", &self.weight)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for WeightedVoteOption { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["option", "weight"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Option, + Weight, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "option" => Ok(GeneratedField::Option), + "weight" => Ok(GeneratedField::Weight), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = WeightedVoteOption; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.WeightedVoteOption") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut option__ = None; + let mut weight__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Option => { + if option__.is_some() { + return Err(serde::de::Error::duplicate_field("option")); + } + option__ = Some(map.next_value::()? as i32); + } + GeneratedField::Weight => { + if weight__.is_some() { + return Err(serde::de::Error::duplicate_field("weight")); + } + weight__ = Some(map.next_value()?); + } + } + } + Ok(WeightedVoteOption { + option: option__.unwrap_or_default(), + weight: weight__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1.WeightedVoteOption", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs index ede6c2bc..ad0d0d48 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs @@ -417,5 +417,6 @@ pub struct MsgDeposit { /// MsgDepositResponse defines the Msg/Deposit response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDepositResponse {} +include!("cosmos.gov.v1beta1.serde.rs"); include!("cosmos.gov.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs new file mode 100644 index 00000000..2122a35a --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs @@ -0,0 +1,4304 @@ +// @generated +impl serde::Serialize for Deposit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Deposit", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Deposit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "depositor", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Depositor, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "depositor" => Ok(GeneratedField::Depositor), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Deposit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.Deposit") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut depositor__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(Deposit { + proposal_id: proposal_id__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.Deposit", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DepositParams { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.min_deposit.is_empty() { + len += 1; + } + if self.max_deposit_period.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.DepositParams", len)?; + if !self.min_deposit.is_empty() { + struct_ser.serialize_field("minDeposit", &self.min_deposit)?; + } + if let Some(v) = self.max_deposit_period.as_ref() { + struct_ser.serialize_field("maxDepositPeriod", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DepositParams { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "min_deposit", + "minDeposit", + "max_deposit_period", + "maxDepositPeriod", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MinDeposit, + MaxDepositPeriod, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "minDeposit" | "min_deposit" => Ok(GeneratedField::MinDeposit), + "maxDepositPeriod" | "max_deposit_period" => { + Ok(GeneratedField::MaxDepositPeriod) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DepositParams; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.DepositParams") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut min_deposit__ = None; + let mut max_deposit_period__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MinDeposit => { + if min_deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("minDeposit")); + } + min_deposit__ = Some(map.next_value()?); + } + GeneratedField::MaxDepositPeriod => { + if max_deposit_period__.is_some() { + return Err(serde::de::Error::duplicate_field("maxDepositPeriod")); + } + max_deposit_period__ = map.next_value()?; + } + } + } + Ok(DepositParams { + min_deposit: min_deposit__.unwrap_or_default(), + max_deposit_period: max_deposit_period__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.DepositParams", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.starting_proposal_id != 0 { + len += 1; + } + if !self.deposits.is_empty() { + len += 1; + } + if !self.votes.is_empty() { + len += 1; + } + if !self.proposals.is_empty() { + len += 1; + } + if self.deposit_params.is_some() { + len += 1; + } + if self.voting_params.is_some() { + len += 1; + } + if self.tally_params.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.GenesisState", len)?; + if self.starting_proposal_id != 0 { + struct_ser.serialize_field( + "startingProposalId", + ToString::to_string(&self.starting_proposal_id).as_str(), + )?; + } + if !self.deposits.is_empty() { + struct_ser.serialize_field("deposits", &self.deposits)?; + } + if !self.votes.is_empty() { + struct_ser.serialize_field("votes", &self.votes)?; + } + if !self.proposals.is_empty() { + struct_ser.serialize_field("proposals", &self.proposals)?; + } + if let Some(v) = self.deposit_params.as_ref() { + struct_ser.serialize_field("depositParams", v)?; + } + if let Some(v) = self.voting_params.as_ref() { + struct_ser.serialize_field("votingParams", v)?; + } + if let Some(v) = self.tally_params.as_ref() { + struct_ser.serialize_field("tallyParams", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "starting_proposal_id", + "startingProposalId", + "deposits", + "votes", + "proposals", + "deposit_params", + "depositParams", + "voting_params", + "votingParams", + "tally_params", + "tallyParams", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + StartingProposalId, + Deposits, + Votes, + Proposals, + DepositParams, + VotingParams, + TallyParams, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "startingProposalId" | "starting_proposal_id" => { + Ok(GeneratedField::StartingProposalId) + } + "deposits" => Ok(GeneratedField::Deposits), + "votes" => Ok(GeneratedField::Votes), + "proposals" => Ok(GeneratedField::Proposals), + "depositParams" | "deposit_params" => Ok(GeneratedField::DepositParams), + "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), + "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut starting_proposal_id__ = None; + let mut deposits__ = None; + let mut votes__ = None; + let mut proposals__ = None; + let mut deposit_params__ = None; + let mut voting_params__ = None; + let mut tally_params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::StartingProposalId => { + if starting_proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field( + "startingProposalId", + )); + } + starting_proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Deposits => { + if deposits__.is_some() { + return Err(serde::de::Error::duplicate_field("deposits")); + } + deposits__ = Some(map.next_value()?); + } + GeneratedField::Votes => { + if votes__.is_some() { + return Err(serde::de::Error::duplicate_field("votes")); + } + votes__ = Some(map.next_value()?); + } + GeneratedField::Proposals => { + if proposals__.is_some() { + return Err(serde::de::Error::duplicate_field("proposals")); + } + proposals__ = Some(map.next_value()?); + } + GeneratedField::DepositParams => { + if deposit_params__.is_some() { + return Err(serde::de::Error::duplicate_field("depositParams")); + } + deposit_params__ = map.next_value()?; + } + GeneratedField::VotingParams => { + if voting_params__.is_some() { + return Err(serde::de::Error::duplicate_field("votingParams")); + } + voting_params__ = map.next_value()?; + } + GeneratedField::TallyParams => { + if tally_params__.is_some() { + return Err(serde::de::Error::duplicate_field("tallyParams")); + } + tally_params__ = map.next_value()?; + } + } + } + Ok(GenesisState { + starting_proposal_id: starting_proposal_id__.unwrap_or_default(), + deposits: deposits__.unwrap_or_default(), + votes: votes__.unwrap_or_default(), + proposals: proposals__.unwrap_or_default(), + deposit_params: deposit_params__, + voting_params: voting_params__, + tally_params: tally_params__, + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.GenesisState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgDeposit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgDeposit", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgDeposit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "depositor", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Depositor, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "depositor" => Ok(GeneratedField::Depositor), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgDeposit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.MsgDeposit") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut depositor__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(MsgDeposit { + proposal_id: proposal_id__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgDeposit", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgDepositResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.MsgDepositResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgDepositResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgDepositResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.MsgDepositResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgDepositResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.MsgDepositResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSubmitProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.content.is_some() { + len += 1; + } + if !self.initial_deposit.is_empty() { + len += 1; + } + if !self.proposer.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.MsgSubmitProposal", len)?; + if let Some(v) = self.content.as_ref() { + struct_ser.serialize_field("content", v)?; + } + if !self.initial_deposit.is_empty() { + struct_ser.serialize_field("initialDeposit", &self.initial_deposit)?; + } + if !self.proposer.is_empty() { + struct_ser.serialize_field("proposer", &self.proposer)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["content", "initial_deposit", "initialDeposit", "proposer"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Content, + InitialDeposit, + Proposer, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "content" => Ok(GeneratedField::Content), + "initialDeposit" | "initial_deposit" => { + Ok(GeneratedField::InitialDeposit) + } + "proposer" => Ok(GeneratedField::Proposer), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSubmitProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.MsgSubmitProposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut content__ = None; + let mut initial_deposit__ = None; + let mut proposer__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Content => { + if content__.is_some() { + return Err(serde::de::Error::duplicate_field("content")); + } + content__ = map.next_value()?; + } + GeneratedField::InitialDeposit => { + if initial_deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("initialDeposit")); + } + initial_deposit__ = Some(map.next_value()?); + } + GeneratedField::Proposer => { + if proposer__.is_some() { + return Err(serde::de::Error::duplicate_field("proposer")); + } + proposer__ = Some(map.next_value()?); + } + } + } + Ok(MsgSubmitProposal { + content: content__, + initial_deposit: initial_deposit__.unwrap_or_default(), + proposer: proposer__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.MsgSubmitProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSubmitProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.MsgSubmitProposalResponse", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSubmitProposalResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.MsgSubmitProposalResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgSubmitProposalResponse { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.MsgSubmitProposalResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgVote { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if self.option != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgVote", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if self.option != 0 { + let v = VoteOption::from_i32(self.option).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.option)) + })?; + struct_ser.serialize_field("option", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVote { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter", "option"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + Option, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + "option" => Ok(GeneratedField::Option), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgVote; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.MsgVote") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + let mut option__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Option => { + if option__.is_some() { + return Err(serde::de::Error::duplicate_field("option")); + } + option__ = Some(map.next_value::()? as i32); + } + } + } + Ok(MsgVote { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + option: option__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgVote", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgVoteResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgVoteResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVoteResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgVoteResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.MsgVoteResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgVoteResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.MsgVoteResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgVoteWeighted { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if !self.options.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.MsgVoteWeighted", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if !self.options.is_empty() { + struct_ser.serialize_field("options", &self.options)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter", "options"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + Options, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + "options" => Ok(GeneratedField::Options), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgVoteWeighted; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.MsgVoteWeighted") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + let mut options__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Options => { + if options__.is_some() { + return Err(serde::de::Error::duplicate_field("options")); + } + options__ = Some(map.next_value()?); + } + } + } + Ok(MsgVoteWeighted { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + options: options__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.MsgVoteWeighted", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgVoteWeightedResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.MsgVoteWeightedResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgVoteWeightedResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.MsgVoteWeightedResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgVoteWeightedResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.MsgVoteWeightedResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Proposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if self.content.is_some() { + len += 1; + } + if self.status != 0 { + len += 1; + } + if self.final_tally_result.is_some() { + len += 1; + } + if self.submit_time.is_some() { + len += 1; + } + if self.deposit_end_time.is_some() { + len += 1; + } + if !self.total_deposit.is_empty() { + len += 1; + } + if self.voting_start_time.is_some() { + len += 1; + } + if self.voting_end_time.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Proposal", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if let Some(v) = self.content.as_ref() { + struct_ser.serialize_field("content", v)?; + } + if self.status != 0 { + let v = ProposalStatus::from_i32(self.status).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.status)) + })?; + struct_ser.serialize_field("status", &v)?; + } + if let Some(v) = self.final_tally_result.as_ref() { + struct_ser.serialize_field("finalTallyResult", v)?; + } + if let Some(v) = self.submit_time.as_ref() { + struct_ser.serialize_field("submitTime", v)?; + } + if let Some(v) = self.deposit_end_time.as_ref() { + struct_ser.serialize_field("depositEndTime", v)?; + } + if !self.total_deposit.is_empty() { + struct_ser.serialize_field("totalDeposit", &self.total_deposit)?; + } + if let Some(v) = self.voting_start_time.as_ref() { + struct_ser.serialize_field("votingStartTime", v)?; + } + if let Some(v) = self.voting_end_time.as_ref() { + struct_ser.serialize_field("votingEndTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Proposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal_id", + "proposalId", + "content", + "status", + "final_tally_result", + "finalTallyResult", + "submit_time", + "submitTime", + "deposit_end_time", + "depositEndTime", + "total_deposit", + "totalDeposit", + "voting_start_time", + "votingStartTime", + "voting_end_time", + "votingEndTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Content, + Status, + FinalTallyResult, + SubmitTime, + DepositEndTime, + TotalDeposit, + VotingStartTime, + VotingEndTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "content" => Ok(GeneratedField::Content), + "status" => Ok(GeneratedField::Status), + "finalTallyResult" | "final_tally_result" => { + Ok(GeneratedField::FinalTallyResult) + } + "submitTime" | "submit_time" => Ok(GeneratedField::SubmitTime), + "depositEndTime" | "deposit_end_time" => { + Ok(GeneratedField::DepositEndTime) + } + "totalDeposit" | "total_deposit" => Ok(GeneratedField::TotalDeposit), + "votingStartTime" | "voting_start_time" => { + Ok(GeneratedField::VotingStartTime) + } + "votingEndTime" | "voting_end_time" => { + Ok(GeneratedField::VotingEndTime) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Proposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.Proposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut content__ = None; + let mut status__ = None; + let mut final_tally_result__ = None; + let mut submit_time__ = None; + let mut deposit_end_time__ = None; + let mut total_deposit__ = None; + let mut voting_start_time__ = None; + let mut voting_end_time__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Content => { + if content__.is_some() { + return Err(serde::de::Error::duplicate_field("content")); + } + content__ = map.next_value()?; + } + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); + } + status__ = Some(map.next_value::()? as i32); + } + GeneratedField::FinalTallyResult => { + if final_tally_result__.is_some() { + return Err(serde::de::Error::duplicate_field("finalTallyResult")); + } + final_tally_result__ = map.next_value()?; + } + GeneratedField::SubmitTime => { + if submit_time__.is_some() { + return Err(serde::de::Error::duplicate_field("submitTime")); + } + submit_time__ = map.next_value()?; + } + GeneratedField::DepositEndTime => { + if deposit_end_time__.is_some() { + return Err(serde::de::Error::duplicate_field("depositEndTime")); + } + deposit_end_time__ = map.next_value()?; + } + GeneratedField::TotalDeposit => { + if total_deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("totalDeposit")); + } + total_deposit__ = Some(map.next_value()?); + } + GeneratedField::VotingStartTime => { + if voting_start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("votingStartTime")); + } + voting_start_time__ = map.next_value()?; + } + GeneratedField::VotingEndTime => { + if voting_end_time__.is_some() { + return Err(serde::de::Error::duplicate_field("votingEndTime")); + } + voting_end_time__ = map.next_value()?; + } + } + } + Ok(Proposal { + proposal_id: proposal_id__.unwrap_or_default(), + content: content__, + status: status__.unwrap_or_default(), + final_tally_result: final_tally_result__, + submit_time: submit_time__, + deposit_end_time: deposit_end_time__, + total_deposit: total_deposit__.unwrap_or_default(), + voting_start_time: voting_start_time__, + voting_end_time: voting_end_time__, + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.Proposal", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ProposalStatus { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", + Self::DepositPeriod => "PROPOSAL_STATUS_DEPOSIT_PERIOD", + Self::VotingPeriod => "PROPOSAL_STATUS_VOTING_PERIOD", + Self::Passed => "PROPOSAL_STATUS_PASSED", + Self::Rejected => "PROPOSAL_STATUS_REJECTED", + Self::Failed => "PROPOSAL_STATUS_FAILED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ProposalStatus { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "PROPOSAL_STATUS_UNSPECIFIED", + "PROPOSAL_STATUS_DEPOSIT_PERIOD", + "PROPOSAL_STATUS_VOTING_PERIOD", + "PROPOSAL_STATUS_PASSED", + "PROPOSAL_STATUS_REJECTED", + "PROPOSAL_STATUS_FAILED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ProposalStatus; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ProposalStatus::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ProposalStatus::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Ok(ProposalStatus::Unspecified), + "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Ok(ProposalStatus::DepositPeriod), + "PROPOSAL_STATUS_VOTING_PERIOD" => Ok(ProposalStatus::VotingPeriod), + "PROPOSAL_STATUS_PASSED" => Ok(ProposalStatus::Passed), + "PROPOSAL_STATUS_REJECTED" => Ok(ProposalStatus::Rejected), + "PROPOSAL_STATUS_FAILED" => Ok(ProposalStatus::Failed), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for QueryDepositRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDepositRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "depositor"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Depositor, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "depositor" => Ok(GeneratedField::Depositor), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDepositRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut depositor__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + } + } + Ok(QueryDepositRequest { + proposal_id: proposal_id__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryDepositRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDepositResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.deposit.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositResponse", len)?; + if let Some(v) = self.deposit.as_ref() { + struct_ser.serialize_field("deposit", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDepositResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["deposit"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Deposit, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "deposit" => Ok(GeneratedField::Deposit), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDepositResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut deposit__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Deposit => { + if deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("deposit")); + } + deposit__ = map.next_value()?; + } + } + } + Ok(QueryDepositResponse { deposit: deposit__ }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryDepositResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDepositsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositsRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDepositsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDepositsRequest { + proposal_id: proposal_id__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryDepositsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDepositsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.deposits.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositsResponse", len)?; + if !self.deposits.is_empty() { + struct_ser.serialize_field("deposits", &self.deposits)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["deposits", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Deposits, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "deposits" => Ok(GeneratedField::Deposits), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDepositsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut deposits__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Deposits => { + if deposits__.is_some() { + return Err(serde::de::Error::duplicate_field("deposits")); + } + deposits__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDepositsResponse { + deposits: deposits__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryDepositsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.params_type.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryParamsRequest", len)?; + if !self.params_type.is_empty() { + struct_ser.serialize_field("paramsType", &self.params_type)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params_type", "paramsType"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ParamsType, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "paramsType" | "params_type" => Ok(GeneratedField::ParamsType), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params_type__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ParamsType => { + if params_type__.is_some() { + return Err(serde::de::Error::duplicate_field("paramsType")); + } + params_type__ = Some(map.next_value()?); + } + } + } + Ok(QueryParamsRequest { + params_type: params_type__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.voting_params.is_some() { + len += 1; + } + if self.deposit_params.is_some() { + len += 1; + } + if self.tally_params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryParamsResponse", len)?; + if let Some(v) = self.voting_params.as_ref() { + struct_ser.serialize_field("votingParams", v)?; + } + if let Some(v) = self.deposit_params.as_ref() { + struct_ser.serialize_field("depositParams", v)?; + } + if let Some(v) = self.tally_params.as_ref() { + struct_ser.serialize_field("tallyParams", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "voting_params", + "votingParams", + "deposit_params", + "depositParams", + "tally_params", + "tallyParams", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + VotingParams, + DepositParams, + TallyParams, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), + "depositParams" | "deposit_params" => Ok(GeneratedField::DepositParams), + "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut voting_params__ = None; + let mut deposit_params__ = None; + let mut tally_params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::VotingParams => { + if voting_params__.is_some() { + return Err(serde::de::Error::duplicate_field("votingParams")); + } + voting_params__ = map.next_value()?; + } + GeneratedField::DepositParams => { + if deposit_params__.is_some() { + return Err(serde::de::Error::duplicate_field("depositParams")); + } + deposit_params__ = map.next_value()?; + } + GeneratedField::TallyParams => { + if tally_params__.is_some() { + return Err(serde::de::Error::duplicate_field("tallyParams")); + } + tally_params__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { + voting_params: voting_params__, + deposit_params: deposit_params__, + tally_params: tally_params__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryProposalRequest { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryProposalRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalResponse", len)?; + if let Some(v) = self.proposal.as_ref() { + struct_ser.serialize_field("proposal", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Proposal, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposal" => Ok(GeneratedField::Proposal), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Proposal => { + if proposal__.is_some() { + return Err(serde::de::Error::duplicate_field("proposal")); + } + proposal__ = map.next_value()?; + } + } + } + Ok(QueryProposalResponse { + proposal: proposal__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryProposalResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_status != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if !self.depositor.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalsRequest", len)?; + if self.proposal_status != 0 { + let v = ProposalStatus::from_i32(self.proposal_status).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.proposal_status)) + })?; + struct_ser.serialize_field("proposalStatus", &v)?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if !self.depositor.is_empty() { + struct_ser.serialize_field("depositor", &self.depositor)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal_status", + "proposalStatus", + "voter", + "depositor", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalStatus, + Voter, + Depositor, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalStatus" | "proposal_status" => { + Ok(GeneratedField::ProposalStatus) + } + "voter" => Ok(GeneratedField::Voter), + "depositor" => Ok(GeneratedField::Depositor), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_status__ = None; + let mut voter__ = None; + let mut depositor__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalStatus => { + if proposal_status__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalStatus")); + } + proposal_status__ = Some(map.next_value::()? as i32); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Depositor => { + if depositor__.is_some() { + return Err(serde::de::Error::duplicate_field("depositor")); + } + depositor__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryProposalsRequest { + proposal_status: proposal_status__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + depositor: depositor__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryProposalsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.proposals.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalsResponse", len)?; + if !self.proposals.is_empty() { + struct_ser.serialize_field("proposals", &self.proposals)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposals", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Proposals, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposals" => Ok(GeneratedField::Proposals), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposals__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Proposals => { + if proposals__.is_some() { + return Err(serde::de::Error::duplicate_field("proposals")); + } + proposals__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryProposalsResponse { + proposals: proposals__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryProposalsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryTallyResultRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryTallyResultRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryTallyResultRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryTallyResultRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryTallyResultRequest { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryTallyResultRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryTallyResultResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.tally.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryTallyResultResponse", len)?; + if let Some(v) = self.tally.as_ref() { + struct_ser.serialize_field("tally", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["tally"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Tally, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "tally" => Ok(GeneratedField::Tally), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryTallyResultResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryTallyResultResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut tally__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Tally => { + if tally__.is_some() { + return Err(serde::de::Error::duplicate_field("tally")); + } + tally__ = map.next_value()?; + } + } + } + Ok(QueryTallyResultResponse { tally: tally__ }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryTallyResultResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVoteRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryVoteRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVoteRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVoteRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryVoteRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + } + } + Ok(QueryVoteRequest { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryVoteRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVoteResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.vote.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryVoteResponse", len)?; + if let Some(v) = self.vote.as_ref() { + struct_ser.serialize_field("vote", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVoteResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["vote"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Vote, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "vote" => Ok(GeneratedField::Vote), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVoteResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryVoteResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut vote__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Vote => { + if vote__.is_some() { + return Err(serde::de::Error::duplicate_field("vote")); + } + vote__ = map.next_value()?; + } + } + } + Ok(QueryVoteResponse { vote: vote__ }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryVoteResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVotesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryVotesRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVotesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVotesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryVotesRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryVotesRequest { + proposal_id: proposal_id__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryVotesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVotesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.votes.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.QueryVotesResponse", len)?; + if !self.votes.is_empty() { + struct_ser.serialize_field("votes", &self.votes)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVotesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["votes", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Votes, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votes" => Ok(GeneratedField::Votes), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVotesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.QueryVotesResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut votes__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Votes => { + if votes__.is_some() { + return Err(serde::de::Error::duplicate_field("votes")); + } + votes__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryVotesResponse { + votes: votes__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.QueryVotesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for TallyParams { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.quorum.is_empty() { + len += 1; + } + if !self.threshold.is_empty() { + len += 1; + } + if !self.veto_threshold.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.TallyParams", len)?; + if !self.quorum.is_empty() { + struct_ser.serialize_field( + "quorum", + pbjson::private::base64::encode(&self.quorum).as_str(), + )?; + } + if !self.threshold.is_empty() { + struct_ser.serialize_field( + "threshold", + pbjson::private::base64::encode(&self.threshold).as_str(), + )?; + } + if !self.veto_threshold.is_empty() { + struct_ser.serialize_field( + "vetoThreshold", + pbjson::private::base64::encode(&self.veto_threshold).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TallyParams { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["quorum", "threshold", "veto_threshold", "vetoThreshold"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Quorum, + Threshold, + VetoThreshold, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "quorum" => Ok(GeneratedField::Quorum), + "threshold" => Ok(GeneratedField::Threshold), + "vetoThreshold" | "veto_threshold" => Ok(GeneratedField::VetoThreshold), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TallyParams; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.TallyParams") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut quorum__ = None; + let mut threshold__ = None; + let mut veto_threshold__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Quorum => { + if quorum__.is_some() { + return Err(serde::de::Error::duplicate_field("quorum")); + } + quorum__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Threshold => { + if threshold__.is_some() { + return Err(serde::de::Error::duplicate_field("threshold")); + } + threshold__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::VetoThreshold => { + if veto_threshold__.is_some() { + return Err(serde::de::Error::duplicate_field("vetoThreshold")); + } + veto_threshold__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(TallyParams { + quorum: quorum__.unwrap_or_default(), + threshold: threshold__.unwrap_or_default(), + veto_threshold: veto_threshold__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.TallyParams", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TallyResult { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.yes.is_empty() { + len += 1; + } + if !self.abstain.is_empty() { + len += 1; + } + if !self.no.is_empty() { + len += 1; + } + if !self.no_with_veto.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.TallyResult", len)?; + if !self.yes.is_empty() { + struct_ser.serialize_field("yes", &self.yes)?; + } + if !self.abstain.is_empty() { + struct_ser.serialize_field("abstain", &self.abstain)?; + } + if !self.no.is_empty() { + struct_ser.serialize_field("no", &self.no)?; + } + if !self.no_with_veto.is_empty() { + struct_ser.serialize_field("noWithVeto", &self.no_with_veto)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TallyResult { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["yes", "abstain", "no", "no_with_veto", "noWithVeto"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Yes, + Abstain, + No, + NoWithVeto, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "yes" => Ok(GeneratedField::Yes), + "abstain" => Ok(GeneratedField::Abstain), + "no" => Ok(GeneratedField::No), + "noWithVeto" | "no_with_veto" => Ok(GeneratedField::NoWithVeto), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TallyResult; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.TallyResult") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut yes__ = None; + let mut abstain__ = None; + let mut no__ = None; + let mut no_with_veto__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Yes => { + if yes__.is_some() { + return Err(serde::de::Error::duplicate_field("yes")); + } + yes__ = Some(map.next_value()?); + } + GeneratedField::Abstain => { + if abstain__.is_some() { + return Err(serde::de::Error::duplicate_field("abstain")); + } + abstain__ = Some(map.next_value()?); + } + GeneratedField::No => { + if no__.is_some() { + return Err(serde::de::Error::duplicate_field("no")); + } + no__ = Some(map.next_value()?); + } + GeneratedField::NoWithVeto => { + if no_with_veto__.is_some() { + return Err(serde::de::Error::duplicate_field("noWithVeto")); + } + no_with_veto__ = Some(map.next_value()?); + } + } + } + Ok(TallyResult { + yes: yes__.unwrap_or_default(), + abstain: abstain__.unwrap_or_default(), + no: no__.unwrap_or_default(), + no_with_veto: no_with_veto__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.TallyResult", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TextProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.TextProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TextProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TextProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.TextProposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + } + } + Ok(TextProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.TextProposal", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Vote { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if self.option != 0 { + len += 1; + } + if !self.options.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Vote", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if self.option != 0 { + let v = VoteOption::from_i32(self.option).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.option)) + })?; + struct_ser.serialize_field("option", &v)?; + } + if !self.options.is_empty() { + struct_ser.serialize_field("options", &self.options)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Vote { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter", "option", "options"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + Option, + Options, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + "option" => Ok(GeneratedField::Option), + "options" => Ok(GeneratedField::Options), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Vote; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.Vote") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + let mut option__ = None; + let mut options__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Option => { + if option__.is_some() { + return Err(serde::de::Error::duplicate_field("option")); + } + option__ = Some(map.next_value::()? as i32); + } + GeneratedField::Options => { + if options__.is_some() { + return Err(serde::de::Error::duplicate_field("options")); + } + options__ = Some(map.next_value()?); + } + } + } + Ok(Vote { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + option: option__.unwrap_or_default(), + options: options__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.Vote", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for VoteOption { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "VOTE_OPTION_UNSPECIFIED", + Self::Yes => "VOTE_OPTION_YES", + Self::Abstain => "VOTE_OPTION_ABSTAIN", + Self::No => "VOTE_OPTION_NO", + Self::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for VoteOption { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "VOTE_OPTION_UNSPECIFIED", + "VOTE_OPTION_YES", + "VOTE_OPTION_ABSTAIN", + "VOTE_OPTION_NO", + "VOTE_OPTION_NO_WITH_VETO", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VoteOption; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(VoteOption::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(VoteOption::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "VOTE_OPTION_UNSPECIFIED" => Ok(VoteOption::Unspecified), + "VOTE_OPTION_YES" => Ok(VoteOption::Yes), + "VOTE_OPTION_ABSTAIN" => Ok(VoteOption::Abstain), + "VOTE_OPTION_NO" => Ok(VoteOption::No), + "VOTE_OPTION_NO_WITH_VETO" => Ok(VoteOption::NoWithVeto), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for VotingParams { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.voting_period.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.VotingParams", len)?; + if let Some(v) = self.voting_period.as_ref() { + struct_ser.serialize_field("votingPeriod", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for VotingParams { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["voting_period", "votingPeriod"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + VotingPeriod, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votingPeriod" | "voting_period" => Ok(GeneratedField::VotingPeriod), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VotingParams; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.VotingParams") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut voting_period__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::VotingPeriod => { + if voting_period__.is_some() { + return Err(serde::de::Error::duplicate_field("votingPeriod")); + } + voting_period__ = map.next_value()?; + } + } + } + Ok(VotingParams { + voting_period: voting_period__, + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1beta1.VotingParams", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for WeightedVoteOption { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.option != 0 { + len += 1; + } + if !self.weight.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.gov.v1beta1.WeightedVoteOption", len)?; + if self.option != 0 { + let v = VoteOption::from_i32(self.option).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.option)) + })?; + struct_ser.serialize_field("option", &v)?; + } + if !self.weight.is_empty() { + struct_ser.serialize_field("weight", &self.weight)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for WeightedVoteOption { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["option", "weight"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Option, + Weight, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "option" => Ok(GeneratedField::Option), + "weight" => Ok(GeneratedField::Weight), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = WeightedVoteOption; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.gov.v1beta1.WeightedVoteOption") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut option__ = None; + let mut weight__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Option => { + if option__.is_some() { + return Err(serde::de::Error::duplicate_field("option")); + } + option__ = Some(map.next_value::()? as i32); + } + GeneratedField::Weight => { + if weight__.is_some() { + return Err(serde::de::Error::duplicate_field("weight")); + } + weight__ = Some(map.next_value()?); + } + } + } + Ok(WeightedVoteOption { + option: option__.unwrap_or_default(), + weight: weight__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.gov.v1beta1.WeightedVoteOption", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs index 4184a346..a5e0e9e4 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs @@ -1008,5 +1008,6 @@ impl Exec { } } } +include!("cosmos.group.v1.serde.rs"); include!("cosmos.group.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs new file mode 100644 index 00000000..2d66d91e --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs @@ -0,0 +1,9777 @@ +// @generated +impl serde::Serialize for DecisionPolicyWindows { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.voting_period.is_some() { + len += 1; + } + if self.min_execution_period.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.DecisionPolicyWindows", len)?; + if let Some(v) = self.voting_period.as_ref() { + struct_ser.serialize_field("votingPeriod", v)?; + } + if let Some(v) = self.min_execution_period.as_ref() { + struct_ser.serialize_field("minExecutionPeriod", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "voting_period", + "votingPeriod", + "min_execution_period", + "minExecutionPeriod", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + VotingPeriod, + MinExecutionPeriod, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votingPeriod" | "voting_period" => Ok(GeneratedField::VotingPeriod), + "minExecutionPeriod" | "min_execution_period" => { + Ok(GeneratedField::MinExecutionPeriod) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DecisionPolicyWindows; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.DecisionPolicyWindows") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut voting_period__ = None; + let mut min_execution_period__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::VotingPeriod => { + if voting_period__.is_some() { + return Err(serde::de::Error::duplicate_field("votingPeriod")); + } + voting_period__ = map.next_value()?; + } + GeneratedField::MinExecutionPeriod => { + if min_execution_period__.is_some() { + return Err(serde::de::Error::duplicate_field( + "minExecutionPeriod", + )); + } + min_execution_period__ = map.next_value()?; + } + } + } + Ok(DecisionPolicyWindows { + voting_period: voting_period__, + min_execution_period: min_execution_period__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.DecisionPolicyWindows", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for EventCreateGroup { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.EventCreateGroup", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventCreateGroup { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_id", "groupId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventCreateGroup; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventCreateGroup") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(EventCreateGroup { + group_id: group_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.EventCreateGroup", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for EventCreateGroupPolicy { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.EventCreateGroupPolicy", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventCreateGroupPolicy { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventCreateGroupPolicy; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventCreateGroupPolicy") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(EventCreateGroupPolicy { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.EventCreateGroupPolicy", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for EventExec { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if self.result != 0 { + len += 1; + } + if !self.logs.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventExec", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if self.result != 0 { + let v = ProposalExecutorResult::from_i32(self.result).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.result)) + })?; + struct_ser.serialize_field("result", &v)?; + } + if !self.logs.is_empty() { + struct_ser.serialize_field("logs", &self.logs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventExec { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "result", "logs"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Result, + Logs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "result" => Ok(GeneratedField::Result), + "logs" => Ok(GeneratedField::Logs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventExec; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventExec") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut result__ = None; + let mut logs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = 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); + } + GeneratedField::Logs => { + if logs__.is_some() { + return Err(serde::de::Error::duplicate_field("logs")); + } + logs__ = Some(map.next_value()?); + } + } + } + Ok(EventExec { + proposal_id: proposal_id__.unwrap_or_default(), + result: result__.unwrap_or_default(), + logs: logs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.EventExec", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for EventLeaveGroup { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventLeaveGroup", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventLeaveGroup { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_id", "groupId", "address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventLeaveGroup; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventLeaveGroup") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(EventLeaveGroup { + group_id: group_id__.unwrap_or_default(), + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.EventLeaveGroup", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for EventProposalPruned { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if self.status != 0 { + len += 1; + } + if self.tally_result.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.EventProposalPruned", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if self.status != 0 { + let v = ProposalStatus::from_i32(self.status).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.status)) + })?; + struct_ser.serialize_field("status", &v)?; + } + if let Some(v) = self.tally_result.as_ref() { + struct_ser.serialize_field("tallyResult", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventProposalPruned { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal_id", + "proposalId", + "status", + "tally_result", + "tallyResult", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Status, + TallyResult, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "status" => Ok(GeneratedField::Status), + "tallyResult" | "tally_result" => Ok(GeneratedField::TallyResult), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventProposalPruned; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventProposalPruned") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut status__ = None; + let mut tally_result__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); + } + status__ = Some(map.next_value::()? as i32); + } + GeneratedField::TallyResult => { + if tally_result__.is_some() { + return Err(serde::de::Error::duplicate_field("tallyResult")); + } + tally_result__ = map.next_value()?; + } + } + } + Ok(EventProposalPruned { + proposal_id: proposal_id__.unwrap_or_default(), + status: status__.unwrap_or_default(), + tally_result: tally_result__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.EventProposalPruned", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for EventSubmitProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.EventSubmitProposal", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventSubmitProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventSubmitProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventSubmitProposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(EventSubmitProposal { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.EventSubmitProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for EventUpdateGroup { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.EventUpdateGroup", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventUpdateGroup { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_id", "groupId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventUpdateGroup; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventUpdateGroup") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(EventUpdateGroup { + group_id: group_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.EventUpdateGroup", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for EventUpdateGroupPolicy { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.EventUpdateGroupPolicy", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventUpdateGroupPolicy { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventUpdateGroupPolicy; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventUpdateGroupPolicy") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(EventUpdateGroupPolicy { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.EventUpdateGroupPolicy", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for EventVote { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventVote", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventVote { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventVote; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventVote") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(EventVote { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.EventVote", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for EventWithdrawProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.EventWithdrawProposal", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventWithdrawProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventWithdrawProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.EventWithdrawProposal") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(EventWithdrawProposal { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.EventWithdrawProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Exec { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "EXEC_UNSPECIFIED", + Self::Try => "EXEC_TRY", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for Exec { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["EXEC_UNSPECIFIED", "EXEC_TRY"]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Exec; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(Exec::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(Exec::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "EXEC_UNSPECIFIED" => Ok(Exec::Unspecified), + "EXEC_TRY" => Ok(Exec::Try), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_seq != 0 { + len += 1; + } + if !self.groups.is_empty() { + len += 1; + } + if !self.group_members.is_empty() { + len += 1; + } + if self.group_policy_seq != 0 { + len += 1; + } + if !self.group_policies.is_empty() { + len += 1; + } + if self.proposal_seq != 0 { + len += 1; + } + if !self.proposals.is_empty() { + len += 1; + } + if !self.votes.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.GenesisState", len)?; + if self.group_seq != 0 { + struct_ser + .serialize_field("groupSeq", ToString::to_string(&self.group_seq).as_str())?; + } + if !self.groups.is_empty() { + struct_ser.serialize_field("groups", &self.groups)?; + } + if !self.group_members.is_empty() { + struct_ser.serialize_field("groupMembers", &self.group_members)?; + } + if self.group_policy_seq != 0 { + struct_ser.serialize_field( + "groupPolicySeq", + ToString::to_string(&self.group_policy_seq).as_str(), + )?; + } + if !self.group_policies.is_empty() { + struct_ser.serialize_field("groupPolicies", &self.group_policies)?; + } + if self.proposal_seq != 0 { + struct_ser.serialize_field( + "proposalSeq", + ToString::to_string(&self.proposal_seq).as_str(), + )?; + } + if !self.proposals.is_empty() { + struct_ser.serialize_field("proposals", &self.proposals)?; + } + if !self.votes.is_empty() { + struct_ser.serialize_field("votes", &self.votes)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "group_seq", + "groupSeq", + "groups", + "group_members", + "groupMembers", + "group_policy_seq", + "groupPolicySeq", + "group_policies", + "groupPolicies", + "proposal_seq", + "proposalSeq", + "proposals", + "votes", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupSeq, + Groups, + GroupMembers, + GroupPolicySeq, + GroupPolicies, + ProposalSeq, + Proposals, + Votes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupSeq" | "group_seq" => Ok(GeneratedField::GroupSeq), + "groups" => Ok(GeneratedField::Groups), + "groupMembers" | "group_members" => Ok(GeneratedField::GroupMembers), + "groupPolicySeq" | "group_policy_seq" => { + Ok(GeneratedField::GroupPolicySeq) + } + "groupPolicies" | "group_policies" => Ok(GeneratedField::GroupPolicies), + "proposalSeq" | "proposal_seq" => Ok(GeneratedField::ProposalSeq), + "proposals" => Ok(GeneratedField::Proposals), + "votes" => Ok(GeneratedField::Votes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_seq__ = None; + let mut groups__ = None; + let mut group_members__ = None; + let mut group_policy_seq__ = None; + let mut group_policies__ = None; + let mut proposal_seq__ = None; + let mut proposals__ = None; + let mut votes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupSeq => { + if group_seq__.is_some() { + return Err(serde::de::Error::duplicate_field("groupSeq")); + } + group_seq__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Groups => { + if groups__.is_some() { + return Err(serde::de::Error::duplicate_field("groups")); + } + groups__ = Some(map.next_value()?); + } + GeneratedField::GroupMembers => { + if group_members__.is_some() { + return Err(serde::de::Error::duplicate_field("groupMembers")); + } + group_members__ = Some(map.next_value()?); + } + GeneratedField::GroupPolicySeq => { + if group_policy_seq__.is_some() { + return Err(serde::de::Error::duplicate_field("groupPolicySeq")); + } + group_policy_seq__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::GroupPolicies => { + if group_policies__.is_some() { + return Err(serde::de::Error::duplicate_field("groupPolicies")); + } + group_policies__ = Some(map.next_value()?); + } + GeneratedField::ProposalSeq => { + if proposal_seq__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalSeq")); + } + proposal_seq__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Proposals => { + if proposals__.is_some() { + return Err(serde::de::Error::duplicate_field("proposals")); + } + proposals__ = Some(map.next_value()?); + } + GeneratedField::Votes => { + if votes__.is_some() { + return Err(serde::de::Error::duplicate_field("votes")); + } + votes__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + group_seq: group_seq__.unwrap_or_default(), + groups: groups__.unwrap_or_default(), + group_members: group_members__.unwrap_or_default(), + group_policy_seq: group_policy_seq__.unwrap_or_default(), + group_policies: group_policies__.unwrap_or_default(), + proposal_seq: proposal_seq__.unwrap_or_default(), + proposals: proposals__.unwrap_or_default(), + votes: votes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.GenesisState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GroupInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.id != 0 { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if self.version != 0 { + len += 1; + } + if !self.total_weight.is_empty() { + len += 1; + } + if self.created_at.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.GroupInfo", len)?; + if self.id != 0 { + struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if self.version != 0 { + struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; + } + if !self.total_weight.is_empty() { + struct_ser.serialize_field("totalWeight", &self.total_weight)?; + } + if let Some(v) = self.created_at.as_ref() { + struct_ser.serialize_field("createdAt", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GroupInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "admin", + "metadata", + "version", + "total_weight", + "totalWeight", + "created_at", + "createdAt", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + Admin, + Metadata, + Version, + TotalWeight, + CreatedAt, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + "admin" => Ok(GeneratedField::Admin), + "metadata" => Ok(GeneratedField::Metadata), + "version" => Ok(GeneratedField::Version), + "totalWeight" | "total_weight" => Ok(GeneratedField::TotalWeight), + "createdAt" | "created_at" => Ok(GeneratedField::CreatedAt), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GroupInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.GroupInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + let mut admin__ = None; + let mut metadata__ = None; + let mut version__ = None; + let mut total_weight__ = None; + let mut created_at__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::TotalWeight => { + if total_weight__.is_some() { + return Err(serde::de::Error::duplicate_field("totalWeight")); + } + total_weight__ = Some(map.next_value()?); + } + GeneratedField::CreatedAt => { + if created_at__.is_some() { + return Err(serde::de::Error::duplicate_field("createdAt")); + } + created_at__ = map.next_value()?; + } + } + } + Ok(GroupInfo { + id: id__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + version: version__.unwrap_or_default(), + total_weight: total_weight__.unwrap_or_default(), + created_at: created_at__, + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.GroupInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GroupMember { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + if self.member.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.GroupMember", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if let Some(v) = self.member.as_ref() { + struct_ser.serialize_field("member", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GroupMember { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_id", "groupId", "member"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + Member, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "member" => Ok(GeneratedField::Member), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GroupMember; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.GroupMember") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + let mut member__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Member => { + if member__.is_some() { + return Err(serde::de::Error::duplicate_field("member")); + } + member__ = map.next_value()?; + } + } + } + Ok(GroupMember { + group_id: group_id__.unwrap_or_default(), + member: member__, + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.GroupMember", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GroupPolicyInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.group_id != 0 { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if self.version != 0 { + len += 1; + } + if self.decision_policy.is_some() { + len += 1; + } + if self.created_at.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.GroupPolicyInfo", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if self.version != 0 { + struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; + } + if let Some(v) = self.decision_policy.as_ref() { + struct_ser.serialize_field("decisionPolicy", v)?; + } + if let Some(v) = self.created_at.as_ref() { + struct_ser.serialize_field("createdAt", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + "group_id", + "groupId", + "admin", + "metadata", + "version", + "decision_policy", + "decisionPolicy", + "created_at", + "createdAt", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + GroupId, + Admin, + Metadata, + Version, + DecisionPolicy, + CreatedAt, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "admin" => Ok(GeneratedField::Admin), + "metadata" => Ok(GeneratedField::Metadata), + "version" => Ok(GeneratedField::Version), + "decisionPolicy" | "decision_policy" => { + Ok(GeneratedField::DecisionPolicy) + } + "createdAt" | "created_at" => Ok(GeneratedField::CreatedAt), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GroupPolicyInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.GroupPolicyInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut group_id__ = None; + let mut admin__ = None; + let mut metadata__ = None; + let mut version__ = None; + let mut decision_policy__ = None; + let mut created_at__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::DecisionPolicy => { + if decision_policy__.is_some() { + return Err(serde::de::Error::duplicate_field("decisionPolicy")); + } + decision_policy__ = map.next_value()?; + } + GeneratedField::CreatedAt => { + if created_at__.is_some() { + return Err(serde::de::Error::duplicate_field("createdAt")); + } + created_at__ = map.next_value()?; + } + } + } + Ok(GroupPolicyInfo { + address: address__.unwrap_or_default(), + group_id: group_id__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + version: version__.unwrap_or_default(), + decision_policy: decision_policy__, + created_at: created_at__, + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.GroupPolicyInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Member { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.weight.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if self.added_at.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.Member", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.weight.is_empty() { + struct_ser.serialize_field("weight", &self.weight)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if let Some(v) = self.added_at.as_ref() { + struct_ser.serialize_field("addedAt", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Member { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "weight", "metadata", "added_at", "addedAt"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Weight, + Metadata, + AddedAt, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "weight" => Ok(GeneratedField::Weight), + "metadata" => Ok(GeneratedField::Metadata), + "addedAt" | "added_at" => Ok(GeneratedField::AddedAt), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Member; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.Member") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut weight__ = None; + let mut metadata__ = None; + let mut added_at__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Weight => { + if weight__.is_some() { + return Err(serde::de::Error::duplicate_field("weight")); + } + weight__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + GeneratedField::AddedAt => { + if added_at__.is_some() { + return Err(serde::de::Error::duplicate_field("addedAt")); + } + added_at__ = map.next_value()?; + } + } + } + Ok(Member { + address: address__.unwrap_or_default(), + weight: weight__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + added_at: added_at__, + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.Member", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MemberRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.weight.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MemberRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.weight.is_empty() { + struct_ser.serialize_field("weight", &self.weight)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MemberRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "weight", "metadata"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Weight, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "weight" => Ok(GeneratedField::Weight), + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MemberRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MemberRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut weight__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Weight => { + if weight__.is_some() { + return Err(serde::de::Error::duplicate_field("weight")); + } + weight__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(MemberRequest { + address: address__.unwrap_or_default(), + weight: weight__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.MemberRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgCreateGroup { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if !self.members.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgCreateGroup", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.members.is_empty() { + struct_ser.serialize_field("members", &self.members)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateGroup { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["admin", "members", "metadata"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + Members, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "members" => Ok(GeneratedField::Members), + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreateGroup; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgCreateGroup") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut members__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::Members => { + if members__.is_some() { + return Err(serde::de::Error::duplicate_field("members")); + } + members__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(MsgCreateGroup { + admin: admin__.unwrap_or_default(), + members: members__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.MsgCreateGroup", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgCreateGroupPolicy { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if self.group_id != 0 { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if self.decision_policy.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgCreateGroupPolicy", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if let Some(v) = self.decision_policy.as_ref() { + struct_ser.serialize_field("decisionPolicy", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "admin", + "group_id", + "groupId", + "metadata", + "decision_policy", + "decisionPolicy", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + GroupId, + Metadata, + DecisionPolicy, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "metadata" => Ok(GeneratedField::Metadata), + "decisionPolicy" | "decision_policy" => { + Ok(GeneratedField::DecisionPolicy) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreateGroupPolicy; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgCreateGroupPolicy") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut group_id__ = None; + let mut metadata__ = None; + let mut decision_policy__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + GeneratedField::DecisionPolicy => { + if decision_policy__.is_some() { + return Err(serde::de::Error::duplicate_field("decisionPolicy")); + } + decision_policy__ = map.next_value()?; + } + } + } + Ok(MsgCreateGroupPolicy { + admin: admin__.unwrap_or_default(), + group_id: group_id__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + decision_policy: decision_policy__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgCreateGroupPolicy", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreateGroupPolicyResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgCreateGroupPolicyResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicyResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreateGroupPolicyResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgCreateGroupPolicyResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(MsgCreateGroupPolicyResponse { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgCreateGroupPolicyResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreateGroupResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgCreateGroupResponse", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateGroupResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_id", "groupId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreateGroupResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgCreateGroupResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgCreateGroupResponse { + group_id: group_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgCreateGroupResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreateGroupWithPolicy { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if !self.members.is_empty() { + len += 1; + } + if !self.group_metadata.is_empty() { + len += 1; + } + if !self.group_policy_metadata.is_empty() { + len += 1; + } + if self.group_policy_as_admin { + len += 1; + } + if self.decision_policy.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgCreateGroupWithPolicy", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.members.is_empty() { + struct_ser.serialize_field("members", &self.members)?; + } + if !self.group_metadata.is_empty() { + struct_ser.serialize_field("groupMetadata", &self.group_metadata)?; + } + if !self.group_policy_metadata.is_empty() { + struct_ser.serialize_field("groupPolicyMetadata", &self.group_policy_metadata)?; + } + if self.group_policy_as_admin { + struct_ser.serialize_field("groupPolicyAsAdmin", &self.group_policy_as_admin)?; + } + if let Some(v) = self.decision_policy.as_ref() { + struct_ser.serialize_field("decisionPolicy", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "admin", + "members", + "group_metadata", + "groupMetadata", + "group_policy_metadata", + "groupPolicyMetadata", + "group_policy_as_admin", + "groupPolicyAsAdmin", + "decision_policy", + "decisionPolicy", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + Members, + GroupMetadata, + GroupPolicyMetadata, + GroupPolicyAsAdmin, + DecisionPolicy, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "members" => Ok(GeneratedField::Members), + "groupMetadata" | "group_metadata" => Ok(GeneratedField::GroupMetadata), + "groupPolicyMetadata" | "group_policy_metadata" => { + Ok(GeneratedField::GroupPolicyMetadata) + } + "groupPolicyAsAdmin" | "group_policy_as_admin" => { + Ok(GeneratedField::GroupPolicyAsAdmin) + } + "decisionPolicy" | "decision_policy" => { + Ok(GeneratedField::DecisionPolicy) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreateGroupWithPolicy; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgCreateGroupWithPolicy") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut members__ = None; + let mut group_metadata__ = None; + let mut group_policy_metadata__ = None; + let mut group_policy_as_admin__ = None; + let mut decision_policy__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::Members => { + if members__.is_some() { + return Err(serde::de::Error::duplicate_field("members")); + } + members__ = Some(map.next_value()?); + } + GeneratedField::GroupMetadata => { + if group_metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("groupMetadata")); + } + group_metadata__ = Some(map.next_value()?); + } + GeneratedField::GroupPolicyMetadata => { + if group_policy_metadata__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyMetadata", + )); + } + group_policy_metadata__ = Some(map.next_value()?); + } + GeneratedField::GroupPolicyAsAdmin => { + if group_policy_as_admin__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyAsAdmin", + )); + } + group_policy_as_admin__ = Some(map.next_value()?); + } + GeneratedField::DecisionPolicy => { + if decision_policy__.is_some() { + return Err(serde::de::Error::duplicate_field("decisionPolicy")); + } + decision_policy__ = map.next_value()?; + } + } + } + Ok(MsgCreateGroupWithPolicy { + admin: admin__.unwrap_or_default(), + members: members__.unwrap_or_default(), + group_metadata: group_metadata__.unwrap_or_default(), + group_policy_metadata: group_policy_metadata__.unwrap_or_default(), + group_policy_as_admin: group_policy_as_admin__.unwrap_or_default(), + decision_policy: decision_policy__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgCreateGroupWithPolicy", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreateGroupWithPolicyResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + if !self.group_policy_address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgCreateGroupWithPolicyResponse", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if !self.group_policy_address.is_empty() { + struct_ser.serialize_field("groupPolicyAddress", &self.group_policy_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "group_id", + "groupId", + "group_policy_address", + "groupPolicyAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + GroupPolicyAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "groupPolicyAddress" | "group_policy_address" => { + Ok(GeneratedField::GroupPolicyAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreateGroupWithPolicyResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgCreateGroupWithPolicyResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + let mut group_policy_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::GroupPolicyAddress => { + if group_policy_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyAddress", + )); + } + group_policy_address__ = Some(map.next_value()?); + } + } + } + Ok(MsgCreateGroupWithPolicyResponse { + group_id: group_id__.unwrap_or_default(), + group_policy_address: group_policy_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgCreateGroupWithPolicyResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgExec { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.executor.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgExec", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.executor.is_empty() { + struct_ser.serialize_field("executor", &self.executor)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgExec { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "executor"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Executor, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "executor" => Ok(GeneratedField::Executor), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgExec; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgExec") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut executor__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Executor => { + if executor__.is_some() { + return Err(serde::de::Error::duplicate_field("executor")); + } + executor__ = Some(map.next_value()?); + } + } + } + Ok(MsgExec { + proposal_id: proposal_id__.unwrap_or_default(), + executor: executor__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.MsgExec", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgExecResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.result != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgExecResponse", len)?; + if self.result != 0 { + let v = ProposalExecutorResult::from_i32(self.result).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.result)) + })?; + struct_ser.serialize_field("result", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgExecResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgExecResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgExecResponse") + } + + fn visit_map(self, mut map: V) -> std::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(MsgExecResponse { + result: result__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.MsgExecResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgLeaveGroup { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.group_id != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgLeaveGroup", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgLeaveGroup { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "group_id", "groupId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + GroupId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgLeaveGroup; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgLeaveGroup") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut group_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgLeaveGroup { + address: address__.unwrap_or_default(), + group_id: group_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.MsgLeaveGroup", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgLeaveGroupResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgLeaveGroupResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgLeaveGroupResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgLeaveGroupResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgLeaveGroupResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgLeaveGroupResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgLeaveGroupResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSubmitProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.group_policy_address.is_empty() { + len += 1; + } + if !self.proposers.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if !self.messages.is_empty() { + len += 1; + } + if self.exec != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgSubmitProposal", len)?; + if !self.group_policy_address.is_empty() { + struct_ser.serialize_field("groupPolicyAddress", &self.group_policy_address)?; + } + if !self.proposers.is_empty() { + struct_ser.serialize_field("proposers", &self.proposers)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if !self.messages.is_empty() { + struct_ser.serialize_field("messages", &self.messages)?; + } + if self.exec != 0 { + let v = Exec::from_i32(self.exec).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.exec)) + })?; + struct_ser.serialize_field("exec", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "group_policy_address", + "groupPolicyAddress", + "proposers", + "metadata", + "messages", + "exec", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupPolicyAddress, + Proposers, + Metadata, + Messages, + Exec, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupPolicyAddress" | "group_policy_address" => { + Ok(GeneratedField::GroupPolicyAddress) + } + "proposers" => Ok(GeneratedField::Proposers), + "metadata" => Ok(GeneratedField::Metadata), + "messages" => Ok(GeneratedField::Messages), + "exec" => Ok(GeneratedField::Exec), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSubmitProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgSubmitProposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_policy_address__ = None; + let mut proposers__ = None; + let mut metadata__ = None; + let mut messages__ = None; + let mut exec__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupPolicyAddress => { + if group_policy_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyAddress", + )); + } + group_policy_address__ = Some(map.next_value()?); + } + GeneratedField::Proposers => { + if proposers__.is_some() { + return Err(serde::de::Error::duplicate_field("proposers")); + } + proposers__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + GeneratedField::Messages => { + if messages__.is_some() { + return Err(serde::de::Error::duplicate_field("messages")); + } + messages__ = Some(map.next_value()?); + } + GeneratedField::Exec => { + if exec__.is_some() { + return Err(serde::de::Error::duplicate_field("exec")); + } + exec__ = Some(map.next_value::()? as i32); + } + } + } + Ok(MsgSubmitProposal { + group_policy_address: group_policy_address__.unwrap_or_default(), + proposers: proposers__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + messages: messages__.unwrap_or_default(), + exec: exec__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgSubmitProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSubmitProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgSubmitProposalResponse", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSubmitProposalResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgSubmitProposalResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgSubmitProposalResponse { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgSubmitProposalResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupAdmin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if self.group_id != 0 { + len += 1; + } + if !self.new_admin.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgUpdateGroupAdmin", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if !self.new_admin.is_empty() { + struct_ser.serialize_field("newAdmin", &self.new_admin)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["admin", "group_id", "groupId", "new_admin", "newAdmin"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + GroupId, + NewAdmin, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "newAdmin" | "new_admin" => Ok(GeneratedField::NewAdmin), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUpdateGroupAdmin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupAdmin") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut group_id__ = None; + let mut new_admin__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::NewAdmin => { + if new_admin__.is_some() { + return Err(serde::de::Error::duplicate_field("newAdmin")); + } + new_admin__ = Some(map.next_value()?); + } + } + } + Ok(MsgUpdateGroupAdmin { + admin: admin__.unwrap_or_default(), + group_id: group_id__.unwrap_or_default(), + new_admin: new_admin__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupAdmin", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupAdminResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgUpdateGroupAdminResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdminResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUpdateGroupAdminResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupAdminResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgUpdateGroupAdminResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupAdminResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupMembers { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if self.group_id != 0 { + len += 1; + } + if !self.member_updates.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgUpdateGroupMembers", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if !self.member_updates.is_empty() { + struct_ser.serialize_field("memberUpdates", &self.member_updates)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "admin", + "group_id", + "groupId", + "member_updates", + "memberUpdates", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + GroupId, + MemberUpdates, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "memberUpdates" | "member_updates" => Ok(GeneratedField::MemberUpdates), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUpdateGroupMembers; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupMembers") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut group_id__ = None; + let mut member_updates__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::MemberUpdates => { + if member_updates__.is_some() { + return Err(serde::de::Error::duplicate_field("memberUpdates")); + } + member_updates__ = Some(map.next_value()?); + } + } + } + Ok(MsgUpdateGroupMembers { + admin: admin__.unwrap_or_default(), + group_id: group_id__.unwrap_or_default(), + member_updates: member_updates__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupMembers", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupMembersResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgUpdateGroupMembersResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembersResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUpdateGroupMembersResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupMembersResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgUpdateGroupMembersResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupMembersResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupMetadata { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if self.group_id != 0 { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgUpdateGroupMetadata", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["admin", "group_id", "groupId", "metadata"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + GroupId, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUpdateGroupMetadata; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupMetadata") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut group_id__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(MsgUpdateGroupMetadata { + admin: admin__.unwrap_or_default(), + group_id: group_id__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupMetadata", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupMetadataResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgUpdateGroupMetadataResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadataResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUpdateGroupMetadataResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupMetadataResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgUpdateGroupMetadataResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupMetadataResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupPolicyAdmin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if !self.group_policy_address.is_empty() { + len += 1; + } + if !self.new_admin.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgUpdateGroupPolicyAdmin", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.group_policy_address.is_empty() { + struct_ser.serialize_field("groupPolicyAddress", &self.group_policy_address)?; + } + if !self.new_admin.is_empty() { + struct_ser.serialize_field("newAdmin", &self.new_admin)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "admin", + "group_policy_address", + "groupPolicyAddress", + "new_admin", + "newAdmin", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + GroupPolicyAddress, + NewAdmin, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "groupPolicyAddress" | "group_policy_address" => { + Ok(GeneratedField::GroupPolicyAddress) + } + "newAdmin" | "new_admin" => Ok(GeneratedField::NewAdmin), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUpdateGroupPolicyAdmin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupPolicyAdmin") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut group_policy_address__ = None; + let mut new_admin__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::GroupPolicyAddress => { + if group_policy_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyAddress", + )); + } + group_policy_address__ = Some(map.next_value()?); + } + GeneratedField::NewAdmin => { + if new_admin__.is_some() { + return Err(serde::de::Error::duplicate_field("newAdmin")); + } + new_admin__ = Some(map.next_value()?); + } + } + } + Ok(MsgUpdateGroupPolicyAdmin { + admin: admin__.unwrap_or_default(), + group_policy_address: group_policy_address__.unwrap_or_default(), + new_admin: new_admin__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupPolicyAdmin", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupPolicyAdminResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdminResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUpdateGroupPolicyAdminResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgUpdateGroupPolicyAdminResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicy { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if !self.group_policy_address.is_empty() { + len += 1; + } + if self.decision_policy.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.group_policy_address.is_empty() { + struct_ser.serialize_field("groupPolicyAddress", &self.group_policy_address)?; + } + if let Some(v) = self.decision_policy.as_ref() { + struct_ser.serialize_field("decisionPolicy", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "admin", + "group_policy_address", + "groupPolicyAddress", + "decision_policy", + "decisionPolicy", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + GroupPolicyAddress, + DecisionPolicy, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "groupPolicyAddress" | "group_policy_address" => { + Ok(GeneratedField::GroupPolicyAddress) + } + "decisionPolicy" | "decision_policy" => { + Ok(GeneratedField::DecisionPolicy) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUpdateGroupPolicyDecisionPolicy; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut group_policy_address__ = None; + let mut decision_policy__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::GroupPolicyAddress => { + if group_policy_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyAddress", + )); + } + group_policy_address__ = Some(map.next_value()?); + } + GeneratedField::DecisionPolicy => { + if decision_policy__.is_some() { + return Err(serde::de::Error::duplicate_field("decisionPolicy")); + } + decision_policy__ = map.next_value()?; + } + } + } + Ok(MsgUpdateGroupPolicyDecisionPolicy { + admin: admin__.unwrap_or_default(), + group_policy_address: group_policy_address__.unwrap_or_default(), + decision_policy: decision_policy__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicyResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicyResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUpdateGroupPolicyDecisionPolicyResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgUpdateGroupPolicyDecisionPolicyResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupPolicyMetadata { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if !self.group_policy_address.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgUpdateGroupPolicyMetadata", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.group_policy_address.is_empty() { + struct_ser.serialize_field("groupPolicyAddress", &self.group_policy_address)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "admin", + "group_policy_address", + "groupPolicyAddress", + "metadata", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + GroupPolicyAddress, + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "groupPolicyAddress" | "group_policy_address" => { + Ok(GeneratedField::GroupPolicyAddress) + } + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUpdateGroupPolicyMetadata; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupPolicyMetadata") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut group_policy_address__ = None; + let mut metadata__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::GroupPolicyAddress => { + if group_policy_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyAddress", + )); + } + group_policy_address__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + } + } + Ok(MsgUpdateGroupPolicyMetadata { + admin: admin__.unwrap_or_default(), + group_policy_address: group_policy_address__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupPolicyMetadata", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateGroupPolicyMetadataResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadataResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUpdateGroupPolicyMetadataResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgUpdateGroupPolicyMetadataResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgVote { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if self.option != 0 { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if self.exec != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgVote", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if self.option != 0 { + let v = VoteOption::from_i32(self.option).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.option)) + })?; + struct_ser.serialize_field("option", &v)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if self.exec != 0 { + let v = Exec::from_i32(self.exec).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.exec)) + })?; + struct_ser.serialize_field("exec", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVote { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal_id", + "proposalId", + "voter", + "option", + "metadata", + "exec", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + Option, + Metadata, + Exec, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + "option" => Ok(GeneratedField::Option), + "metadata" => Ok(GeneratedField::Metadata), + "exec" => Ok(GeneratedField::Exec), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgVote; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgVote") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + let mut option__ = None; + let mut metadata__ = None; + let mut exec__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Option => { + if option__.is_some() { + return Err(serde::de::Error::duplicate_field("option")); + } + option__ = Some(map.next_value::()? as i32); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + GeneratedField::Exec => { + if exec__.is_some() { + return Err(serde::de::Error::duplicate_field("exec")); + } + exec__ = Some(map.next_value::()? as i32); + } + } + } + Ok(MsgVote { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + option: option__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + exec: exec__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.MsgVote", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgVoteResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgVoteResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgVoteResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgVoteResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgVoteResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgVoteResponse {}) + } + } + deserializer.deserialize_struct("cosmos.group.v1.MsgVoteResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgWithdrawProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgWithdrawProposal", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgWithdrawProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgWithdrawProposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(MsgWithdrawProposal { + proposal_id: proposal_id__.unwrap_or_default(), + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgWithdrawProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgWithdrawProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.group.v1.MsgWithdrawProposalResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgWithdrawProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgWithdrawProposalResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.MsgWithdrawProposalResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgWithdrawProposalResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.MsgWithdrawProposalResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for PercentageDecisionPolicy { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.percentage.is_empty() { + len += 1; + } + if self.windows.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.PercentageDecisionPolicy", len)?; + if !self.percentage.is_empty() { + struct_ser.serialize_field("percentage", &self.percentage)?; + } + if let Some(v) = self.windows.as_ref() { + struct_ser.serialize_field("windows", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PercentageDecisionPolicy { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["percentage", "windows"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Percentage, + Windows, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "percentage" => Ok(GeneratedField::Percentage), + "windows" => Ok(GeneratedField::Windows), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PercentageDecisionPolicy; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.PercentageDecisionPolicy") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut percentage__ = None; + let mut windows__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Percentage => { + if percentage__.is_some() { + return Err(serde::de::Error::duplicate_field("percentage")); + } + percentage__ = Some(map.next_value()?); + } + GeneratedField::Windows => { + if windows__.is_some() { + return Err(serde::de::Error::duplicate_field("windows")); + } + windows__ = map.next_value()?; + } + } + } + Ok(PercentageDecisionPolicy { + percentage: percentage__.unwrap_or_default(), + windows: windows__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.PercentageDecisionPolicy", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Proposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.id != 0 { + len += 1; + } + if !self.group_policy_address.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if !self.proposers.is_empty() { + len += 1; + } + if self.submit_time.is_some() { + len += 1; + } + if self.group_version != 0 { + len += 1; + } + if self.group_policy_version != 0 { + len += 1; + } + if self.status != 0 { + len += 1; + } + if self.final_tally_result.is_some() { + len += 1; + } + if self.voting_period_end.is_some() { + len += 1; + } + if self.executor_result != 0 { + len += 1; + } + if !self.messages.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.Proposal", len)?; + if self.id != 0 { + struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; + } + if !self.group_policy_address.is_empty() { + struct_ser.serialize_field("groupPolicyAddress", &self.group_policy_address)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if !self.proposers.is_empty() { + struct_ser.serialize_field("proposers", &self.proposers)?; + } + if let Some(v) = self.submit_time.as_ref() { + struct_ser.serialize_field("submitTime", v)?; + } + if self.group_version != 0 { + struct_ser.serialize_field( + "groupVersion", + ToString::to_string(&self.group_version).as_str(), + )?; + } + if self.group_policy_version != 0 { + struct_ser.serialize_field( + "groupPolicyVersion", + ToString::to_string(&self.group_policy_version).as_str(), + )?; + } + if self.status != 0 { + let v = ProposalStatus::from_i32(self.status).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.status)) + })?; + struct_ser.serialize_field("status", &v)?; + } + if let Some(v) = self.final_tally_result.as_ref() { + struct_ser.serialize_field("finalTallyResult", v)?; + } + if let Some(v) = self.voting_period_end.as_ref() { + struct_ser.serialize_field("votingPeriodEnd", v)?; + } + if self.executor_result != 0 { + let v = ProposalExecutorResult::from_i32(self.executor_result).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.executor_result)) + })?; + struct_ser.serialize_field("executorResult", &v)?; + } + if !self.messages.is_empty() { + struct_ser.serialize_field("messages", &self.messages)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Proposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "group_policy_address", + "groupPolicyAddress", + "metadata", + "proposers", + "submit_time", + "submitTime", + "group_version", + "groupVersion", + "group_policy_version", + "groupPolicyVersion", + "status", + "final_tally_result", + "finalTallyResult", + "voting_period_end", + "votingPeriodEnd", + "executor_result", + "executorResult", + "messages", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + GroupPolicyAddress, + Metadata, + Proposers, + SubmitTime, + GroupVersion, + GroupPolicyVersion, + Status, + FinalTallyResult, + VotingPeriodEnd, + ExecutorResult, + Messages, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + "groupPolicyAddress" | "group_policy_address" => { + Ok(GeneratedField::GroupPolicyAddress) + } + "metadata" => Ok(GeneratedField::Metadata), + "proposers" => Ok(GeneratedField::Proposers), + "submitTime" | "submit_time" => Ok(GeneratedField::SubmitTime), + "groupVersion" | "group_version" => Ok(GeneratedField::GroupVersion), + "groupPolicyVersion" | "group_policy_version" => { + Ok(GeneratedField::GroupPolicyVersion) + } + "status" => Ok(GeneratedField::Status), + "finalTallyResult" | "final_tally_result" => { + Ok(GeneratedField::FinalTallyResult) + } + "votingPeriodEnd" | "voting_period_end" => { + Ok(GeneratedField::VotingPeriodEnd) + } + "executorResult" | "executor_result" => { + Ok(GeneratedField::ExecutorResult) + } + "messages" => Ok(GeneratedField::Messages), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Proposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.Proposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + let mut group_policy_address__ = None; + let mut metadata__ = None; + let mut proposers__ = None; + let mut submit_time__ = None; + let mut group_version__ = None; + let mut group_policy_version__ = None; + let mut status__ = None; + let mut final_tally_result__ = None; + let mut voting_period_end__ = None; + let mut executor_result__ = None; + let mut messages__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::GroupPolicyAddress => { + if group_policy_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyAddress", + )); + } + group_policy_address__ = Some(map.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + GeneratedField::Proposers => { + if proposers__.is_some() { + return Err(serde::de::Error::duplicate_field("proposers")); + } + proposers__ = Some(map.next_value()?); + } + GeneratedField::SubmitTime => { + if submit_time__.is_some() { + return Err(serde::de::Error::duplicate_field("submitTime")); + } + submit_time__ = map.next_value()?; + } + GeneratedField::GroupVersion => { + if group_version__.is_some() { + return Err(serde::de::Error::duplicate_field("groupVersion")); + } + group_version__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::GroupPolicyVersion => { + if group_policy_version__.is_some() { + return Err(serde::de::Error::duplicate_field( + "groupPolicyVersion", + )); + } + group_policy_version__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); + } + status__ = Some(map.next_value::()? as i32); + } + GeneratedField::FinalTallyResult => { + if final_tally_result__.is_some() { + return Err(serde::de::Error::duplicate_field("finalTallyResult")); + } + final_tally_result__ = map.next_value()?; + } + GeneratedField::VotingPeriodEnd => { + if voting_period_end__.is_some() { + return Err(serde::de::Error::duplicate_field("votingPeriodEnd")); + } + voting_period_end__ = map.next_value()?; + } + GeneratedField::ExecutorResult => { + if executor_result__.is_some() { + return Err(serde::de::Error::duplicate_field("executorResult")); + } + executor_result__ = + Some(map.next_value::()? as i32); + } + GeneratedField::Messages => { + if messages__.is_some() { + return Err(serde::de::Error::duplicate_field("messages")); + } + messages__ = Some(map.next_value()?); + } + } + } + Ok(Proposal { + id: id__.unwrap_or_default(), + group_policy_address: group_policy_address__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + proposers: proposers__.unwrap_or_default(), + submit_time: submit_time__, + group_version: group_version__.unwrap_or_default(), + group_policy_version: group_policy_version__.unwrap_or_default(), + status: status__.unwrap_or_default(), + final_tally_result: final_tally_result__, + voting_period_end: voting_period_end__, + executor_result: executor_result__.unwrap_or_default(), + messages: messages__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.Proposal", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ProposalExecutorResult { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED", + Self::NotRun => "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", + Self::Success => "PROPOSAL_EXECUTOR_RESULT_SUCCESS", + Self::Failure => "PROPOSAL_EXECUTOR_RESULT_FAILURE", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ProposalExecutorResult { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED", + "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", + "PROPOSAL_EXECUTOR_RESULT_SUCCESS", + "PROPOSAL_EXECUTOR_RESULT_FAILURE", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ProposalExecutorResult; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ProposalExecutorResult::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ProposalExecutorResult::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED" => { + Ok(ProposalExecutorResult::Unspecified) + } + "PROPOSAL_EXECUTOR_RESULT_NOT_RUN" => Ok(ProposalExecutorResult::NotRun), + "PROPOSAL_EXECUTOR_RESULT_SUCCESS" => Ok(ProposalExecutorResult::Success), + "PROPOSAL_EXECUTOR_RESULT_FAILURE" => Ok(ProposalExecutorResult::Failure), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for ProposalStatus { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", + Self::Submitted => "PROPOSAL_STATUS_SUBMITTED", + Self::Accepted => "PROPOSAL_STATUS_ACCEPTED", + Self::Rejected => "PROPOSAL_STATUS_REJECTED", + Self::Aborted => "PROPOSAL_STATUS_ABORTED", + Self::Withdrawn => "PROPOSAL_STATUS_WITHDRAWN", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ProposalStatus { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "PROPOSAL_STATUS_UNSPECIFIED", + "PROPOSAL_STATUS_SUBMITTED", + "PROPOSAL_STATUS_ACCEPTED", + "PROPOSAL_STATUS_REJECTED", + "PROPOSAL_STATUS_ABORTED", + "PROPOSAL_STATUS_WITHDRAWN", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ProposalStatus; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ProposalStatus::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ProposalStatus::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Ok(ProposalStatus::Unspecified), + "PROPOSAL_STATUS_SUBMITTED" => Ok(ProposalStatus::Submitted), + "PROPOSAL_STATUS_ACCEPTED" => Ok(ProposalStatus::Accepted), + "PROPOSAL_STATUS_REJECTED" => Ok(ProposalStatus::Rejected), + "PROPOSAL_STATUS_ABORTED" => Ok(ProposalStatus::Aborted), + "PROPOSAL_STATUS_WITHDRAWN" => Ok(ProposalStatus::Withdrawn), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for QueryGroupInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupInfoRequest", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_id", "groupId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupInfoRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryGroupInfoRequest { + group_id: group_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupInfoRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.info.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupInfoResponse", len)?; + if let Some(v) = self.info.as_ref() { + struct_ser.serialize_field("info", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["info"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Info, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "info" => Ok(GeneratedField::Info), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupInfoResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut info__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Info => { + if info__.is_some() { + return Err(serde::de::Error::duplicate_field("info")); + } + info__ = map.next_value()?; + } + } + } + Ok(QueryGroupInfoResponse { info: info__ }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupInfoResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupMembersRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupMembersRequest", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_id", "groupId", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupMembersRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupMembersRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupMembersRequest { + group_id: group_id__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupMembersRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupMembersResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.members.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupMembersResponse", len)?; + if !self.members.is_empty() { + struct_ser.serialize_field("members", &self.members)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupMembersResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["members", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Members, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "members" => Ok(GeneratedField::Members), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupMembersResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupMembersResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut members__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Members => { + if members__.is_some() { + return Err(serde::de::Error::duplicate_field("members")); + } + members__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupMembersResponse { + members: members__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupMembersResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupPoliciesByAdminRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupPoliciesByAdminRequest", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["admin", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupPoliciesByAdminRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupPoliciesByAdminRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupPoliciesByAdminRequest { + admin: admin__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupPoliciesByAdminRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupPoliciesByAdminResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.group_policies.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.group.v1.QueryGroupPoliciesByAdminResponse", len)?; + if !self.group_policies.is_empty() { + struct_ser.serialize_field("groupPolicies", &self.group_policies)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_policies", "groupPolicies", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupPolicies, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupPolicies" | "group_policies" => Ok(GeneratedField::GroupPolicies), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupPoliciesByAdminResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupPoliciesByAdminResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_policies__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupPolicies => { + if group_policies__.is_some() { + return Err(serde::de::Error::duplicate_field("groupPolicies")); + } + group_policies__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupPoliciesByAdminResponse { + group_policies: group_policies__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupPoliciesByAdminResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupPoliciesByGroupRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.group_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupPoliciesByGroupRequest", len)?; + if self.group_id != 0 { + struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_id", "groupId", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupId, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupId" | "group_id" => Ok(GeneratedField::GroupId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupPoliciesByGroupRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupPoliciesByGroupRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_id__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupId => { + if group_id__.is_some() { + return Err(serde::de::Error::duplicate_field("groupId")); + } + group_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupPoliciesByGroupRequest { + group_id: group_id__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupPoliciesByGroupRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupPoliciesByGroupResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.group_policies.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.group.v1.QueryGroupPoliciesByGroupResponse", len)?; + if !self.group_policies.is_empty() { + struct_ser.serialize_field("groupPolicies", &self.group_policies)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["group_policies", "groupPolicies", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GroupPolicies, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groupPolicies" | "group_policies" => Ok(GeneratedField::GroupPolicies), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupPoliciesByGroupResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupPoliciesByGroupResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut group_policies__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GroupPolicies => { + if group_policies__.is_some() { + return Err(serde::de::Error::duplicate_field("groupPolicies")); + } + group_policies__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupPoliciesByGroupResponse { + group_policies: group_policies__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupPoliciesByGroupResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupPolicyInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupPolicyInfoRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupPolicyInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupPolicyInfoRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(QueryGroupPolicyInfoRequest { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupPolicyInfoRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupPolicyInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.info.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupPolicyInfoResponse", len)?; + if let Some(v) = self.info.as_ref() { + struct_ser.serialize_field("info", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["info"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Info, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "info" => Ok(GeneratedField::Info), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupPolicyInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupPolicyInfoResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut info__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Info => { + if info__.is_some() { + return Err(serde::de::Error::duplicate_field("info")); + } + info__ = map.next_value()?; + } + } + } + Ok(QueryGroupPolicyInfoResponse { info: info__ }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupPolicyInfoResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupsByAdminRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.admin.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupsByAdminRequest", len)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["admin", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Admin, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "admin" => Ok(GeneratedField::Admin), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupsByAdminRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupsByAdminRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut admin__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupsByAdminRequest { + admin: admin__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupsByAdminRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupsByAdminResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.groups.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupsByAdminResponse", len)?; + if !self.groups.is_empty() { + struct_ser.serialize_field("groups", &self.groups)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["groups", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Groups, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groups" => Ok(GeneratedField::Groups), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupsByAdminResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupsByAdminResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut groups__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Groups => { + if groups__.is_some() { + return Err(serde::de::Error::duplicate_field("groups")); + } + groups__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupsByAdminResponse { + groups: groups__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupsByAdminResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupsByMemberRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupsByMemberRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupsByMemberRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupsByMemberRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupsByMemberRequest { + address: address__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupsByMemberRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupsByMemberResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.groups.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupsByMemberResponse", len)?; + if !self.groups.is_empty() { + struct_ser.serialize_field("groups", &self.groups)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["groups", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Groups, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groups" => Ok(GeneratedField::Groups), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupsByMemberResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupsByMemberResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut groups__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Groups => { + if groups__.is_some() { + return Err(serde::de::Error::duplicate_field("groups")); + } + groups__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupsByMemberResponse { + groups: groups__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupsByMemberResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupsRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupsRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryGroupsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.groups.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryGroupsResponse", len)?; + if !self.groups.is_empty() { + struct_ser.serialize_field("groups", &self.groups)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryGroupsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["groups", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Groups, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "groups" => Ok(GeneratedField::Groups), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryGroupsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryGroupsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut groups__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Groups => { + if groups__.is_some() { + return Err(serde::de::Error::duplicate_field("groups")); + } + groups__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryGroupsResponse { + groups: groups__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryGroupsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryProposalRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryProposalRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryProposalRequest { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryProposalRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryProposalResponse", len)?; + if let Some(v) = self.proposal.as_ref() { + struct_ser.serialize_field("proposal", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Proposal, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposal" => Ok(GeneratedField::Proposal), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryProposalResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Proposal => { + if proposal__.is_some() { + return Err(serde::de::Error::duplicate_field("proposal")); + } + proposal__ = map.next_value()?; + } + } + } + Ok(QueryProposalResponse { + proposal: proposal__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryProposalResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalsByGroupPolicyRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.group.v1.QueryProposalsByGroupPolicyRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalsByGroupPolicyRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryProposalsByGroupPolicyRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryProposalsByGroupPolicyRequest { + address: address__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryProposalsByGroupPolicyRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryProposalsByGroupPolicyResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.proposals.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.group.v1.QueryProposalsByGroupPolicyResponse", len)?; + if !self.proposals.is_empty() { + struct_ser.serialize_field("proposals", &self.proposals)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposals", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Proposals, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposals" => Ok(GeneratedField::Proposals), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryProposalsByGroupPolicyResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryProposalsByGroupPolicyResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposals__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Proposals => { + if proposals__.is_some() { + return Err(serde::de::Error::duplicate_field("proposals")); + } + proposals__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryProposalsByGroupPolicyResponse { + proposals: proposals__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryProposalsByGroupPolicyResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryTallyResultRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryTallyResultRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryTallyResultRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryTallyResultRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryTallyResultRequest { + proposal_id: proposal_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryTallyResultRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryTallyResultResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.tally.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryTallyResultResponse", len)?; + if let Some(v) = self.tally.as_ref() { + struct_ser.serialize_field("tally", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["tally"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Tally, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "tally" => Ok(GeneratedField::Tally), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryTallyResultResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryTallyResultResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut tally__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Tally => { + if tally__.is_some() { + return Err(serde::de::Error::duplicate_field("tally")); + } + tally__ = map.next_value()?; + } + } + } + Ok(QueryTallyResultResponse { tally: tally__ }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryTallyResultResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVoteByProposalVoterRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryVoteByProposalVoterRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "voter"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVoteByProposalVoterRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryVoteByProposalVoterRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + } + } + Ok(QueryVoteByProposalVoterRequest { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryVoteByProposalVoterRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVoteByProposalVoterResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.vote.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryVoteByProposalVoterResponse", len)?; + if let Some(v) = self.vote.as_ref() { + struct_ser.serialize_field("vote", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["vote"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Vote, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "vote" => Ok(GeneratedField::Vote), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVoteByProposalVoterResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryVoteByProposalVoterResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut vote__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Vote => { + if vote__.is_some() { + return Err(serde::de::Error::duplicate_field("vote")); + } + vote__ = map.next_value()?; + } + } + } + Ok(QueryVoteByProposalVoterResponse { vote: vote__ }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryVoteByProposalVoterResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVotesByProposalRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryVotesByProposalRequest", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["proposal_id", "proposalId", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVotesByProposalRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryVotesByProposalRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryVotesByProposalRequest { + proposal_id: proposal_id__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryVotesByProposalRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVotesByProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.votes.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryVotesByProposalResponse", len)?; + if !self.votes.is_empty() { + struct_ser.serialize_field("votes", &self.votes)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVotesByProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["votes", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Votes, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votes" => Ok(GeneratedField::Votes), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVotesByProposalResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryVotesByProposalResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut votes__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Votes => { + if votes__.is_some() { + return Err(serde::de::Error::duplicate_field("votes")); + } + votes__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryVotesByProposalResponse { + votes: votes__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryVotesByProposalResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVotesByVoterRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.voter.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryVotesByVoterRequest", len)?; + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVotesByVoterRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["voter", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Voter, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "voter" => Ok(GeneratedField::Voter), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVotesByVoterRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryVotesByVoterRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut voter__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryVotesByVoterRequest { + voter: voter__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryVotesByVoterRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryVotesByVoterResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.votes.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.QueryVotesByVoterResponse", len)?; + if !self.votes.is_empty() { + struct_ser.serialize_field("votes", &self.votes)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryVotesByVoterResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["votes", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Votes, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "votes" => Ok(GeneratedField::Votes), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryVotesByVoterResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.QueryVotesByVoterResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut votes__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Votes => { + if votes__.is_some() { + return Err(serde::de::Error::duplicate_field("votes")); + } + votes__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryVotesByVoterResponse { + votes: votes__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.QueryVotesByVoterResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for TallyResult { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.yes_count.is_empty() { + len += 1; + } + if !self.abstain_count.is_empty() { + len += 1; + } + if !self.no_count.is_empty() { + len += 1; + } + if !self.no_with_veto_count.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.TallyResult", len)?; + if !self.yes_count.is_empty() { + struct_ser.serialize_field("yesCount", &self.yes_count)?; + } + if !self.abstain_count.is_empty() { + struct_ser.serialize_field("abstainCount", &self.abstain_count)?; + } + if !self.no_count.is_empty() { + struct_ser.serialize_field("noCount", &self.no_count)?; + } + if !self.no_with_veto_count.is_empty() { + struct_ser.serialize_field("noWithVetoCount", &self.no_with_veto_count)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TallyResult { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "yes_count", + "yesCount", + "abstain_count", + "abstainCount", + "no_count", + "noCount", + "no_with_veto_count", + "noWithVetoCount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + YesCount, + AbstainCount, + NoCount, + NoWithVetoCount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "yesCount" | "yes_count" => Ok(GeneratedField::YesCount), + "abstainCount" | "abstain_count" => Ok(GeneratedField::AbstainCount), + "noCount" | "no_count" => Ok(GeneratedField::NoCount), + "noWithVetoCount" | "no_with_veto_count" => { + Ok(GeneratedField::NoWithVetoCount) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TallyResult; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.TallyResult") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut yes_count__ = None; + let mut abstain_count__ = None; + let mut no_count__ = None; + let mut no_with_veto_count__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::YesCount => { + if yes_count__.is_some() { + return Err(serde::de::Error::duplicate_field("yesCount")); + } + yes_count__ = Some(map.next_value()?); + } + GeneratedField::AbstainCount => { + if abstain_count__.is_some() { + return Err(serde::de::Error::duplicate_field("abstainCount")); + } + abstain_count__ = Some(map.next_value()?); + } + GeneratedField::NoCount => { + if no_count__.is_some() { + return Err(serde::de::Error::duplicate_field("noCount")); + } + no_count__ = Some(map.next_value()?); + } + GeneratedField::NoWithVetoCount => { + if no_with_veto_count__.is_some() { + return Err(serde::de::Error::duplicate_field("noWithVetoCount")); + } + no_with_veto_count__ = Some(map.next_value()?); + } + } + } + Ok(TallyResult { + yes_count: yes_count__.unwrap_or_default(), + abstain_count: abstain_count__.unwrap_or_default(), + no_count: no_count__.unwrap_or_default(), + no_with_veto_count: no_with_veto_count__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.TallyResult", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ThresholdDecisionPolicy { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.threshold.is_empty() { + len += 1; + } + if self.windows.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.group.v1.ThresholdDecisionPolicy", len)?; + if !self.threshold.is_empty() { + struct_ser.serialize_field("threshold", &self.threshold)?; + } + if let Some(v) = self.windows.as_ref() { + struct_ser.serialize_field("windows", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ThresholdDecisionPolicy { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["threshold", "windows"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Threshold, + Windows, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "threshold" => Ok(GeneratedField::Threshold), + "windows" => Ok(GeneratedField::Windows), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ThresholdDecisionPolicy; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.ThresholdDecisionPolicy") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut threshold__ = None; + let mut windows__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Threshold => { + if threshold__.is_some() { + return Err(serde::de::Error::duplicate_field("threshold")); + } + threshold__ = Some(map.next_value()?); + } + GeneratedField::Windows => { + if windows__.is_some() { + return Err(serde::de::Error::duplicate_field("windows")); + } + windows__ = map.next_value()?; + } + } + } + Ok(ThresholdDecisionPolicy { + threshold: threshold__.unwrap_or_default(), + windows: windows__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.group.v1.ThresholdDecisionPolicy", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Vote { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal_id != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if self.option != 0 { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if self.submit_time.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.Vote", len)?; + if self.proposal_id != 0 { + struct_ser.serialize_field( + "proposalId", + ToString::to_string(&self.proposal_id).as_str(), + )?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if self.option != 0 { + let v = VoteOption::from_i32(self.option).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.option)) + })?; + struct_ser.serialize_field("option", &v)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if let Some(v) = self.submit_time.as_ref() { + struct_ser.serialize_field("submitTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Vote { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal_id", + "proposalId", + "voter", + "option", + "metadata", + "submit_time", + "submitTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Voter, + Option, + Metadata, + SubmitTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "voter" => Ok(GeneratedField::Voter), + "option" => Ok(GeneratedField::Option), + "metadata" => Ok(GeneratedField::Metadata), + "submitTime" | "submit_time" => Ok(GeneratedField::SubmitTime), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Vote; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.group.v1.Vote") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut voter__ = None; + let mut option__ = None; + let mut metadata__ = None; + let mut submit_time__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::Option => { + if option__.is_some() { + return Err(serde::de::Error::duplicate_field("option")); + } + option__ = Some(map.next_value::()? as i32); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map.next_value()?); + } + GeneratedField::SubmitTime => { + if submit_time__.is_some() { + return Err(serde::de::Error::duplicate_field("submitTime")); + } + submit_time__ = map.next_value()?; + } + } + } + Ok(Vote { + proposal_id: proposal_id__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + option: option__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + submit_time: submit_time__, + }) + } + } + deserializer.deserialize_struct("cosmos.group.v1.Vote", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for VoteOption { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "VOTE_OPTION_UNSPECIFIED", + Self::Yes => "VOTE_OPTION_YES", + Self::Abstain => "VOTE_OPTION_ABSTAIN", + Self::No => "VOTE_OPTION_NO", + Self::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for VoteOption { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "VOTE_OPTION_UNSPECIFIED", + "VOTE_OPTION_YES", + "VOTE_OPTION_ABSTAIN", + "VOTE_OPTION_NO", + "VOTE_OPTION_NO_WITH_VETO", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VoteOption; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(VoteOption::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(VoteOption::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "VOTE_OPTION_UNSPECIFIED" => Ok(VoteOption::Unspecified), + "VOTE_OPTION_YES" => Ok(VoteOption::Yes), + "VOTE_OPTION_ABSTAIN" => Ok(VoteOption::Abstain), + "VOTE_OPTION_NO" => Ok(VoteOption::No), + "VOTE_OPTION_NO_WITH_VETO" => Ok(VoteOption::NoWithVeto), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs index 70d49802..4c327086 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs @@ -74,5 +74,6 @@ pub struct QueryAnnualProvisionsResponse { #[prost(bytes = "vec", tag = "1")] pub annual_provisions: ::prost::alloc::vec::Vec, } +include!("cosmos.mint.v1beta1.serde.rs"); include!("cosmos.mint.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs new file mode 100644 index 00000000..b921ac6e --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs @@ -0,0 +1,964 @@ +// @generated +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.minter.is_some() { + len += 1; + } + if self.params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.mint.v1beta1.GenesisState", len)?; + if let Some(v) = self.minter.as_ref() { + struct_ser.serialize_field("minter", v)?; + } + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["minter", "params"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Minter, + Params, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "minter" => Ok(GeneratedField::Minter), + "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 = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut minter__ = None; + let mut params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Minter => { + if minter__.is_some() { + return Err(serde::de::Error::duplicate_field("minter")); + } + minter__ = map.next_value()?; + } + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + } + } + Ok(GenesisState { + minter: minter__, + params: params__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.mint.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Minter { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.inflation.is_empty() { + len += 1; + } + if !self.annual_provisions.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.mint.v1beta1.Minter", len)?; + if !self.inflation.is_empty() { + struct_ser.serialize_field("inflation", &self.inflation)?; + } + if !self.annual_provisions.is_empty() { + struct_ser.serialize_field("annualProvisions", &self.annual_provisions)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Minter { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["inflation", "annual_provisions", "annualProvisions"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Inflation, + AnnualProvisions, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "inflation" => Ok(GeneratedField::Inflation), + "annualProvisions" | "annual_provisions" => { + Ok(GeneratedField::AnnualProvisions) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Minter; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.Minter") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut inflation__ = None; + let mut annual_provisions__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Inflation => { + if inflation__.is_some() { + return Err(serde::de::Error::duplicate_field("inflation")); + } + inflation__ = Some(map.next_value()?); + } + GeneratedField::AnnualProvisions => { + if annual_provisions__.is_some() { + return Err(serde::de::Error::duplicate_field("annualProvisions")); + } + annual_provisions__ = Some(map.next_value()?); + } + } + } + Ok(Minter { + inflation: inflation__.unwrap_or_default(), + annual_provisions: annual_provisions__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.mint.v1beta1.Minter", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Params { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.mint_denom.is_empty() { + len += 1; + } + if !self.inflation_rate_change.is_empty() { + len += 1; + } + if !self.inflation_max.is_empty() { + len += 1; + } + if !self.inflation_min.is_empty() { + len += 1; + } + if !self.goal_bonded.is_empty() { + len += 1; + } + if self.blocks_per_year != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.mint.v1beta1.Params", len)?; + if !self.mint_denom.is_empty() { + struct_ser.serialize_field("mintDenom", &self.mint_denom)?; + } + if !self.inflation_rate_change.is_empty() { + struct_ser.serialize_field("inflationRateChange", &self.inflation_rate_change)?; + } + if !self.inflation_max.is_empty() { + struct_ser.serialize_field("inflationMax", &self.inflation_max)?; + } + if !self.inflation_min.is_empty() { + struct_ser.serialize_field("inflationMin", &self.inflation_min)?; + } + if !self.goal_bonded.is_empty() { + struct_ser.serialize_field("goalBonded", &self.goal_bonded)?; + } + if self.blocks_per_year != 0 { + struct_ser.serialize_field( + "blocksPerYear", + ToString::to_string(&self.blocks_per_year).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Params { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "mint_denom", + "mintDenom", + "inflation_rate_change", + "inflationRateChange", + "inflation_max", + "inflationMax", + "inflation_min", + "inflationMin", + "goal_bonded", + "goalBonded", + "blocks_per_year", + "blocksPerYear", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MintDenom, + InflationRateChange, + InflationMax, + InflationMin, + GoalBonded, + BlocksPerYear, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "mintDenom" | "mint_denom" => Ok(GeneratedField::MintDenom), + "inflationRateChange" | "inflation_rate_change" => { + Ok(GeneratedField::InflationRateChange) + } + "inflationMax" | "inflation_max" => Ok(GeneratedField::InflationMax), + "inflationMin" | "inflation_min" => Ok(GeneratedField::InflationMin), + "goalBonded" | "goal_bonded" => Ok(GeneratedField::GoalBonded), + "blocksPerYear" | "blocks_per_year" => { + Ok(GeneratedField::BlocksPerYear) + } + _ => 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 std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.Params") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut mint_denom__ = None; + let mut inflation_rate_change__ = None; + let mut inflation_max__ = None; + let mut inflation_min__ = None; + let mut goal_bonded__ = None; + let mut blocks_per_year__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MintDenom => { + if mint_denom__.is_some() { + return Err(serde::de::Error::duplicate_field("mintDenom")); + } + mint_denom__ = Some(map.next_value()?); + } + GeneratedField::InflationRateChange => { + if inflation_rate_change__.is_some() { + return Err(serde::de::Error::duplicate_field( + "inflationRateChange", + )); + } + inflation_rate_change__ = Some(map.next_value()?); + } + GeneratedField::InflationMax => { + if inflation_max__.is_some() { + return Err(serde::de::Error::duplicate_field("inflationMax")); + } + inflation_max__ = Some(map.next_value()?); + } + GeneratedField::InflationMin => { + if inflation_min__.is_some() { + return Err(serde::de::Error::duplicate_field("inflationMin")); + } + inflation_min__ = Some(map.next_value()?); + } + GeneratedField::GoalBonded => { + if goal_bonded__.is_some() { + return Err(serde::de::Error::duplicate_field("goalBonded")); + } + goal_bonded__ = Some(map.next_value()?); + } + GeneratedField::BlocksPerYear => { + if blocks_per_year__.is_some() { + return Err(serde::de::Error::duplicate_field("blocksPerYear")); + } + blocks_per_year__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Params { + mint_denom: mint_denom__.unwrap_or_default(), + inflation_rate_change: inflation_rate_change__.unwrap_or_default(), + inflation_max: inflation_max__.unwrap_or_default(), + inflation_min: inflation_min__.unwrap_or_default(), + goal_bonded: goal_bonded__.unwrap_or_default(), + blocks_per_year: blocks_per_year__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.mint.v1beta1.Params", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryAnnualProvisionsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.mint.v1beta1.QueryAnnualProvisionsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryAnnualProvisionsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.QueryAnnualProvisionsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryAnnualProvisionsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.mint.v1beta1.QueryAnnualProvisionsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAnnualProvisionsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.annual_provisions.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.mint.v1beta1.QueryAnnualProvisionsResponse", len)?; + if !self.annual_provisions.is_empty() { + struct_ser.serialize_field( + "annualProvisions", + pbjson::private::base64::encode(&self.annual_provisions).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["annual_provisions", "annualProvisions"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AnnualProvisions, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "annualProvisions" | "annual_provisions" => { + Ok(GeneratedField::AnnualProvisions) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAnnualProvisionsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.QueryAnnualProvisionsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut annual_provisions__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::AnnualProvisions => { + if annual_provisions__.is_some() { + return Err(serde::de::Error::duplicate_field("annualProvisions")); + } + annual_provisions__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryAnnualProvisionsResponse { + annual_provisions: annual_provisions__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.mint.v1beta1.QueryAnnualProvisionsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryInflationRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.mint.v1beta1.QueryInflationRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryInflationRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryInflationRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.QueryInflationRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryInflationRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.mint.v1beta1.QueryInflationRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryInflationResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.inflation.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.mint.v1beta1.QueryInflationResponse", len)?; + if !self.inflation.is_empty() { + struct_ser.serialize_field( + "inflation", + pbjson::private::base64::encode(&self.inflation).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryInflationResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["inflation"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Inflation, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "inflation" => Ok(GeneratedField::Inflation), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryInflationResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.QueryInflationResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut inflation__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Inflation => { + if inflation__.is_some() { + return Err(serde::de::Error::duplicate_field("inflation")); + } + inflation__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryInflationResponse { + inflation: inflation__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.mint.v1beta1.QueryInflationResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.mint.v1beta1.QueryParamsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryParamsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.mint.v1beta1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.mint.v1beta1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.mint.v1beta1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { params: params__ }) + } + } + deserializer.deserialize_struct( + "cosmos.mint.v1beta1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs index 9c48b679..1b39aafe 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs @@ -212,5 +212,6 @@ pub struct MsgSend { /// MsgSendResponse defines the Msg/Send response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSendResponse {} +include!("cosmos.nft.v1beta1.serde.rs"); include!("cosmos.nft.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs new file mode 100644 index 00000000..6d1970c8 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs @@ -0,0 +1,2647 @@ +// @generated +impl serde::Serialize for Class { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.id.is_empty() { + len += 1; + } + if !self.name.is_empty() { + len += 1; + } + if !self.symbol.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.uri.is_empty() { + len += 1; + } + if !self.uri_hash.is_empty() { + len += 1; + } + if self.data.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.Class", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.symbol.is_empty() { + struct_ser.serialize_field("symbol", &self.symbol)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.uri.is_empty() { + struct_ser.serialize_field("uri", &self.uri)?; + } + if !self.uri_hash.is_empty() { + struct_ser.serialize_field("uriHash", &self.uri_hash)?; + } + if let Some(v) = self.data.as_ref() { + struct_ser.serialize_field("data", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Class { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "name", + "symbol", + "description", + "uri", + "uri_hash", + "uriHash", + "data", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + Name, + Symbol, + Description, + Uri, + UriHash, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + "name" => Ok(GeneratedField::Name), + "symbol" => Ok(GeneratedField::Symbol), + "description" => Ok(GeneratedField::Description), + "uri" => Ok(GeneratedField::Uri), + "uriHash" | "uri_hash" => Ok(GeneratedField::UriHash), + "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 = Class; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.Class") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + let mut name__ = None; + let mut symbol__ = None; + let mut description__ = None; + let mut uri__ = None; + let mut uri_hash__ = None; + let mut data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Symbol => { + if symbol__.is_some() { + return Err(serde::de::Error::duplicate_field("symbol")); + } + symbol__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + GeneratedField::Uri => { + if uri__.is_some() { + return Err(serde::de::Error::duplicate_field("uri")); + } + uri__ = Some(map.next_value()?); + } + GeneratedField::UriHash => { + if uri_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("uriHash")); + } + uri_hash__ = Some(map.next_value()?); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = map.next_value()?; + } + } + } + Ok(Class { + id: id__.unwrap_or_default(), + name: name__.unwrap_or_default(), + symbol: symbol__.unwrap_or_default(), + description: description__.unwrap_or_default(), + uri: uri__.unwrap_or_default(), + uri_hash: uri_hash__.unwrap_or_default(), + data: data__, + }) + } + } + deserializer.deserialize_struct("cosmos.nft.v1beta1.Class", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Entry { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.owner.is_empty() { + len += 1; + } + if !self.nfts.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.Entry", len)?; + if !self.owner.is_empty() { + struct_ser.serialize_field("owner", &self.owner)?; + } + if !self.nfts.is_empty() { + struct_ser.serialize_field("nfts", &self.nfts)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Entry { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["owner", "nfts"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Owner, + Nfts, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "owner" => Ok(GeneratedField::Owner), + "nfts" => Ok(GeneratedField::Nfts), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Entry; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.Entry") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut owner__ = None; + let mut nfts__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Owner => { + if owner__.is_some() { + return Err(serde::de::Error::duplicate_field("owner")); + } + owner__ = Some(map.next_value()?); + } + GeneratedField::Nfts => { + if nfts__.is_some() { + return Err(serde::de::Error::duplicate_field("nfts")); + } + nfts__ = Some(map.next_value()?); + } + } + } + Ok(Entry { + owner: owner__.unwrap_or_default(), + nfts: nfts__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.nft.v1beta1.Entry", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for EventBurn { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.id.is_empty() { + len += 1; + } + if !self.owner.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.EventBurn", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.owner.is_empty() { + struct_ser.serialize_field("owner", &self.owner)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventBurn { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId", "id", "owner"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Id, + Owner, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "id" => Ok(GeneratedField::Id), + "owner" => Ok(GeneratedField::Owner), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventBurn; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.EventBurn") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut id__ = None; + let mut owner__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + GeneratedField::Owner => { + if owner__.is_some() { + return Err(serde::de::Error::duplicate_field("owner")); + } + owner__ = Some(map.next_value()?); + } + } + } + Ok(EventBurn { + class_id: class_id__.unwrap_or_default(), + id: id__.unwrap_or_default(), + owner: owner__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.nft.v1beta1.EventBurn", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for EventMint { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.id.is_empty() { + len += 1; + } + if !self.owner.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.EventMint", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.owner.is_empty() { + struct_ser.serialize_field("owner", &self.owner)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventMint { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId", "id", "owner"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Id, + Owner, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "id" => Ok(GeneratedField::Id), + "owner" => Ok(GeneratedField::Owner), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventMint; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.EventMint") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut id__ = None; + let mut owner__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + GeneratedField::Owner => { + if owner__.is_some() { + return Err(serde::de::Error::duplicate_field("owner")); + } + owner__ = Some(map.next_value()?); + } + } + } + Ok(EventMint { + class_id: class_id__.unwrap_or_default(), + id: id__.unwrap_or_default(), + owner: owner__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.nft.v1beta1.EventMint", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for EventSend { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.id.is_empty() { + len += 1; + } + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.EventSend", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventSend { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId", "id", "sender", "receiver"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Id, + Sender, + Receiver, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "id" => Ok(GeneratedField::Id), + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventSend; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.EventSend") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut id__ = None; + let mut sender__ = None; + let mut receiver__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + } + } + Ok(EventSend { + class_id: class_id__.unwrap_or_default(), + id: id__.unwrap_or_default(), + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.nft.v1beta1.EventSend", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.classes.is_empty() { + len += 1; + } + if !self.entries.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.GenesisState", len)?; + if !self.classes.is_empty() { + struct_ser.serialize_field("classes", &self.classes)?; + } + if !self.entries.is_empty() { + struct_ser.serialize_field("entries", &self.entries)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["classes", "entries"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Classes, + Entries, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classes" => Ok(GeneratedField::Classes), + "entries" => Ok(GeneratedField::Entries), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut classes__ = None; + let mut entries__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Classes => { + if classes__.is_some() { + return Err(serde::de::Error::duplicate_field("classes")); + } + classes__ = Some(map.next_value()?); + } + GeneratedField::Entries => { + if entries__.is_some() { + return Err(serde::de::Error::duplicate_field("entries")); + } + entries__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + classes: classes__.unwrap_or_default(), + entries: entries__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.nft.v1beta1.GenesisState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgSend { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.id.is_empty() { + len += 1; + } + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.MsgSend", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSend { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId", "id", "sender", "receiver"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Id, + Sender, + Receiver, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "id" => Ok(GeneratedField::Id), + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSend; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.MsgSend") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut id__ = None; + let mut sender__ = None; + let mut receiver__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + } + } + Ok(MsgSend { + class_id: class_id__.unwrap_or_default(), + id: id__.unwrap_or_default(), + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.nft.v1beta1.MsgSend", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgSendResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.MsgSendResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSendResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgSendResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.MsgSendResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgSendResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.MsgSendResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Nft { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.id.is_empty() { + len += 1; + } + if !self.uri.is_empty() { + len += 1; + } + if !self.uri_hash.is_empty() { + len += 1; + } + if self.data.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.NFT", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.uri.is_empty() { + struct_ser.serialize_field("uri", &self.uri)?; + } + if !self.uri_hash.is_empty() { + struct_ser.serialize_field("uriHash", &self.uri_hash)?; + } + if let Some(v) = self.data.as_ref() { + struct_ser.serialize_field("data", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Nft { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "class_id", "classId", "id", "uri", "uri_hash", "uriHash", "data", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Id, + Uri, + UriHash, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "id" => Ok(GeneratedField::Id), + "uri" => Ok(GeneratedField::Uri), + "uriHash" | "uri_hash" => Ok(GeneratedField::UriHash), + "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 = Nft; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.NFT") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut id__ = None; + let mut uri__ = None; + let mut uri_hash__ = None; + let mut data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + GeneratedField::Uri => { + if uri__.is_some() { + return Err(serde::de::Error::duplicate_field("uri")); + } + uri__ = Some(map.next_value()?); + } + GeneratedField::UriHash => { + if uri_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("uriHash")); + } + uri_hash__ = Some(map.next_value()?); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = map.next_value()?; + } + } + } + Ok(Nft { + class_id: class_id__.unwrap_or_default(), + id: id__.unwrap_or_default(), + uri: uri__.unwrap_or_default(), + uri_hash: uri_hash__.unwrap_or_default(), + data: data__, + }) + } + } + deserializer.deserialize_struct("cosmos.nft.v1beta1.NFT", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryBalanceRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.owner.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryBalanceRequest", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.owner.is_empty() { + struct_ser.serialize_field("owner", &self.owner)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId", "owner"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Owner, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "owner" => Ok(GeneratedField::Owner), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryBalanceRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryBalanceRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut owner__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Owner => { + if owner__.is_some() { + return Err(serde::de::Error::duplicate_field("owner")); + } + owner__ = Some(map.next_value()?); + } + } + } + Ok(QueryBalanceRequest { + class_id: class_id__.unwrap_or_default(), + owner: owner__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryBalanceRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryBalanceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.amount != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryBalanceResponse", len)?; + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryBalanceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryBalanceResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryBalanceResponse { + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryBalanceResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryClassRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryClassRequest", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryClassRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryClassRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryClassRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + } + } + Ok(QueryClassRequest { + class_id: class_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryClassRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryClassResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.class.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryClassResponse", len)?; + if let Some(v) = self.class.as_ref() { + struct_ser.serialize_field("class", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryClassResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Class, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "class" => Ok(GeneratedField::Class), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryClassResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryClassResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Class => { + if class__.is_some() { + return Err(serde::de::Error::duplicate_field("class")); + } + class__ = map.next_value()?; + } + } + } + Ok(QueryClassResponse { class: class__ }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryClassResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryClassesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryClassesRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryClassesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryClassesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryClassesRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryClassesRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryClassesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryClassesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.classes.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryClassesResponse", len)?; + if !self.classes.is_empty() { + struct_ser.serialize_field("classes", &self.classes)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryClassesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["classes", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Classes, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classes" => Ok(GeneratedField::Classes), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryClassesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryClassesResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut classes__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Classes => { + if classes__.is_some() { + return Err(serde::de::Error::duplicate_field("classes")); + } + classes__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryClassesResponse { + classes: classes__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryClassesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryNftRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.id.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryNFTRequest", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryNftRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId", "id"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Id, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "id" => Ok(GeneratedField::Id), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryNftRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryNFTRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + } + } + Ok(QueryNftRequest { + class_id: class_id__.unwrap_or_default(), + id: id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryNFTRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryNftResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.nft.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryNFTResponse", len)?; + if let Some(v) = self.nft.as_ref() { + struct_ser.serialize_field("nft", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryNftResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["nft"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Nft, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "nft" => Ok(GeneratedField::Nft), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryNftResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryNFTResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut nft__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Nft => { + if nft__.is_some() { + return Err(serde::de::Error::duplicate_field("nft")); + } + nft__ = map.next_value()?; + } + } + } + Ok(QueryNftResponse { nft: nft__ }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryNFTResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryNfTsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.owner.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryNFTsRequest", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.owner.is_empty() { + struct_ser.serialize_field("owner", &self.owner)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryNfTsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId", "owner", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Owner, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "owner" => Ok(GeneratedField::Owner), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryNfTsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryNFTsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut owner__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Owner => { + if owner__.is_some() { + return Err(serde::de::Error::duplicate_field("owner")); + } + owner__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryNfTsRequest { + class_id: class_id__.unwrap_or_default(), + owner: owner__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryNFTsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryNfTsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.nfts.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryNFTsResponse", len)?; + if !self.nfts.is_empty() { + struct_ser.serialize_field("nfts", &self.nfts)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryNfTsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["nfts", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Nfts, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "nfts" => Ok(GeneratedField::Nfts), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryNfTsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryNFTsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut nfts__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Nfts => { + if nfts__.is_some() { + return Err(serde::de::Error::duplicate_field("nfts")); + } + nfts__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryNfTsResponse { + nfts: nfts__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryNFTsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryOwnerRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + if !self.id.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryOwnerRequest", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryOwnerRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId", "id"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + Id, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + "id" => Ok(GeneratedField::Id), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryOwnerRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryOwnerRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + let mut id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + } + } + Ok(QueryOwnerRequest { + class_id: class_id__.unwrap_or_default(), + id: id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryOwnerRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryOwnerResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.owner.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QueryOwnerResponse", len)?; + if !self.owner.is_empty() { + struct_ser.serialize_field("owner", &self.owner)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryOwnerResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["owner"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Owner, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "owner" => Ok(GeneratedField::Owner), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryOwnerResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QueryOwnerResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut owner__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Owner => { + if owner__.is_some() { + return Err(serde::de::Error::duplicate_field("owner")); + } + owner__ = Some(map.next_value()?); + } + } + } + Ok(QueryOwnerResponse { + owner: owner__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QueryOwnerResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySupplyRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.class_id.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QuerySupplyRequest", len)?; + if !self.class_id.is_empty() { + struct_ser.serialize_field("classId", &self.class_id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySupplyRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["class_id", "classId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ClassId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "classId" | "class_id" => Ok(GeneratedField::ClassId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySupplyRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QuerySupplyRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut class_id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ClassId => { + if class_id__.is_some() { + return Err(serde::de::Error::duplicate_field("classId")); + } + class_id__ = Some(map.next_value()?); + } + } + } + Ok(QuerySupplyRequest { + class_id: class_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QuerySupplyRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySupplyResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.amount != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.nft.v1beta1.QuerySupplyResponse", len)?; + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySupplyResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySupplyResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.nft.v1beta1.QuerySupplyResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QuerySupplyResponse { + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.nft.v1beta1.QuerySupplyResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs index f73da631..48dc2d1f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs @@ -4,4 +4,5 @@ /// with ORM data. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module {} +include!("cosmos.orm.module.v1alpha1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs new file mode 100644 index 00000000..ff0688b0 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs @@ -0,0 +1,76 @@ +// @generated +impl serde::Serialize for Module { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.orm.module.v1alpha1.Module", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Module { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = Module; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.orm.module.v1alpha1.Module") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(Module {}) + } + } + deserializer.deserialize_struct( + "cosmos.orm.module.v1alpha1.Module", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs index 8f1615c5..350a9c31 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs @@ -87,4 +87,5 @@ pub struct SingletonDescriptor { #[prost(uint32, tag = "1")] pub id: u32, } +include!("cosmos.orm.v1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs new file mode 100644 index 00000000..293b88db --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs @@ -0,0 +1,476 @@ +// @generated +impl serde::Serialize for PrimaryKeyDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.fields.is_empty() { + len += 1; + } + if self.auto_increment { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.orm.v1.PrimaryKeyDescriptor", len)?; + if !self.fields.is_empty() { + struct_ser.serialize_field("fields", &self.fields)?; + } + if self.auto_increment { + struct_ser.serialize_field("autoIncrement", &self.auto_increment)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PrimaryKeyDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["fields", "auto_increment", "autoIncrement"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Fields, + AutoIncrement, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fields" => Ok(GeneratedField::Fields), + "autoIncrement" | "auto_increment" => Ok(GeneratedField::AutoIncrement), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PrimaryKeyDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.orm.v1.PrimaryKeyDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut fields__ = None; + let mut auto_increment__ = 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__ = Some(map.next_value()?); + } + GeneratedField::AutoIncrement => { + if auto_increment__.is_some() { + return Err(serde::de::Error::duplicate_field("autoIncrement")); + } + auto_increment__ = Some(map.next_value()?); + } + } + } + Ok(PrimaryKeyDescriptor { + fields: fields__.unwrap_or_default(), + auto_increment: auto_increment__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.orm.v1.PrimaryKeyDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SecondaryIndexDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.fields.is_empty() { + len += 1; + } + if self.id != 0 { + len += 1; + } + if self.unique { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.orm.v1.SecondaryIndexDescriptor", len)?; + if !self.fields.is_empty() { + struct_ser.serialize_field("fields", &self.fields)?; + } + if self.id != 0 { + struct_ser.serialize_field("id", &self.id)?; + } + if self.unique { + struct_ser.serialize_field("unique", &self.unique)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["fields", "id", "unique"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Fields, + Id, + Unique, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fields" => Ok(GeneratedField::Fields), + "id" => Ok(GeneratedField::Id), + "unique" => Ok(GeneratedField::Unique), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SecondaryIndexDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.orm.v1.SecondaryIndexDescriptor") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut fields__ = None; + let mut id__ = None; + let mut unique__ = 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__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Unique => { + if unique__.is_some() { + return Err(serde::de::Error::duplicate_field("unique")); + } + unique__ = Some(map.next_value()?); + } + } + } + Ok(SecondaryIndexDescriptor { + fields: fields__.unwrap_or_default(), + id: id__.unwrap_or_default(), + unique: unique__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.orm.v1.SecondaryIndexDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SingletonDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.orm.v1.SingletonDescriptor", len)?; + if self.id != 0 { + struct_ser.serialize_field("id", &self.id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SingletonDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["id"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SingletonDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.orm.v1.SingletonDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(SingletonDescriptor { + id: id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.orm.v1.SingletonDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for TableDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.primary_key.is_some() { + len += 1; + } + if !self.index.is_empty() { + len += 1; + } + if self.id != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.orm.v1.TableDescriptor", len)?; + if let Some(v) = self.primary_key.as_ref() { + struct_ser.serialize_field("primaryKey", v)?; + } + if !self.index.is_empty() { + struct_ser.serialize_field("index", &self.index)?; + } + if self.id != 0 { + struct_ser.serialize_field("id", &self.id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TableDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["primary_key", "primaryKey", "index", "id"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PrimaryKey, + Index, + Id, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "primaryKey" | "primary_key" => Ok(GeneratedField::PrimaryKey), + "index" => Ok(GeneratedField::Index), + "id" => Ok(GeneratedField::Id), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TableDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.orm.v1.TableDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut primary_key__ = None; + let mut index__ = None; + let mut id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PrimaryKey => { + if primary_key__.is_some() { + return Err(serde::de::Error::duplicate_field("primaryKey")); + } + primary_key__ = map.next_value()?; + } + GeneratedField::Index => { + if index__.is_some() { + return Err(serde::de::Error::duplicate_field("index")); + } + index__ = Some(map.next_value()?); + } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(TableDescriptor { + primary_key: primary_key__, + index: index__.unwrap_or_default(), + id: id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.orm.v1.TableDescriptor", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs index 9122e8ad..26ab9c2f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs @@ -79,4 +79,5 @@ impl StorageType { } } } +include!("cosmos.orm.v1alpha1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs new file mode 100644 index 00000000..5c090e15 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs @@ -0,0 +1,351 @@ +// @generated +impl serde::Serialize for ModuleSchemaDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.schema_file.is_empty() { + len += 1; + } + if !self.prefix.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.orm.v1alpha1.ModuleSchemaDescriptor", len)?; + if !self.schema_file.is_empty() { + struct_ser.serialize_field("schemaFile", &self.schema_file)?; + } + if !self.prefix.is_empty() { + struct_ser.serialize_field( + "prefix", + pbjson::private::base64::encode(&self.prefix).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ModuleSchemaDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["schema_file", "schemaFile", "prefix"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SchemaFile, + Prefix, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "schemaFile" | "schema_file" => Ok(GeneratedField::SchemaFile), + "prefix" => Ok(GeneratedField::Prefix), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ModuleSchemaDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.orm.v1alpha1.ModuleSchemaDescriptor") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut schema_file__ = None; + let mut prefix__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::SchemaFile => { + if schema_file__.is_some() { + return Err(serde::de::Error::duplicate_field("schemaFile")); + } + schema_file__ = Some(map.next_value()?); + } + GeneratedField::Prefix => { + if prefix__.is_some() { + return Err(serde::de::Error::duplicate_field("prefix")); + } + prefix__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(ModuleSchemaDescriptor { + schema_file: schema_file__.unwrap_or_default(), + prefix: prefix__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.orm.v1alpha1.ModuleSchemaDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for module_schema_descriptor::FileEntry { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.id != 0 { + len += 1; + } + if !self.proto_file_name.is_empty() { + len += 1; + } + if self.storage_type != 0 { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry", len)?; + if self.id != 0 { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.proto_file_name.is_empty() { + struct_ser.serialize_field("protoFileName", &self.proto_file_name)?; + } + if self.storage_type != 0 { + let v = StorageType::from_i32(self.storage_type).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.storage_type)) + })?; + struct_ser.serialize_field("storageType", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "proto_file_name", + "protoFileName", + "storage_type", + "storageType", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + ProtoFileName, + StorageType, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + "protoFileName" | "proto_file_name" => { + Ok(GeneratedField::ProtoFileName) + } + "storageType" | "storage_type" => Ok(GeneratedField::StorageType), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = module_schema_descriptor::FileEntry; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + let mut proto_file_name__ = None; + let mut storage_type__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::ProtoFileName => { + if proto_file_name__.is_some() { + return Err(serde::de::Error::duplicate_field("protoFileName")); + } + proto_file_name__ = Some(map.next_value()?); + } + GeneratedField::StorageType => { + if storage_type__.is_some() { + return Err(serde::de::Error::duplicate_field("storageType")); + } + storage_type__ = Some(map.next_value::()? as i32); + } + } + } + Ok(module_schema_descriptor::FileEntry { + id: id__.unwrap_or_default(), + proto_file_name: proto_file_name__.unwrap_or_default(), + storage_type: storage_type__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for StorageType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::DefaultUnspecified => "STORAGE_TYPE_DEFAULT_UNSPECIFIED", + Self::Memory => "STORAGE_TYPE_MEMORY", + Self::Transient => "STORAGE_TYPE_TRANSIENT", + Self::Index => "STORAGE_TYPE_INDEX", + Self::Commitment => "STORAGE_TYPE_COMMITMENT", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for StorageType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "STORAGE_TYPE_DEFAULT_UNSPECIFIED", + "STORAGE_TYPE_MEMORY", + "STORAGE_TYPE_TRANSIENT", + "STORAGE_TYPE_INDEX", + "STORAGE_TYPE_COMMITMENT", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StorageType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(StorageType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(StorageType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "STORAGE_TYPE_DEFAULT_UNSPECIFIED" => Ok(StorageType::DefaultUnspecified), + "STORAGE_TYPE_MEMORY" => Ok(StorageType::Memory), + "STORAGE_TYPE_TRANSIENT" => Ok(StorageType::Transient), + "STORAGE_TYPE_INDEX" => Ok(StorageType::Index), + "STORAGE_TYPE_COMMITMENT" => Ok(StorageType::Commitment), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs index 59c20e5d..4c0d6eaa 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs @@ -63,5 +63,6 @@ pub struct Subspace { #[prost(string, repeated, tag = "2")] pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +include!("cosmos.params.v1beta1.serde.rs"); include!("cosmos.params.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs new file mode 100644 index 00000000..b39d0995 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs @@ -0,0 +1,757 @@ +// @generated +impl serde::Serialize for ParamChange { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.subspace.is_empty() { + len += 1; + } + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.params.v1beta1.ParamChange", len)?; + if !self.subspace.is_empty() { + struct_ser.serialize_field("subspace", &self.subspace)?; + } + if !self.key.is_empty() { + struct_ser.serialize_field("key", &self.key)?; + } + if !self.value.is_empty() { + struct_ser.serialize_field("value", &self.value)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ParamChange { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["subspace", "key", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Subspace, + Key, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "subspace" => Ok(GeneratedField::Subspace), + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ParamChange; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.params.v1beta1.ParamChange") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut subspace__ = None; + let mut key__ = None; + let mut value__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Subspace => { + if subspace__.is_some() { + return Err(serde::de::Error::duplicate_field("subspace")); + } + subspace__ = Some(map.next_value()?); + } + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some(map.next_value()?); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some(map.next_value()?); + } + } + } + Ok(ParamChange { + subspace: subspace__.unwrap_or_default(), + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.params.v1beta1.ParamChange", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ParameterChangeProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.changes.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.params.v1beta1.ParameterChangeProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.changes.is_empty() { + struct_ser.serialize_field("changes", &self.changes)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "changes"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + Changes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "changes" => Ok(GeneratedField::Changes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ParameterChangeProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.params.v1beta1.ParameterChangeProposal") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut changes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + GeneratedField::Changes => { + if changes__.is_some() { + return Err(serde::de::Error::duplicate_field("changes")); + } + changes__ = Some(map.next_value()?); + } + } + } + Ok(ParameterChangeProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + changes: changes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.params.v1beta1.ParameterChangeProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.subspace.is_empty() { + len += 1; + } + if !self.key.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.params.v1beta1.QueryParamsRequest", len)?; + if !self.subspace.is_empty() { + struct_ser.serialize_field("subspace", &self.subspace)?; + } + if !self.key.is_empty() { + struct_ser.serialize_field("key", &self.key)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["subspace", "key"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Subspace, + Key, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "subspace" => Ok(GeneratedField::Subspace), + "key" => Ok(GeneratedField::Key), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.params.v1beta1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut subspace__ = None; + let mut key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Subspace => { + if subspace__.is_some() { + return Err(serde::de::Error::duplicate_field("subspace")); + } + subspace__ = Some(map.next_value()?); + } + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some(map.next_value()?); + } + } + } + Ok(QueryParamsRequest { + subspace: subspace__.unwrap_or_default(), + key: key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.params.v1beta1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.param.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.params.v1beta1.QueryParamsResponse", len)?; + if let Some(v) = self.param.as_ref() { + struct_ser.serialize_field("param", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["param"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Param, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "param" => Ok(GeneratedField::Param), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.params.v1beta1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut param__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Param => { + if param__.is_some() { + return Err(serde::de::Error::duplicate_field("param")); + } + param__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { param: param__ }) + } + } + deserializer.deserialize_struct( + "cosmos.params.v1beta1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySubspacesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.params.v1beta1.QuerySubspacesRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySubspacesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QuerySubspacesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.params.v1beta1.QuerySubspacesRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QuerySubspacesRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.params.v1beta1.QuerySubspacesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySubspacesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.subspaces.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.params.v1beta1.QuerySubspacesResponse", len)?; + if !self.subspaces.is_empty() { + struct_ser.serialize_field("subspaces", &self.subspaces)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySubspacesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["subspaces"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Subspaces, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "subspaces" => Ok(GeneratedField::Subspaces), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySubspacesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.params.v1beta1.QuerySubspacesResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut subspaces__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Subspaces => { + if subspaces__.is_some() { + return Err(serde::de::Error::duplicate_field("subspaces")); + } + subspaces__ = Some(map.next_value()?); + } + } + } + Ok(QuerySubspacesResponse { + subspaces: subspaces__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.params.v1beta1.QuerySubspacesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Subspace { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.subspace.is_empty() { + len += 1; + } + if !self.keys.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.params.v1beta1.Subspace", len)?; + if !self.subspace.is_empty() { + struct_ser.serialize_field("subspace", &self.subspace)?; + } + if !self.keys.is_empty() { + struct_ser.serialize_field("keys", &self.keys)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Subspace { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["subspace", "keys"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Subspace, + Keys, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "subspace" => Ok(GeneratedField::Subspace), + "keys" => Ok(GeneratedField::Keys), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Subspace; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.params.v1beta1.Subspace") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut subspace__ = None; + let mut keys__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Subspace => { + if subspace__.is_some() { + return Err(serde::de::Error::duplicate_field("subspace")); + } + subspace__ = Some(map.next_value()?); + } + GeneratedField::Keys => { + if keys__.is_some() { + return Err(serde::de::Error::duplicate_field("keys")); + } + keys__ = Some(map.next_value()?); + } + } + } + Ok(Subspace { + subspace: subspace__.unwrap_or_default(), + keys: keys__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.params.v1beta1.Subspace", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs index 31d12936..cc651fbf 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs @@ -136,5 +136,6 @@ pub struct MsgUnjail { /// MsgUnjailResponse defines the Msg/Unjail response type #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUnjailResponse {} +include!("cosmos.slashing.v1beta1.serde.rs"); include!("cosmos.slashing.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs new file mode 100644 index 00000000..82ecb0f0 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs @@ -0,0 +1,1668 @@ +// @generated +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + if !self.signing_infos.is_empty() { + len += 1; + } + if !self.missed_blocks.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.GenesisState", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + if !self.signing_infos.is_empty() { + struct_ser.serialize_field("signingInfos", &self.signing_infos)?; + } + if !self.missed_blocks.is_empty() { + struct_ser.serialize_field("missedBlocks", &self.missed_blocks)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "params", + "signing_infos", + "signingInfos", + "missed_blocks", + "missedBlocks", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + SigningInfos, + MissedBlocks, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "params" => Ok(GeneratedField::Params), + "signingInfos" | "signing_infos" => Ok(GeneratedField::SigningInfos), + "missedBlocks" | "missed_blocks" => Ok(GeneratedField::MissedBlocks), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + let mut signing_infos__ = None; + let mut missed_blocks__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + GeneratedField::SigningInfos => { + if signing_infos__.is_some() { + return Err(serde::de::Error::duplicate_field("signingInfos")); + } + signing_infos__ = Some(map.next_value()?); + } + GeneratedField::MissedBlocks => { + if missed_blocks__.is_some() { + return Err(serde::de::Error::duplicate_field("missedBlocks")); + } + missed_blocks__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + params: params__, + signing_infos: signing_infos__.unwrap_or_default(), + missed_blocks: missed_blocks__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MissedBlock { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.index != 0 { + len += 1; + } + if self.missed { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.MissedBlock", len)?; + if self.index != 0 { + struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; + } + if self.missed { + struct_ser.serialize_field("missed", &self.missed)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MissedBlock { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["index", "missed"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Index, + Missed, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "index" => Ok(GeneratedField::Index), + "missed" => Ok(GeneratedField::Missed), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MissedBlock; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.MissedBlock") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut index__ = None; + let mut missed__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Index => { + if index__.is_some() { + return Err(serde::de::Error::duplicate_field("index")); + } + index__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Missed => { + if missed__.is_some() { + return Err(serde::de::Error::duplicate_field("missed")); + } + missed__ = Some(map.next_value()?); + } + } + } + Ok(MissedBlock { + index: index__.unwrap_or_default(), + missed: missed__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.MissedBlock", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUnjail { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_addr.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.MsgUnjail", len)?; + if !self.validator_addr.is_empty() { + struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUnjail { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_addr", "validatorAddr"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddr, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUnjail; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.MsgUnjail") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_addr__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddr => { + if validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddr")); + } + validator_addr__ = Some(map.next_value()?); + } + } + } + Ok(MsgUnjail { + validator_addr: validator_addr__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.MsgUnjail", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUnjailResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.MsgUnjailResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUnjailResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUnjailResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.MsgUnjailResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgUnjailResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.MsgUnjailResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Params { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.signed_blocks_window != 0 { + len += 1; + } + if !self.min_signed_per_window.is_empty() { + len += 1; + } + if self.downtime_jail_duration.is_some() { + len += 1; + } + if !self.slash_fraction_double_sign.is_empty() { + len += 1; + } + if !self.slash_fraction_downtime.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.slashing.v1beta1.Params", len)?; + if self.signed_blocks_window != 0 { + struct_ser.serialize_field( + "signedBlocksWindow", + ToString::to_string(&self.signed_blocks_window).as_str(), + )?; + } + if !self.min_signed_per_window.is_empty() { + struct_ser.serialize_field( + "minSignedPerWindow", + pbjson::private::base64::encode(&self.min_signed_per_window).as_str(), + )?; + } + if let Some(v) = self.downtime_jail_duration.as_ref() { + struct_ser.serialize_field("downtimeJailDuration", v)?; + } + if !self.slash_fraction_double_sign.is_empty() { + struct_ser.serialize_field( + "slashFractionDoubleSign", + pbjson::private::base64::encode(&self.slash_fraction_double_sign).as_str(), + )?; + } + if !self.slash_fraction_downtime.is_empty() { + struct_ser.serialize_field( + "slashFractionDowntime", + pbjson::private::base64::encode(&self.slash_fraction_downtime).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Params { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "signed_blocks_window", + "signedBlocksWindow", + "min_signed_per_window", + "minSignedPerWindow", + "downtime_jail_duration", + "downtimeJailDuration", + "slash_fraction_double_sign", + "slashFractionDoubleSign", + "slash_fraction_downtime", + "slashFractionDowntime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SignedBlocksWindow, + MinSignedPerWindow, + DowntimeJailDuration, + SlashFractionDoubleSign, + SlashFractionDowntime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "signedBlocksWindow" | "signed_blocks_window" => { + Ok(GeneratedField::SignedBlocksWindow) + } + "minSignedPerWindow" | "min_signed_per_window" => { + Ok(GeneratedField::MinSignedPerWindow) + } + "downtimeJailDuration" | "downtime_jail_duration" => { + Ok(GeneratedField::DowntimeJailDuration) + } + "slashFractionDoubleSign" | "slash_fraction_double_sign" => { + Ok(GeneratedField::SlashFractionDoubleSign) + } + "slashFractionDowntime" | "slash_fraction_downtime" => { + Ok(GeneratedField::SlashFractionDowntime) + } + _ => 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 std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.Params") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signed_blocks_window__ = None; + let mut min_signed_per_window__ = None; + let mut downtime_jail_duration__ = None; + let mut slash_fraction_double_sign__ = None; + let mut slash_fraction_downtime__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::SignedBlocksWindow => { + if signed_blocks_window__.is_some() { + return Err(serde::de::Error::duplicate_field( + "signedBlocksWindow", + )); + } + signed_blocks_window__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::MinSignedPerWindow => { + if min_signed_per_window__.is_some() { + return Err(serde::de::Error::duplicate_field( + "minSignedPerWindow", + )); + } + min_signed_per_window__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::DowntimeJailDuration => { + if downtime_jail_duration__.is_some() { + return Err(serde::de::Error::duplicate_field( + "downtimeJailDuration", + )); + } + downtime_jail_duration__ = map.next_value()?; + } + GeneratedField::SlashFractionDoubleSign => { + if slash_fraction_double_sign__.is_some() { + return Err(serde::de::Error::duplicate_field( + "slashFractionDoubleSign", + )); + } + slash_fraction_double_sign__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::SlashFractionDowntime => { + if slash_fraction_downtime__.is_some() { + return Err(serde::de::Error::duplicate_field( + "slashFractionDowntime", + )); + } + slash_fraction_downtime__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Params { + signed_blocks_window: signed_blocks_window__.unwrap_or_default(), + min_signed_per_window: min_signed_per_window__.unwrap_or_default(), + downtime_jail_duration: downtime_jail_duration__, + slash_fraction_double_sign: slash_fraction_double_sign__.unwrap_or_default(), + slash_fraction_downtime: slash_fraction_downtime__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.slashing.v1beta1.Params", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.QueryParamsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryParamsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { params: params__ }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySigningInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.cons_address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.QuerySigningInfoRequest", len)?; + if !self.cons_address.is_empty() { + struct_ser.serialize_field("consAddress", &self.cons_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySigningInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["cons_address", "consAddress"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ConsAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "consAddress" | "cons_address" => Ok(GeneratedField::ConsAddress), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySigningInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.QuerySigningInfoRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut cons_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ConsAddress => { + if cons_address__.is_some() { + return Err(serde::de::Error::duplicate_field("consAddress")); + } + cons_address__ = Some(map.next_value()?); + } + } + } + Ok(QuerySigningInfoRequest { + cons_address: cons_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.QuerySigningInfoRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySigningInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.val_signing_info.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.QuerySigningInfoResponse", len)?; + if let Some(v) = self.val_signing_info.as_ref() { + struct_ser.serialize_field("valSigningInfo", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySigningInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["val_signing_info", "valSigningInfo"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValSigningInfo, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "valSigningInfo" | "val_signing_info" => { + Ok(GeneratedField::ValSigningInfo) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySigningInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.QuerySigningInfoResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut val_signing_info__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValSigningInfo => { + if val_signing_info__.is_some() { + return Err(serde::de::Error::duplicate_field("valSigningInfo")); + } + val_signing_info__ = map.next_value()?; + } + } + } + Ok(QuerySigningInfoResponse { + val_signing_info: val_signing_info__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.QuerySigningInfoResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySigningInfosRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.QuerySigningInfosRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySigningInfosRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySigningInfosRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.QuerySigningInfosRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QuerySigningInfosRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.QuerySigningInfosRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySigningInfosResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.info.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.slashing.v1beta1.QuerySigningInfosResponse", len)?; + if !self.info.is_empty() { + struct_ser.serialize_field("info", &self.info)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySigningInfosResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["info", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Info, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "info" => Ok(GeneratedField::Info), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySigningInfosResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.QuerySigningInfosResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut info__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Info => { + if info__.is_some() { + return Err(serde::de::Error::duplicate_field("info")); + } + info__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QuerySigningInfosResponse { + info: info__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.QuerySigningInfosResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SigningInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.validator_signing_info.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.SigningInfo", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.validator_signing_info.as_ref() { + struct_ser.serialize_field("validatorSigningInfo", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SigningInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "validator_signing_info", "validatorSigningInfo"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + ValidatorSigningInfo, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "validatorSigningInfo" | "validator_signing_info" => { + Ok(GeneratedField::ValidatorSigningInfo) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SigningInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.SigningInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut validator_signing_info__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorSigningInfo => { + if validator_signing_info__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorSigningInfo", + )); + } + validator_signing_info__ = map.next_value()?; + } + } + } + Ok(SigningInfo { + address: address__.unwrap_or_default(), + validator_signing_info: validator_signing_info__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.SigningInfo", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorMissedBlocks { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.missed_blocks.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.ValidatorMissedBlocks", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.missed_blocks.is_empty() { + struct_ser.serialize_field("missedBlocks", &self.missed_blocks)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorMissedBlocks { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "missed_blocks", "missedBlocks"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + MissedBlocks, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "missedBlocks" | "missed_blocks" => Ok(GeneratedField::MissedBlocks), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorMissedBlocks; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.ValidatorMissedBlocks") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut missed_blocks__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::MissedBlocks => { + if missed_blocks__.is_some() { + return Err(serde::de::Error::duplicate_field("missedBlocks")); + } + missed_blocks__ = Some(map.next_value()?); + } + } + } + Ok(ValidatorMissedBlocks { + address: address__.unwrap_or_default(), + missed_blocks: missed_blocks__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.ValidatorMissedBlocks", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValidatorSigningInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.start_height != 0 { + len += 1; + } + if self.index_offset != 0 { + len += 1; + } + if self.jailed_until.is_some() { + len += 1; + } + if self.tombstoned { + len += 1; + } + if self.missed_blocks_counter != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.slashing.v1beta1.ValidatorSigningInfo", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if self.start_height != 0 { + struct_ser.serialize_field( + "startHeight", + ToString::to_string(&self.start_height).as_str(), + )?; + } + if self.index_offset != 0 { + struct_ser.serialize_field( + "indexOffset", + ToString::to_string(&self.index_offset).as_str(), + )?; + } + if let Some(v) = self.jailed_until.as_ref() { + struct_ser.serialize_field("jailedUntil", v)?; + } + if self.tombstoned { + struct_ser.serialize_field("tombstoned", &self.tombstoned)?; + } + if self.missed_blocks_counter != 0 { + struct_ser.serialize_field( + "missedBlocksCounter", + ToString::to_string(&self.missed_blocks_counter).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + "start_height", + "startHeight", + "index_offset", + "indexOffset", + "jailed_until", + "jailedUntil", + "tombstoned", + "missed_blocks_counter", + "missedBlocksCounter", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + StartHeight, + IndexOffset, + JailedUntil, + Tombstoned, + MissedBlocksCounter, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "startHeight" | "start_height" => Ok(GeneratedField::StartHeight), + "indexOffset" | "index_offset" => Ok(GeneratedField::IndexOffset), + "jailedUntil" | "jailed_until" => Ok(GeneratedField::JailedUntil), + "tombstoned" => Ok(GeneratedField::Tombstoned), + "missedBlocksCounter" | "missed_blocks_counter" => { + Ok(GeneratedField::MissedBlocksCounter) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorSigningInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.slashing.v1beta1.ValidatorSigningInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut start_height__ = None; + let mut index_offset__ = None; + let mut jailed_until__ = None; + let mut tombstoned__ = None; + let mut missed_blocks_counter__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::StartHeight => { + if start_height__.is_some() { + return Err(serde::de::Error::duplicate_field("startHeight")); + } + start_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::IndexOffset => { + if index_offset__.is_some() { + return Err(serde::de::Error::duplicate_field("indexOffset")); + } + index_offset__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::JailedUntil => { + if jailed_until__.is_some() { + return Err(serde::de::Error::duplicate_field("jailedUntil")); + } + jailed_until__ = map.next_value()?; + } + GeneratedField::Tombstoned => { + if tombstoned__.is_some() { + return Err(serde::de::Error::duplicate_field("tombstoned")); + } + tombstoned__ = Some(map.next_value()?); + } + GeneratedField::MissedBlocksCounter => { + if missed_blocks_counter__.is_some() { + return Err(serde::de::Error::duplicate_field( + "missedBlocksCounter", + )); + } + missed_blocks_counter__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(ValidatorSigningInfo { + address: address__.unwrap_or_default(), + start_height: start_height__.unwrap_or_default(), + index_offset: index_offset__.unwrap_or_default(), + jailed_until: jailed_until__, + tombstoned: tombstoned__.unwrap_or_default(), + missed_blocks_counter: missed_blocks_counter__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.slashing.v1beta1.ValidatorSigningInfo", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs index 0695b59e..2d7d9d5a 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs @@ -783,5 +783,6 @@ pub struct MsgCancelUnbondingDelegation { /// Since: cosmos-sdk 0.46 #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUnbondingDelegationResponse {} +include!("cosmos.staking.v1beta1.serde.rs"); include!("cosmos.staking.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs new file mode 100644 index 00000000..d628fbef --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs @@ -0,0 +1,8228 @@ +// @generated +impl serde::Serialize for AuthorizationType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED", + Self::Delegate => "AUTHORIZATION_TYPE_DELEGATE", + Self::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", + Self::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for AuthorizationType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "AUTHORIZATION_TYPE_UNSPECIFIED", + "AUTHORIZATION_TYPE_DELEGATE", + "AUTHORIZATION_TYPE_UNDELEGATE", + "AUTHORIZATION_TYPE_REDELEGATE", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AuthorizationType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(AuthorizationType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(AuthorizationType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "AUTHORIZATION_TYPE_UNSPECIFIED" => Ok(AuthorizationType::Unspecified), + "AUTHORIZATION_TYPE_DELEGATE" => Ok(AuthorizationType::Delegate), + "AUTHORIZATION_TYPE_UNDELEGATE" => Ok(AuthorizationType::Undelegate), + "AUTHORIZATION_TYPE_REDELEGATE" => Ok(AuthorizationType::Redelegate), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for BondStatus { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "BOND_STATUS_UNSPECIFIED", + Self::Unbonded => "BOND_STATUS_UNBONDED", + Self::Unbonding => "BOND_STATUS_UNBONDING", + Self::Bonded => "BOND_STATUS_BONDED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for BondStatus { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "BOND_STATUS_UNSPECIFIED", + "BOND_STATUS_UNBONDED", + "BOND_STATUS_UNBONDING", + "BOND_STATUS_BONDED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BondStatus; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(BondStatus::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(BondStatus::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "BOND_STATUS_UNSPECIFIED" => Ok(BondStatus::Unspecified), + "BOND_STATUS_UNBONDED" => Ok(BondStatus::Unbonded), + "BOND_STATUS_UNBONDING" => Ok(BondStatus::Unbonding), + "BOND_STATUS_BONDED" => Ok(BondStatus::Bonded), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for Commission { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.commission_rates.is_some() { + len += 1; + } + if self.update_time.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.Commission", len)?; + if let Some(v) = self.commission_rates.as_ref() { + struct_ser.serialize_field("commissionRates", v)?; + } + if let Some(v) = self.update_time.as_ref() { + struct_ser.serialize_field("updateTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Commission { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "commission_rates", + "commissionRates", + "update_time", + "updateTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CommissionRates, + UpdateTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "commissionRates" | "commission_rates" => { + Ok(GeneratedField::CommissionRates) + } + "updateTime" | "update_time" => Ok(GeneratedField::UpdateTime), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Commission; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.Commission") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut commission_rates__ = None; + let mut update_time__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CommissionRates => { + if commission_rates__.is_some() { + return Err(serde::de::Error::duplicate_field("commissionRates")); + } + commission_rates__ = map.next_value()?; + } + GeneratedField::UpdateTime => { + if update_time__.is_some() { + return Err(serde::de::Error::duplicate_field("updateTime")); + } + update_time__ = map.next_value()?; + } + } + } + Ok(Commission { + commission_rates: commission_rates__, + update_time: update_time__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.Commission", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for CommissionRates { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.rate.is_empty() { + len += 1; + } + if !self.max_rate.is_empty() { + len += 1; + } + if !self.max_change_rate.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.CommissionRates", len)?; + if !self.rate.is_empty() { + struct_ser.serialize_field("rate", &self.rate)?; + } + if !self.max_rate.is_empty() { + struct_ser.serialize_field("maxRate", &self.max_rate)?; + } + if !self.max_change_rate.is_empty() { + struct_ser.serialize_field("maxChangeRate", &self.max_change_rate)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CommissionRates { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "rate", + "max_rate", + "maxRate", + "max_change_rate", + "maxChangeRate", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Rate, + MaxRate, + MaxChangeRate, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "rate" => Ok(GeneratedField::Rate), + "maxRate" | "max_rate" => Ok(GeneratedField::MaxRate), + "maxChangeRate" | "max_change_rate" => { + Ok(GeneratedField::MaxChangeRate) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CommissionRates; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.CommissionRates") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut rate__ = None; + let mut max_rate__ = None; + let mut max_change_rate__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Rate => { + if rate__.is_some() { + return Err(serde::de::Error::duplicate_field("rate")); + } + rate__ = Some(map.next_value()?); + } + GeneratedField::MaxRate => { + if max_rate__.is_some() { + return Err(serde::de::Error::duplicate_field("maxRate")); + } + max_rate__ = Some(map.next_value()?); + } + GeneratedField::MaxChangeRate => { + if max_change_rate__.is_some() { + return Err(serde::de::Error::duplicate_field("maxChangeRate")); + } + max_change_rate__ = Some(map.next_value()?); + } + } + } + Ok(CommissionRates { + rate: rate__.unwrap_or_default(), + max_rate: max_rate__.unwrap_or_default(), + max_change_rate: max_change_rate__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.CommissionRates", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for DvPair { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.DVPair", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DvPair { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DvPair; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.DVPair") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } + } + Ok(DvPair { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.staking.v1beta1.DVPair", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DvPairs { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.pairs.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.DVPairs", len)?; + if !self.pairs.is_empty() { + struct_ser.serialize_field("pairs", &self.pairs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DvPairs { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pairs"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pairs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pairs" => Ok(GeneratedField::Pairs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DvPairs; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.DVPairs") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pairs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pairs => { + if pairs__.is_some() { + return Err(serde::de::Error::duplicate_field("pairs")); + } + pairs__ = Some(map.next_value()?); + } + } + } + Ok(DvPairs { + pairs: pairs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.staking.v1beta1.DVPairs", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DvvTriplet { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_src_address.is_empty() { + len += 1; + } + if !self.validator_dst_address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.DVVTriplet", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_src_address.is_empty() { + struct_ser.serialize_field("validatorSrcAddress", &self.validator_src_address)?; + } + if !self.validator_dst_address.is_empty() { + struct_ser.serialize_field("validatorDstAddress", &self.validator_dst_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DvvTriplet { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_src_address", + "validatorSrcAddress", + "validator_dst_address", + "validatorDstAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorSrcAddress, + ValidatorDstAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorSrcAddress" | "validator_src_address" => { + Ok(GeneratedField::ValidatorSrcAddress) + } + "validatorDstAddress" | "validator_dst_address" => { + Ok(GeneratedField::ValidatorDstAddress) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DvvTriplet; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.DVVTriplet") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_src_address__ = None; + let mut validator_dst_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorSrcAddress => { + if validator_src_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorSrcAddress", + )); + } + validator_src_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorDstAddress => { + if validator_dst_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorDstAddress", + )); + } + validator_dst_address__ = Some(map.next_value()?); + } + } + } + Ok(DvvTriplet { + delegator_address: delegator_address__.unwrap_or_default(), + validator_src_address: validator_src_address__.unwrap_or_default(), + validator_dst_address: validator_dst_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.DVVTriplet", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for DvvTriplets { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.triplets.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.DVVTriplets", len)?; + if !self.triplets.is_empty() { + struct_ser.serialize_field("triplets", &self.triplets)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DvvTriplets { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["triplets"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Triplets, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "triplets" => Ok(GeneratedField::Triplets), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DvvTriplets; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.DVVTriplets") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut triplets__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Triplets => { + if triplets__.is_some() { + return Err(serde::de::Error::duplicate_field("triplets")); + } + triplets__ = Some(map.next_value()?); + } + } + } + Ok(DvvTriplets { + triplets: triplets__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.DVVTriplets", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Delegation { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + if !self.shares.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.Delegation", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if !self.shares.is_empty() { + struct_ser.serialize_field("shares", &self.shares)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Delegation { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + "shares", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + Shares, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "shares" => Ok(GeneratedField::Shares), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Delegation; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.Delegation") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + let mut shares__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Shares => { + if shares__.is_some() { + return Err(serde::de::Error::duplicate_field("shares")); + } + shares__ = Some(map.next_value()?); + } + } + } + Ok(Delegation { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + shares: shares__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.Delegation", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for DelegationResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.delegation.is_some() { + len += 1; + } + if self.balance.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.DelegationResponse", len)?; + if let Some(v) = self.delegation.as_ref() { + struct_ser.serialize_field("delegation", v)?; + } + if let Some(v) = self.balance.as_ref() { + struct_ser.serialize_field("balance", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DelegationResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegation", "balance"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Delegation, + Balance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegation" => Ok(GeneratedField::Delegation), + "balance" => Ok(GeneratedField::Balance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DelegationResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.DelegationResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegation__ = None; + let mut balance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Delegation => { + if delegation__.is_some() { + return Err(serde::de::Error::duplicate_field("delegation")); + } + delegation__ = map.next_value()?; + } + GeneratedField::Balance => { + if balance__.is_some() { + return Err(serde::de::Error::duplicate_field("balance")); + } + balance__ = map.next_value()?; + } + } + } + Ok(DelegationResponse { + delegation: delegation__, + balance: balance__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.DelegationResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Description { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.moniker.is_empty() { + len += 1; + } + if !self.identity.is_empty() { + len += 1; + } + if !self.website.is_empty() { + len += 1; + } + if !self.security_contact.is_empty() { + len += 1; + } + if !self.details.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.Description", len)?; + if !self.moniker.is_empty() { + struct_ser.serialize_field("moniker", &self.moniker)?; + } + if !self.identity.is_empty() { + struct_ser.serialize_field("identity", &self.identity)?; + } + if !self.website.is_empty() { + struct_ser.serialize_field("website", &self.website)?; + } + if !self.security_contact.is_empty() { + struct_ser.serialize_field("securityContact", &self.security_contact)?; + } + if !self.details.is_empty() { + struct_ser.serialize_field("details", &self.details)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Description { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "moniker", + "identity", + "website", + "security_contact", + "securityContact", + "details", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Moniker, + Identity, + Website, + SecurityContact, + Details, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "moniker" => Ok(GeneratedField::Moniker), + "identity" => Ok(GeneratedField::Identity), + "website" => Ok(GeneratedField::Website), + "securityContact" | "security_contact" => { + Ok(GeneratedField::SecurityContact) + } + "details" => Ok(GeneratedField::Details), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Description; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.Description") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut moniker__ = None; + let mut identity__ = None; + let mut website__ = None; + let mut security_contact__ = None; + let mut details__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Moniker => { + if moniker__.is_some() { + return Err(serde::de::Error::duplicate_field("moniker")); + } + moniker__ = Some(map.next_value()?); + } + GeneratedField::Identity => { + if identity__.is_some() { + return Err(serde::de::Error::duplicate_field("identity")); + } + identity__ = Some(map.next_value()?); + } + GeneratedField::Website => { + if website__.is_some() { + return Err(serde::de::Error::duplicate_field("website")); + } + website__ = Some(map.next_value()?); + } + GeneratedField::SecurityContact => { + if security_contact__.is_some() { + return Err(serde::de::Error::duplicate_field("securityContact")); + } + security_contact__ = Some(map.next_value()?); + } + GeneratedField::Details => { + if details__.is_some() { + return Err(serde::de::Error::duplicate_field("details")); + } + details__ = Some(map.next_value()?); + } + } + } + Ok(Description { + moniker: moniker__.unwrap_or_default(), + identity: identity__.unwrap_or_default(), + website: website__.unwrap_or_default(), + security_contact: security_contact__.unwrap_or_default(), + details: details__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.Description", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + if !self.last_total_power.is_empty() { + len += 1; + } + if !self.last_validator_powers.is_empty() { + len += 1; + } + if !self.validators.is_empty() { + len += 1; + } + if !self.delegations.is_empty() { + len += 1; + } + if !self.unbonding_delegations.is_empty() { + len += 1; + } + if !self.redelegations.is_empty() { + len += 1; + } + if self.exported { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.GenesisState", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + if !self.last_total_power.is_empty() { + struct_ser.serialize_field( + "lastTotalPower", + pbjson::private::base64::encode(&self.last_total_power).as_str(), + )?; + } + if !self.last_validator_powers.is_empty() { + struct_ser.serialize_field("lastValidatorPowers", &self.last_validator_powers)?; + } + if !self.validators.is_empty() { + struct_ser.serialize_field("validators", &self.validators)?; + } + if !self.delegations.is_empty() { + struct_ser.serialize_field("delegations", &self.delegations)?; + } + if !self.unbonding_delegations.is_empty() { + struct_ser.serialize_field("unbondingDelegations", &self.unbonding_delegations)?; + } + if !self.redelegations.is_empty() { + struct_ser.serialize_field("redelegations", &self.redelegations)?; + } + if self.exported { + struct_ser.serialize_field("exported", &self.exported)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "params", + "last_total_power", + "lastTotalPower", + "last_validator_powers", + "lastValidatorPowers", + "validators", + "delegations", + "unbonding_delegations", + "unbondingDelegations", + "redelegations", + "exported", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + LastTotalPower, + LastValidatorPowers, + Validators, + Delegations, + UnbondingDelegations, + Redelegations, + Exported, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "params" => Ok(GeneratedField::Params), + "lastTotalPower" | "last_total_power" => { + Ok(GeneratedField::LastTotalPower) + } + "lastValidatorPowers" | "last_validator_powers" => { + Ok(GeneratedField::LastValidatorPowers) + } + "validators" => Ok(GeneratedField::Validators), + "delegations" => Ok(GeneratedField::Delegations), + "unbondingDelegations" | "unbonding_delegations" => { + Ok(GeneratedField::UnbondingDelegations) + } + "redelegations" => Ok(GeneratedField::Redelegations), + "exported" => Ok(GeneratedField::Exported), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.GenesisState") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + let mut last_total_power__ = None; + let mut last_validator_powers__ = None; + let mut validators__ = None; + let mut delegations__ = None; + let mut unbonding_delegations__ = None; + let mut redelegations__ = None; + let mut exported__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + GeneratedField::LastTotalPower => { + if last_total_power__.is_some() { + return Err(serde::de::Error::duplicate_field("lastTotalPower")); + } + last_total_power__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::LastValidatorPowers => { + if last_validator_powers__.is_some() { + return Err(serde::de::Error::duplicate_field( + "lastValidatorPowers", + )); + } + last_validator_powers__ = Some(map.next_value()?); + } + GeneratedField::Validators => { + if validators__.is_some() { + return Err(serde::de::Error::duplicate_field("validators")); + } + validators__ = Some(map.next_value()?); + } + GeneratedField::Delegations => { + if delegations__.is_some() { + return Err(serde::de::Error::duplicate_field("delegations")); + } + delegations__ = Some(map.next_value()?); + } + GeneratedField::UnbondingDelegations => { + if unbonding_delegations__.is_some() { + return Err(serde::de::Error::duplicate_field( + "unbondingDelegations", + )); + } + unbonding_delegations__ = Some(map.next_value()?); + } + GeneratedField::Redelegations => { + if redelegations__.is_some() { + return Err(serde::de::Error::duplicate_field("redelegations")); + } + redelegations__ = Some(map.next_value()?); + } + GeneratedField::Exported => { + if exported__.is_some() { + return Err(serde::de::Error::duplicate_field("exported")); + } + exported__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + params: params__, + last_total_power: last_total_power__.unwrap_or_default(), + last_validator_powers: last_validator_powers__.unwrap_or_default(), + validators: validators__.unwrap_or_default(), + delegations: delegations__.unwrap_or_default(), + unbonding_delegations: unbonding_delegations__.unwrap_or_default(), + redelegations: redelegations__.unwrap_or_default(), + exported: exported__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.GenesisState", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for HistoricalInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.header.is_some() { + len += 1; + } + if !self.valset.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.HistoricalInfo", len)?; + if let Some(v) = self.header.as_ref() { + struct_ser.serialize_field("header", v)?; + } + if !self.valset.is_empty() { + struct_ser.serialize_field("valset", &self.valset)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for HistoricalInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["header", "valset"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Header, + Valset, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "header" => Ok(GeneratedField::Header), + "valset" => Ok(GeneratedField::Valset), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = HistoricalInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.HistoricalInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut header__ = None; + let mut valset__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Header => { + if header__.is_some() { + return Err(serde::de::Error::duplicate_field("header")); + } + header__ = map.next_value()?; + } + GeneratedField::Valset => { + if valset__.is_some() { + return Err(serde::de::Error::duplicate_field("valset")); + } + valset__ = Some(map.next_value()?); + } + } + } + Ok(HistoricalInfo { + header: header__, + valset: valset__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.HistoricalInfo", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for LastValidatorPower { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.power != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.LastValidatorPower", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if self.power != 0 { + struct_ser.serialize_field("power", ToString::to_string(&self.power).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for LastValidatorPower { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "power"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Power, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "power" => Ok(GeneratedField::Power), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = LastValidatorPower; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.LastValidatorPower") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut power__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Power => { + if power__.is_some() { + return Err(serde::de::Error::duplicate_field("power")); + } + power__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(LastValidatorPower { + address: address__.unwrap_or_default(), + power: power__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.LastValidatorPower", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgBeginRedelegate { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_src_address.is_empty() { + len += 1; + } + if !self.validator_dst_address.is_empty() { + len += 1; + } + if self.amount.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.MsgBeginRedelegate", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_src_address.is_empty() { + struct_ser.serialize_field("validatorSrcAddress", &self.validator_src_address)?; + } + if !self.validator_dst_address.is_empty() { + struct_ser.serialize_field("validatorDstAddress", &self.validator_dst_address)?; + } + if let Some(v) = self.amount.as_ref() { + struct_ser.serialize_field("amount", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_src_address", + "validatorSrcAddress", + "validator_dst_address", + "validatorDstAddress", + "amount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorSrcAddress, + ValidatorDstAddress, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorSrcAddress" | "validator_src_address" => { + Ok(GeneratedField::ValidatorSrcAddress) + } + "validatorDstAddress" | "validator_dst_address" => { + Ok(GeneratedField::ValidatorDstAddress) + } + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgBeginRedelegate; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgBeginRedelegate") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_src_address__ = None; + let mut validator_dst_address__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorSrcAddress => { + if validator_src_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorSrcAddress", + )); + } + validator_src_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorDstAddress => { + if validator_dst_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorDstAddress", + )); + } + validator_dst_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = map.next_value()?; + } + } + } + Ok(MsgBeginRedelegate { + delegator_address: delegator_address__.unwrap_or_default(), + validator_src_address: validator_src_address__.unwrap_or_default(), + validator_dst_address: validator_dst_address__.unwrap_or_default(), + amount: amount__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgBeginRedelegate", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgBeginRedelegateResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.completion_time.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.staking.v1beta1.MsgBeginRedelegateResponse", len)?; + if let Some(v) = self.completion_time.as_ref() { + struct_ser.serialize_field("completionTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["completion_time", "completionTime"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CompletionTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "completionTime" | "completion_time" => { + Ok(GeneratedField::CompletionTime) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgBeginRedelegateResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgBeginRedelegateResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut completion_time__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CompletionTime => { + if completion_time__.is_some() { + return Err(serde::de::Error::duplicate_field("completionTime")); + } + completion_time__ = map.next_value()?; + } + } + } + Ok(MsgBeginRedelegateResponse { + completion_time: completion_time__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgBeginRedelegateResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCancelUnbondingDelegation { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + if self.amount.is_some() { + len += 1; + } + if self.creation_height != 0 { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if let Some(v) = self.amount.as_ref() { + struct_ser.serialize_field("amount", v)?; + } + if self.creation_height != 0 { + struct_ser.serialize_field( + "creationHeight", + ToString::to_string(&self.creation_height).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + "amount", + "creation_height", + "creationHeight", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + Amount, + CreationHeight, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "amount" => Ok(GeneratedField::Amount), + "creationHeight" | "creation_height" => { + Ok(GeneratedField::CreationHeight) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCancelUnbondingDelegation; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgCancelUnbondingDelegation") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + let mut amount__ = None; + let mut creation_height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = map.next_value()?; + } + GeneratedField::CreationHeight => { + if creation_height__.is_some() { + return Err(serde::de::Error::duplicate_field("creationHeight")); + } + creation_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgCancelUnbondingDelegation { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + amount: amount__, + creation_height: creation_height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCancelUnbondingDelegationResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgCancelUnbondingDelegationResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgCancelUnbondingDelegationResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreateValidator { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.description.is_some() { + len += 1; + } + if self.commission.is_some() { + len += 1; + } + if !self.min_self_delegation.is_empty() { + len += 1; + } + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + if self.pubkey.is_some() { + len += 1; + } + if self.value.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.MsgCreateValidator", len)?; + if let Some(v) = self.description.as_ref() { + struct_ser.serialize_field("description", v)?; + } + if let Some(v) = self.commission.as_ref() { + struct_ser.serialize_field("commission", v)?; + } + if !self.min_self_delegation.is_empty() { + struct_ser.serialize_field("minSelfDelegation", &self.min_self_delegation)?; + } + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if let Some(v) = self.pubkey.as_ref() { + struct_ser.serialize_field("pubkey", v)?; + } + if let Some(v) = self.value.as_ref() { + struct_ser.serialize_field("value", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateValidator { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "description", + "commission", + "min_self_delegation", + "minSelfDelegation", + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + "pubkey", + "value", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Description, + Commission, + MinSelfDelegation, + DelegatorAddress, + ValidatorAddress, + Pubkey, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "description" => Ok(GeneratedField::Description), + "commission" => Ok(GeneratedField::Commission), + "minSelfDelegation" | "min_self_delegation" => { + Ok(GeneratedField::MinSelfDelegation) + } + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "pubkey" => Ok(GeneratedField::Pubkey), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreateValidator; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgCreateValidator") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut description__ = None; + let mut commission__ = None; + let mut min_self_delegation__ = None; + let mut delegator_address__ = None; + let mut validator_address__ = None; + let mut pubkey__ = None; + let mut value__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = map.next_value()?; + } + GeneratedField::Commission => { + if commission__.is_some() { + return Err(serde::de::Error::duplicate_field("commission")); + } + commission__ = map.next_value()?; + } + GeneratedField::MinSelfDelegation => { + if min_self_delegation__.is_some() { + return Err(serde::de::Error::duplicate_field("minSelfDelegation")); + } + min_self_delegation__ = Some(map.next_value()?); + } + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Pubkey => { + if pubkey__.is_some() { + return Err(serde::de::Error::duplicate_field("pubkey")); + } + pubkey__ = map.next_value()?; + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = map.next_value()?; + } + } + } + Ok(MsgCreateValidator { + description: description__, + commission: commission__, + min_self_delegation: min_self_delegation__.unwrap_or_default(), + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + pubkey: pubkey__, + value: value__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgCreateValidator", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreateValidatorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.staking.v1beta1.MsgCreateValidatorResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgCreateValidatorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgCreateValidatorResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgCreateValidatorResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgCreateValidatorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgDelegate { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + if self.amount.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.MsgDelegate", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if let Some(v) = self.amount.as_ref() { + struct_ser.serialize_field("amount", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgDelegate { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + "amount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgDelegate; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgDelegate") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = map.next_value()?; + } + } + } + Ok(MsgDelegate { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + amount: amount__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgDelegate", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgDelegateResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.MsgDelegateResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgDelegateResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgDelegateResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgDelegateResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgDelegateResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgEditValidator { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.description.is_some() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + if !self.commission_rate.is_empty() { + len += 1; + } + if !self.min_self_delegation.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.MsgEditValidator", len)?; + if let Some(v) = self.description.as_ref() { + struct_ser.serialize_field("description", v)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if !self.commission_rate.is_empty() { + struct_ser.serialize_field("commissionRate", &self.commission_rate)?; + } + if !self.min_self_delegation.is_empty() { + struct_ser.serialize_field("minSelfDelegation", &self.min_self_delegation)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgEditValidator { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "description", + "validator_address", + "validatorAddress", + "commission_rate", + "commissionRate", + "min_self_delegation", + "minSelfDelegation", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Description, + ValidatorAddress, + CommissionRate, + MinSelfDelegation, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "description" => Ok(GeneratedField::Description), + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "commissionRate" | "commission_rate" => { + Ok(GeneratedField::CommissionRate) + } + "minSelfDelegation" | "min_self_delegation" => { + Ok(GeneratedField::MinSelfDelegation) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgEditValidator; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgEditValidator") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut description__ = None; + let mut validator_address__ = None; + let mut commission_rate__ = None; + let mut min_self_delegation__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = map.next_value()?; + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::CommissionRate => { + if commission_rate__.is_some() { + return Err(serde::de::Error::duplicate_field("commissionRate")); + } + commission_rate__ = Some(map.next_value()?); + } + GeneratedField::MinSelfDelegation => { + if min_self_delegation__.is_some() { + return Err(serde::de::Error::duplicate_field("minSelfDelegation")); + } + min_self_delegation__ = Some(map.next_value()?); + } + } + } + Ok(MsgEditValidator { + description: description__, + validator_address: validator_address__.unwrap_or_default(), + commission_rate: commission_rate__.unwrap_or_default(), + min_self_delegation: min_self_delegation__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgEditValidator", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgEditValidatorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.MsgEditValidatorResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgEditValidatorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgEditValidatorResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgEditValidatorResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgEditValidatorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUndelegate { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + if self.amount.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.MsgUndelegate", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if let Some(v) = self.amount.as_ref() { + struct_ser.serialize_field("amount", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUndelegate { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + "amount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUndelegate; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgUndelegate") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = map.next_value()?; + } + } + } + Ok(MsgUndelegate { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + amount: amount__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgUndelegate", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUndelegateResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.completion_time.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.MsgUndelegateResponse", len)?; + if let Some(v) = self.completion_time.as_ref() { + struct_ser.serialize_field("completionTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["completion_time", "completionTime"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CompletionTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "completionTime" | "completion_time" => { + Ok(GeneratedField::CompletionTime) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUndelegateResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.MsgUndelegateResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut completion_time__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CompletionTime => { + if completion_time__.is_some() { + return Err(serde::de::Error::duplicate_field("completionTime")); + } + completion_time__ = map.next_value()?; + } + } + } + Ok(MsgUndelegateResponse { + completion_time: completion_time__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.MsgUndelegateResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Params { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.unbonding_time.is_some() { + len += 1; + } + if self.max_validators != 0 { + len += 1; + } + if self.max_entries != 0 { + len += 1; + } + if self.historical_entries != 0 { + len += 1; + } + if !self.bond_denom.is_empty() { + len += 1; + } + if !self.min_commission_rate.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Params", len)?; + if let Some(v) = self.unbonding_time.as_ref() { + struct_ser.serialize_field("unbondingTime", v)?; + } + if self.max_validators != 0 { + struct_ser.serialize_field("maxValidators", &self.max_validators)?; + } + if self.max_entries != 0 { + struct_ser.serialize_field("maxEntries", &self.max_entries)?; + } + if self.historical_entries != 0 { + struct_ser.serialize_field("historicalEntries", &self.historical_entries)?; + } + if !self.bond_denom.is_empty() { + struct_ser.serialize_field("bondDenom", &self.bond_denom)?; + } + if !self.min_commission_rate.is_empty() { + struct_ser.serialize_field("minCommissionRate", &self.min_commission_rate)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Params { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "unbonding_time", + "unbondingTime", + "max_validators", + "maxValidators", + "max_entries", + "maxEntries", + "historical_entries", + "historicalEntries", + "bond_denom", + "bondDenom", + "min_commission_rate", + "minCommissionRate", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + UnbondingTime, + MaxValidators, + MaxEntries, + HistoricalEntries, + BondDenom, + MinCommissionRate, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "unbondingTime" | "unbonding_time" => Ok(GeneratedField::UnbondingTime), + "maxValidators" | "max_validators" => Ok(GeneratedField::MaxValidators), + "maxEntries" | "max_entries" => Ok(GeneratedField::MaxEntries), + "historicalEntries" | "historical_entries" => { + Ok(GeneratedField::HistoricalEntries) + } + "bondDenom" | "bond_denom" => Ok(GeneratedField::BondDenom), + "minCommissionRate" | "min_commission_rate" => { + Ok(GeneratedField::MinCommissionRate) + } + _ => 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 std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.Params") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut unbonding_time__ = None; + let mut max_validators__ = None; + let mut max_entries__ = None; + let mut historical_entries__ = None; + let mut bond_denom__ = None; + let mut min_commission_rate__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::UnbondingTime => { + if unbonding_time__.is_some() { + return Err(serde::de::Error::duplicate_field("unbondingTime")); + } + unbonding_time__ = map.next_value()?; + } + GeneratedField::MaxValidators => { + if max_validators__.is_some() { + return Err(serde::de::Error::duplicate_field("maxValidators")); + } + max_validators__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::MaxEntries => { + if max_entries__.is_some() { + return Err(serde::de::Error::duplicate_field("maxEntries")); + } + max_entries__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::HistoricalEntries => { + if historical_entries__.is_some() { + return Err(serde::de::Error::duplicate_field("historicalEntries")); + } + historical_entries__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::BondDenom => { + if bond_denom__.is_some() { + return Err(serde::de::Error::duplicate_field("bondDenom")); + } + bond_denom__ = Some(map.next_value()?); + } + GeneratedField::MinCommissionRate => { + if min_commission_rate__.is_some() { + return Err(serde::de::Error::duplicate_field("minCommissionRate")); + } + min_commission_rate__ = Some(map.next_value()?); + } + } + } + Ok(Params { + unbonding_time: unbonding_time__, + max_validators: max_validators__.unwrap_or_default(), + max_entries: max_entries__.unwrap_or_default(), + historical_entries: historical_entries__.unwrap_or_default(), + bond_denom: bond_denom__.unwrap_or_default(), + min_commission_rate: min_commission_rate__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.staking.v1beta1.Params", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Pool { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.not_bonded_tokens.is_empty() { + len += 1; + } + if !self.bonded_tokens.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.Pool", len)?; + if !self.not_bonded_tokens.is_empty() { + struct_ser.serialize_field("notBondedTokens", &self.not_bonded_tokens)?; + } + if !self.bonded_tokens.is_empty() { + struct_ser.serialize_field("bondedTokens", &self.bonded_tokens)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Pool { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "not_bonded_tokens", + "notBondedTokens", + "bonded_tokens", + "bondedTokens", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + NotBondedTokens, + BondedTokens, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "notBondedTokens" | "not_bonded_tokens" => { + Ok(GeneratedField::NotBondedTokens) + } + "bondedTokens" | "bonded_tokens" => Ok(GeneratedField::BondedTokens), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Pool; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.Pool") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut not_bonded_tokens__ = None; + let mut bonded_tokens__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::NotBondedTokens => { + if not_bonded_tokens__.is_some() { + return Err(serde::de::Error::duplicate_field("notBondedTokens")); + } + not_bonded_tokens__ = Some(map.next_value()?); + } + GeneratedField::BondedTokens => { + if bonded_tokens__.is_some() { + return Err(serde::de::Error::duplicate_field("bondedTokens")); + } + bonded_tokens__ = Some(map.next_value()?); + } + } + } + Ok(Pool { + not_bonded_tokens: not_bonded_tokens__.unwrap_or_default(), + bonded_tokens: bonded_tokens__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.staking.v1beta1.Pool", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryDelegationRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_addr.is_empty() { + len += 1; + } + if !self.validator_addr.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegationRequest", len)?; + if !self.delegator_addr.is_empty() { + struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; + } + if !self.validator_addr.is_empty() { + struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_addr", + "delegatorAddr", + "validator_addr", + "validatorAddr", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddr, + ValidatorAddr, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), + "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegationRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegationRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_addr__ = None; + let mut validator_addr__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddr => { + if delegator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddr")); + } + delegator_addr__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddr => { + if validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddr")); + } + validator_addr__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegationRequest { + delegator_addr: delegator_addr__.unwrap_or_default(), + validator_addr: validator_addr__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegationRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegationResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.delegation_response.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryDelegationResponse", len)?; + if let Some(v) = self.delegation_response.as_ref() { + struct_ser.serialize_field("delegationResponse", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegation_response", "delegationResponse"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegationResponse, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegationResponse" | "delegation_response" => { + Ok(GeneratedField::DelegationResponse) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegationResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegationResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegation_response__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegationResponse => { + if delegation_response__.is_some() { + return Err(serde::de::Error::duplicate_field( + "delegationResponse", + )); + } + delegation_response__ = map.next_value()?; + } + } + } + Ok(QueryDelegationResponse { + delegation_response: delegation_response__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegationResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorDelegationsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_addr.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", + len, + )?; + if !self.delegator_addr.is_empty() { + struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegator_addr", "delegatorAddr", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddr, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorDelegationsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_addr__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddr => { + if delegator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddr")); + } + delegator_addr__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDelegatorDelegationsRequest { + delegator_addr: delegator_addr__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorDelegationsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegation_responses.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", + len, + )?; + if !self.delegation_responses.is_empty() { + struct_ser.serialize_field("delegationResponses", &self.delegation_responses)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegation_responses", "delegationResponses", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegationResponses, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegationResponses" | "delegation_responses" => { + Ok(GeneratedField::DelegationResponses) + } + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorDelegationsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegation_responses__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegationResponses => { + if delegation_responses__.is_some() { + return Err(serde::de::Error::duplicate_field( + "delegationResponses", + )); + } + delegation_responses__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDelegatorDelegationsResponse { + delegation_responses: delegation_responses__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorUnbondingDelegationsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_addr.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", + len, + )?; + if !self.delegator_addr.is_empty() { + struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegator_addr", "delegatorAddr", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddr, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorUnbondingDelegationsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_addr__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddr => { + if delegator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddr")); + } + delegator_addr__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDelegatorUnbondingDelegationsRequest { + delegator_addr: delegator_addr__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorUnbondingDelegationsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.unbonding_responses.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", + len, + )?; + if !self.unbonding_responses.is_empty() { + struct_ser.serialize_field("unbondingResponses", &self.unbonding_responses)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["unbonding_responses", "unbondingResponses", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + UnbondingResponses, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "unbondingResponses" | "unbonding_responses" => { + Ok(GeneratedField::UnbondingResponses) + } + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorUnbondingDelegationsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut unbonding_responses__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::UnbondingResponses => { + if unbonding_responses__.is_some() { + return Err(serde::de::Error::duplicate_field( + "unbondingResponses", + )); + } + unbonding_responses__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDelegatorUnbondingDelegationsResponse { + unbonding_responses: unbonding_responses__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorValidatorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_addr.is_empty() { + len += 1; + } + if !self.validator_addr.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", len)?; + if !self.delegator_addr.is_empty() { + struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; + } + if !self.validator_addr.is_empty() { + struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_addr", + "delegatorAddr", + "validator_addr", + "validatorAddr", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddr, + ValidatorAddr, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), + "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorValidatorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorValidatorRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_addr__ = None; + let mut validator_addr__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddr => { + if delegator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddr")); + } + delegator_addr__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddr => { + if validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddr")); + } + validator_addr__ = Some(map.next_value()?); + } + } + } + Ok(QueryDelegatorValidatorRequest { + delegator_addr: delegator_addr__.unwrap_or_default(), + validator_addr: validator_addr__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorValidatorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.validator.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", + len, + )?; + if let Some(v) = self.validator.as_ref() { + struct_ser.serialize_field("validator", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Validator, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validator" => Ok(GeneratedField::Validator), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorValidatorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorValidatorResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Validator => { + if validator__.is_some() { + return Err(serde::de::Error::duplicate_field("validator")); + } + validator__ = map.next_value()?; + } + } + } + Ok(QueryDelegatorValidatorResponse { + validator: validator__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorValidatorsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_addr.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", + len, + )?; + if !self.delegator_addr.is_empty() { + struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegator_addr", "delegatorAddr", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddr, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorValidatorsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_addr__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddr => { + if delegator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddr")); + } + delegator_addr__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDelegatorValidatorsRequest { + delegator_addr: delegator_addr__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryDelegatorValidatorsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validators.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", + len, + )?; + if !self.validators.is_empty() { + struct_ser.serialize_field("validators", &self.validators)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validators", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Validators, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validators" => Ok(GeneratedField::Validators), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDelegatorValidatorsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validators__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Validators => { + if validators__.is_some() { + return Err(serde::de::Error::duplicate_field("validators")); + } + validators__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryDelegatorValidatorsResponse { + validators: validators__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryHistoricalInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.staking.v1beta1.QueryHistoricalInfoRequest", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["height"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryHistoricalInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryHistoricalInfoRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryHistoricalInfoRequest { + height: height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryHistoricalInfoRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryHistoricalInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.hist.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.staking.v1beta1.QueryHistoricalInfoResponse", len)?; + if let Some(v) = self.hist.as_ref() { + struct_ser.serialize_field("hist", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["hist"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Hist, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "hist" => Ok(GeneratedField::Hist), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryHistoricalInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryHistoricalInfoResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut hist__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Hist => { + if hist__.is_some() { + return Err(serde::de::Error::duplicate_field("hist")); + } + hist__ = map.next_value()?; + } + } + } + Ok(QueryHistoricalInfoResponse { hist: hist__ }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryHistoricalInfoResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryParamsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryParamsRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryParamsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryParamsResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map.next_value()?; + } + } + } + Ok(QueryParamsResponse { params: params__ }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryPoolRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryPoolRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryPoolRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryPoolRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryPoolRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryPoolRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryPoolRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryPoolResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pool.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryPoolResponse", len)?; + if let Some(v) = self.pool.as_ref() { + struct_ser.serialize_field("pool", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryPoolResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pool"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pool, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pool" => Ok(GeneratedField::Pool), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryPoolResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryPoolResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pool__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pool => { + if pool__.is_some() { + return Err(serde::de::Error::duplicate_field("pool")); + } + pool__ = map.next_value()?; + } + } + } + Ok(QueryPoolResponse { pool: pool__ }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryPoolResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryRedelegationsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_addr.is_empty() { + len += 1; + } + if !self.src_validator_addr.is_empty() { + len += 1; + } + if !self.dst_validator_addr.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryRedelegationsRequest", len)?; + if !self.delegator_addr.is_empty() { + struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; + } + if !self.src_validator_addr.is_empty() { + struct_ser.serialize_field("srcValidatorAddr", &self.src_validator_addr)?; + } + if !self.dst_validator_addr.is_empty() { + struct_ser.serialize_field("dstValidatorAddr", &self.dst_validator_addr)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_addr", + "delegatorAddr", + "src_validator_addr", + "srcValidatorAddr", + "dst_validator_addr", + "dstValidatorAddr", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddr, + SrcValidatorAddr, + DstValidatorAddr, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), + "srcValidatorAddr" | "src_validator_addr" => { + Ok(GeneratedField::SrcValidatorAddr) + } + "dstValidatorAddr" | "dst_validator_addr" => { + Ok(GeneratedField::DstValidatorAddr) + } + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryRedelegationsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryRedelegationsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_addr__ = None; + let mut src_validator_addr__ = None; + let mut dst_validator_addr__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddr => { + if delegator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddr")); + } + delegator_addr__ = Some(map.next_value()?); + } + GeneratedField::SrcValidatorAddr => { + if src_validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("srcValidatorAddr")); + } + src_validator_addr__ = Some(map.next_value()?); + } + GeneratedField::DstValidatorAddr => { + if dst_validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("dstValidatorAddr")); + } + dst_validator_addr__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryRedelegationsRequest { + delegator_addr: delegator_addr__.unwrap_or_default(), + src_validator_addr: src_validator_addr__.unwrap_or_default(), + dst_validator_addr: dst_validator_addr__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryRedelegationsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryRedelegationsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.redelegation_responses.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.staking.v1beta1.QueryRedelegationsResponse", len)?; + if !self.redelegation_responses.is_empty() { + struct_ser.serialize_field("redelegationResponses", &self.redelegation_responses)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "redelegation_responses", + "redelegationResponses", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RedelegationResponses, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "redelegationResponses" | "redelegation_responses" => { + Ok(GeneratedField::RedelegationResponses) + } + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryRedelegationsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryRedelegationsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut redelegation_responses__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::RedelegationResponses => { + if redelegation_responses__.is_some() { + return Err(serde::de::Error::duplicate_field( + "redelegationResponses", + )); + } + redelegation_responses__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryRedelegationsResponse { + redelegation_responses: redelegation_responses__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryRedelegationsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryUnbondingDelegationRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_addr.is_empty() { + len += 1; + } + if !self.validator_addr.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", + len, + )?; + if !self.delegator_addr.is_empty() { + struct_ser.serialize_field("delegatorAddr", &self.delegator_addr)?; + } + if !self.validator_addr.is_empty() { + struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_addr", + "delegatorAddr", + "validator_addr", + "validatorAddr", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddr, + ValidatorAddr, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddr" | "delegator_addr" => Ok(GeneratedField::DelegatorAddr), + "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryUnbondingDelegationRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryUnbondingDelegationRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_addr__ = None; + let mut validator_addr__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddr => { + if delegator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddr")); + } + delegator_addr__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddr => { + if validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddr")); + } + validator_addr__ = Some(map.next_value()?); + } + } + } + Ok(QueryUnbondingDelegationRequest { + delegator_addr: delegator_addr__.unwrap_or_default(), + validator_addr: validator_addr__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryUnbondingDelegationResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.unbond.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", + len, + )?; + if let Some(v) = self.unbond.as_ref() { + struct_ser.serialize_field("unbond", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["unbond"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Unbond, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "unbond" => Ok(GeneratedField::Unbond), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryUnbondingDelegationResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.staking.v1beta1.QueryUnbondingDelegationResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut unbond__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Unbond => { + if unbond__.is_some() { + return Err(serde::de::Error::duplicate_field("unbond")); + } + unbond__ = map.next_value()?; + } + } + } + Ok(QueryUnbondingDelegationResponse { unbond: unbond__ }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorDelegationsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_addr.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", + len, + )?; + if !self.validator_addr.is_empty() { + struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_addr", "validatorAddr", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddr, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorDelegationsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.staking.v1beta1.QueryValidatorDelegationsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_addr__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddr => { + if validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddr")); + } + validator_addr__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryValidatorDelegationsRequest { + validator_addr: validator_addr__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorDelegationsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegation_responses.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", + len, + )?; + if !self.delegation_responses.is_empty() { + struct_ser.serialize_field("delegationResponses", &self.delegation_responses)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["delegation_responses", "delegationResponses", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegationResponses, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegationResponses" | "delegation_responses" => { + Ok(GeneratedField::DelegationResponses) + } + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorDelegationsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.staking.v1beta1.QueryValidatorDelegationsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegation_responses__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegationResponses => { + if delegation_responses__.is_some() { + return Err(serde::de::Error::duplicate_field( + "delegationResponses", + )); + } + delegation_responses__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryValidatorDelegationsResponse { + delegation_responses: delegation_responses__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_addr.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorRequest", len)?; + if !self.validator_addr.is_empty() { + struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_addr", "validatorAddr"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddr, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_addr__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddr => { + if validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddr")); + } + validator_addr__ = Some(map.next_value()?); + } + } + } + Ok(QueryValidatorRequest { + validator_addr: validator_addr__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryValidatorRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.validator.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorResponse", len)?; + if let Some(v) = self.validator.as_ref() { + struct_ser.serialize_field("validator", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Validator, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validator" => Ok(GeneratedField::Validator), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Validator => { + if validator__.is_some() { + return Err(serde::de::Error::duplicate_field("validator")); + } + validator__ = map.next_value()?; + } + } + } + Ok(QueryValidatorResponse { + validator: validator__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryValidatorResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorUnbondingDelegationsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_addr.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", + len, + )?; + if !self.validator_addr.is_empty() { + struct_ser.serialize_field("validatorAddr", &self.validator_addr)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validator_addr", "validatorAddr", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddr, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddr" | "validator_addr" => Ok(GeneratedField::ValidatorAddr), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorUnbondingDelegationsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_addr__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddr => { + if validator_addr__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddr")); + } + validator_addr__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryValidatorUnbondingDelegationsRequest { + validator_addr: validator_addr__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorUnbondingDelegationsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.unbonding_responses.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", + len, + )?; + if !self.unbonding_responses.is_empty() { + struct_ser.serialize_field("unbondingResponses", &self.unbonding_responses)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["unbonding_responses", "unbondingResponses", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + UnbondingResponses, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "unbondingResponses" | "unbonding_responses" => { + Ok(GeneratedField::UnbondingResponses) + } + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorUnbondingDelegationsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut unbonding_responses__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::UnbondingResponses => { + if unbonding_responses__.is_some() { + return Err(serde::de::Error::duplicate_field( + "unbondingResponses", + )); + } + unbonding_responses__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryValidatorUnbondingDelegationsResponse { + unbonding_responses: unbonding_responses__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.status.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorsRequest", len)?; + if !self.status.is_empty() { + struct_ser.serialize_field("status", &self.status)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["status", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Status, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "status" => Ok(GeneratedField::Status), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut status__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); + } + status__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryValidatorsRequest { + status: status__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryValidatorsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryValidatorsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validators.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.QueryValidatorsResponse", len)?; + if !self.validators.is_empty() { + struct_ser.serialize_field("validators", &self.validators)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["validators", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Validators, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validators" => Ok(GeneratedField::Validators), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryValidatorsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.QueryValidatorsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validators__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Validators => { + if validators__.is_some() { + return Err(serde::de::Error::duplicate_field("validators")); + } + validators__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryValidatorsResponse { + validators: validators__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.QueryValidatorsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Redelegation { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_src_address.is_empty() { + len += 1; + } + if !self.validator_dst_address.is_empty() { + len += 1; + } + if !self.entries.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.Redelegation", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_src_address.is_empty() { + struct_ser.serialize_field("validatorSrcAddress", &self.validator_src_address)?; + } + if !self.validator_dst_address.is_empty() { + struct_ser.serialize_field("validatorDstAddress", &self.validator_dst_address)?; + } + if !self.entries.is_empty() { + struct_ser.serialize_field("entries", &self.entries)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Redelegation { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_src_address", + "validatorSrcAddress", + "validator_dst_address", + "validatorDstAddress", + "entries", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorSrcAddress, + ValidatorDstAddress, + Entries, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorSrcAddress" | "validator_src_address" => { + Ok(GeneratedField::ValidatorSrcAddress) + } + "validatorDstAddress" | "validator_dst_address" => { + Ok(GeneratedField::ValidatorDstAddress) + } + "entries" => Ok(GeneratedField::Entries), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Redelegation; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.Redelegation") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_src_address__ = None; + let mut validator_dst_address__ = None; + let mut entries__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorSrcAddress => { + if validator_src_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorSrcAddress", + )); + } + validator_src_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorDstAddress => { + if validator_dst_address__.is_some() { + return Err(serde::de::Error::duplicate_field( + "validatorDstAddress", + )); + } + validator_dst_address__ = Some(map.next_value()?); + } + GeneratedField::Entries => { + if entries__.is_some() { + return Err(serde::de::Error::duplicate_field("entries")); + } + entries__ = Some(map.next_value()?); + } + } + } + Ok(Redelegation { + delegator_address: delegator_address__.unwrap_or_default(), + validator_src_address: validator_src_address__.unwrap_or_default(), + validator_dst_address: validator_dst_address__.unwrap_or_default(), + entries: entries__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.Redelegation", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for RedelegationEntry { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.creation_height != 0 { + len += 1; + } + if self.completion_time.is_some() { + len += 1; + } + if !self.initial_balance.is_empty() { + len += 1; + } + if !self.shares_dst.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.RedelegationEntry", len)?; + if self.creation_height != 0 { + struct_ser.serialize_field( + "creationHeight", + ToString::to_string(&self.creation_height).as_str(), + )?; + } + if let Some(v) = self.completion_time.as_ref() { + struct_ser.serialize_field("completionTime", v)?; + } + if !self.initial_balance.is_empty() { + struct_ser.serialize_field("initialBalance", &self.initial_balance)?; + } + if !self.shares_dst.is_empty() { + struct_ser.serialize_field("sharesDst", &self.shares_dst)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RedelegationEntry { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "creation_height", + "creationHeight", + "completion_time", + "completionTime", + "initial_balance", + "initialBalance", + "shares_dst", + "sharesDst", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CreationHeight, + CompletionTime, + InitialBalance, + SharesDst, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "creationHeight" | "creation_height" => { + Ok(GeneratedField::CreationHeight) + } + "completionTime" | "completion_time" => { + Ok(GeneratedField::CompletionTime) + } + "initialBalance" | "initial_balance" => { + Ok(GeneratedField::InitialBalance) + } + "sharesDst" | "shares_dst" => Ok(GeneratedField::SharesDst), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RedelegationEntry; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.RedelegationEntry") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut creation_height__ = None; + let mut completion_time__ = None; + let mut initial_balance__ = None; + let mut shares_dst__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CreationHeight => { + if creation_height__.is_some() { + return Err(serde::de::Error::duplicate_field("creationHeight")); + } + creation_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::CompletionTime => { + if completion_time__.is_some() { + return Err(serde::de::Error::duplicate_field("completionTime")); + } + completion_time__ = map.next_value()?; + } + GeneratedField::InitialBalance => { + if initial_balance__.is_some() { + return Err(serde::de::Error::duplicate_field("initialBalance")); + } + initial_balance__ = Some(map.next_value()?); + } + GeneratedField::SharesDst => { + if shares_dst__.is_some() { + return Err(serde::de::Error::duplicate_field("sharesDst")); + } + shares_dst__ = Some(map.next_value()?); + } + } + } + Ok(RedelegationEntry { + creation_height: creation_height__.unwrap_or_default(), + completion_time: completion_time__, + initial_balance: initial_balance__.unwrap_or_default(), + shares_dst: shares_dst__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.RedelegationEntry", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for RedelegationEntryResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.redelegation_entry.is_some() { + len += 1; + } + if !self.balance.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.RedelegationEntryResponse", len)?; + if let Some(v) = self.redelegation_entry.as_ref() { + struct_ser.serialize_field("redelegationEntry", v)?; + } + if !self.balance.is_empty() { + struct_ser.serialize_field("balance", &self.balance)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["redelegation_entry", "redelegationEntry", "balance"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RedelegationEntry, + Balance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "redelegationEntry" | "redelegation_entry" => { + Ok(GeneratedField::RedelegationEntry) + } + "balance" => Ok(GeneratedField::Balance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RedelegationEntryResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.RedelegationEntryResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut redelegation_entry__ = None; + let mut balance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::RedelegationEntry => { + if redelegation_entry__.is_some() { + return Err(serde::de::Error::duplicate_field("redelegationEntry")); + } + redelegation_entry__ = map.next_value()?; + } + GeneratedField::Balance => { + if balance__.is_some() { + return Err(serde::de::Error::duplicate_field("balance")); + } + balance__ = Some(map.next_value()?); + } + } + } + Ok(RedelegationEntryResponse { + redelegation_entry: redelegation_entry__, + balance: balance__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.RedelegationEntryResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for RedelegationResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.redelegation.is_some() { + len += 1; + } + if !self.entries.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.RedelegationResponse", len)?; + if let Some(v) = self.redelegation.as_ref() { + struct_ser.serialize_field("redelegation", v)?; + } + if !self.entries.is_empty() { + struct_ser.serialize_field("entries", &self.entries)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RedelegationResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["redelegation", "entries"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Redelegation, + Entries, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "redelegation" => Ok(GeneratedField::Redelegation), + "entries" => Ok(GeneratedField::Entries), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RedelegationResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.RedelegationResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut redelegation__ = None; + let mut entries__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Redelegation => { + if redelegation__.is_some() { + return Err(serde::de::Error::duplicate_field("redelegation")); + } + redelegation__ = map.next_value()?; + } + GeneratedField::Entries => { + if entries__.is_some() { + return Err(serde::de::Error::duplicate_field("entries")); + } + entries__ = Some(map.next_value()?); + } + } + } + Ok(RedelegationResponse { + redelegation: redelegation__, + entries: entries__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.RedelegationResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for StakeAuthorization { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.max_tokens.is_some() { + len += 1; + } + if self.authorization_type != 0 { + len += 1; + } + if self.validators.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.StakeAuthorization", len)?; + if let Some(v) = self.max_tokens.as_ref() { + struct_ser.serialize_field("maxTokens", v)?; + } + if self.authorization_type != 0 { + let v = AuthorizationType::from_i32(self.authorization_type).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.authorization_type)) + })?; + struct_ser.serialize_field("authorizationType", &v)?; + } + if let Some(v) = self.validators.as_ref() { + match v { + stake_authorization::Validators::AllowList(v) => { + struct_ser.serialize_field("allowList", v)?; + } + stake_authorization::Validators::DenyList(v) => { + struct_ser.serialize_field("denyList", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for StakeAuthorization { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "max_tokens", + "maxTokens", + "authorization_type", + "authorizationType", + "allow_list", + "allowList", + "deny_list", + "denyList", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + MaxTokens, + AuthorizationType, + AllowList, + DenyList, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "maxTokens" | "max_tokens" => Ok(GeneratedField::MaxTokens), + "authorizationType" | "authorization_type" => { + Ok(GeneratedField::AuthorizationType) + } + "allowList" | "allow_list" => Ok(GeneratedField::AllowList), + "denyList" | "deny_list" => Ok(GeneratedField::DenyList), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StakeAuthorization; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.StakeAuthorization") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut max_tokens__ = None; + let mut authorization_type__ = None; + let mut validators__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::MaxTokens => { + if max_tokens__.is_some() { + return Err(serde::de::Error::duplicate_field("maxTokens")); + } + max_tokens__ = map.next_value()?; + } + GeneratedField::AuthorizationType => { + if authorization_type__.is_some() { + return Err(serde::de::Error::duplicate_field("authorizationType")); + } + authorization_type__ = + Some(map.next_value::()? as i32); + } + GeneratedField::AllowList => { + if validators__.is_some() { + return Err(serde::de::Error::duplicate_field("allowList")); + } + validators__ = map + .next_value::<::std::option::Option<_>>()? + .map(stake_authorization::Validators::AllowList); + } + GeneratedField::DenyList => { + if validators__.is_some() { + return Err(serde::de::Error::duplicate_field("denyList")); + } + validators__ = map + .next_value::<::std::option::Option<_>>()? + .map(stake_authorization::Validators::DenyList); + } + } + } + Ok(StakeAuthorization { + max_tokens: max_tokens__, + authorization_type: authorization_type__.unwrap_or_default(), + validators: validators__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.StakeAuthorization", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for stake_authorization::Validators { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.staking.v1beta1.StakeAuthorization.Validators", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = stake_authorization::Validators; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.StakeAuthorization.Validators") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(stake_authorization::Validators { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.StakeAuthorization.Validators", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for UnbondingDelegation { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.delegator_address.is_empty() { + len += 1; + } + if !self.validator_address.is_empty() { + len += 1; + } + if !self.entries.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.UnbondingDelegation", len)?; + if !self.delegator_address.is_empty() { + struct_ser.serialize_field("delegatorAddress", &self.delegator_address)?; + } + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if !self.entries.is_empty() { + struct_ser.serialize_field("entries", &self.entries)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for UnbondingDelegation { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "delegator_address", + "delegatorAddress", + "validator_address", + "validatorAddress", + "entries", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DelegatorAddress, + ValidatorAddress, + Entries, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "delegatorAddress" | "delegator_address" => { + Ok(GeneratedField::DelegatorAddress) + } + "validatorAddress" | "validator_address" => { + Ok(GeneratedField::ValidatorAddress) + } + "entries" => Ok(GeneratedField::Entries), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = UnbondingDelegation; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.UnbondingDelegation") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut delegator_address__ = None; + let mut validator_address__ = None; + let mut entries__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DelegatorAddress => { + if delegator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorAddress")); + } + delegator_address__ = Some(map.next_value()?); + } + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::Entries => { + if entries__.is_some() { + return Err(serde::de::Error::duplicate_field("entries")); + } + entries__ = Some(map.next_value()?); + } + } + } + Ok(UnbondingDelegation { + delegator_address: delegator_address__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + entries: entries__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.UnbondingDelegation", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for UnbondingDelegationEntry { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.creation_height != 0 { + len += 1; + } + if self.completion_time.is_some() { + len += 1; + } + if !self.initial_balance.is_empty() { + len += 1; + } + if !self.balance.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.UnbondingDelegationEntry", len)?; + if self.creation_height != 0 { + struct_ser.serialize_field( + "creationHeight", + ToString::to_string(&self.creation_height).as_str(), + )?; + } + if let Some(v) = self.completion_time.as_ref() { + struct_ser.serialize_field("completionTime", v)?; + } + if !self.initial_balance.is_empty() { + struct_ser.serialize_field("initialBalance", &self.initial_balance)?; + } + if !self.balance.is_empty() { + struct_ser.serialize_field("balance", &self.balance)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "creation_height", + "creationHeight", + "completion_time", + "completionTime", + "initial_balance", + "initialBalance", + "balance", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CreationHeight, + CompletionTime, + InitialBalance, + Balance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "creationHeight" | "creation_height" => { + Ok(GeneratedField::CreationHeight) + } + "completionTime" | "completion_time" => { + Ok(GeneratedField::CompletionTime) + } + "initialBalance" | "initial_balance" => { + Ok(GeneratedField::InitialBalance) + } + "balance" => Ok(GeneratedField::Balance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = UnbondingDelegationEntry; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.UnbondingDelegationEntry") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut creation_height__ = None; + let mut completion_time__ = None; + let mut initial_balance__ = None; + let mut balance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CreationHeight => { + if creation_height__.is_some() { + return Err(serde::de::Error::duplicate_field("creationHeight")); + } + creation_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::CompletionTime => { + if completion_time__.is_some() { + return Err(serde::de::Error::duplicate_field("completionTime")); + } + completion_time__ = map.next_value()?; + } + GeneratedField::InitialBalance => { + if initial_balance__.is_some() { + return Err(serde::de::Error::duplicate_field("initialBalance")); + } + initial_balance__ = Some(map.next_value()?); + } + GeneratedField::Balance => { + if balance__.is_some() { + return Err(serde::de::Error::duplicate_field("balance")); + } + balance__ = Some(map.next_value()?); + } + } + } + Ok(UnbondingDelegationEntry { + creation_height: creation_height__.unwrap_or_default(), + completion_time: completion_time__, + initial_balance: initial_balance__.unwrap_or_default(), + balance: balance__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.UnbondingDelegationEntry", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ValAddresses { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.addresses.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.ValAddresses", len)?; + if !self.addresses.is_empty() { + struct_ser.serialize_field("addresses", &self.addresses)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValAddresses { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["addresses"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Addresses, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "addresses" => Ok(GeneratedField::Addresses), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValAddresses; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.ValAddresses") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut addresses__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Addresses => { + if addresses__.is_some() { + return Err(serde::de::Error::duplicate_field("addresses")); + } + addresses__ = Some(map.next_value()?); + } + } + } + Ok(ValAddresses { + addresses: addresses__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.ValAddresses", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Validator { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.operator_address.is_empty() { + len += 1; + } + if self.consensus_pubkey.is_some() { + len += 1; + } + if self.jailed { + len += 1; + } + if self.status != 0 { + len += 1; + } + if !self.tokens.is_empty() { + len += 1; + } + if !self.delegator_shares.is_empty() { + len += 1; + } + if self.description.is_some() { + len += 1; + } + if self.unbonding_height != 0 { + len += 1; + } + if self.unbonding_time.is_some() { + len += 1; + } + if self.commission.is_some() { + len += 1; + } + if !self.min_self_delegation.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.staking.v1beta1.Validator", len)?; + if !self.operator_address.is_empty() { + struct_ser.serialize_field("operatorAddress", &self.operator_address)?; + } + if let Some(v) = self.consensus_pubkey.as_ref() { + struct_ser.serialize_field("consensusPubkey", v)?; + } + if self.jailed { + struct_ser.serialize_field("jailed", &self.jailed)?; + } + if self.status != 0 { + let v = BondStatus::from_i32(self.status).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.status)) + })?; + struct_ser.serialize_field("status", &v)?; + } + if !self.tokens.is_empty() { + struct_ser.serialize_field("tokens", &self.tokens)?; + } + if !self.delegator_shares.is_empty() { + struct_ser.serialize_field("delegatorShares", &self.delegator_shares)?; + } + if let Some(v) = self.description.as_ref() { + struct_ser.serialize_field("description", v)?; + } + if self.unbonding_height != 0 { + struct_ser.serialize_field( + "unbondingHeight", + ToString::to_string(&self.unbonding_height).as_str(), + )?; + } + if let Some(v) = self.unbonding_time.as_ref() { + struct_ser.serialize_field("unbondingTime", v)?; + } + if let Some(v) = self.commission.as_ref() { + struct_ser.serialize_field("commission", v)?; + } + if !self.min_self_delegation.is_empty() { + struct_ser.serialize_field("minSelfDelegation", &self.min_self_delegation)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Validator { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "operator_address", + "operatorAddress", + "consensus_pubkey", + "consensusPubkey", + "jailed", + "status", + "tokens", + "delegator_shares", + "delegatorShares", + "description", + "unbonding_height", + "unbondingHeight", + "unbonding_time", + "unbondingTime", + "commission", + "min_self_delegation", + "minSelfDelegation", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + OperatorAddress, + ConsensusPubkey, + Jailed, + Status, + Tokens, + DelegatorShares, + Description, + UnbondingHeight, + UnbondingTime, + Commission, + MinSelfDelegation, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "operatorAddress" | "operator_address" => { + Ok(GeneratedField::OperatorAddress) + } + "consensusPubkey" | "consensus_pubkey" => { + Ok(GeneratedField::ConsensusPubkey) + } + "jailed" => Ok(GeneratedField::Jailed), + "status" => Ok(GeneratedField::Status), + "tokens" => Ok(GeneratedField::Tokens), + "delegatorShares" | "delegator_shares" => { + Ok(GeneratedField::DelegatorShares) + } + "description" => Ok(GeneratedField::Description), + "unbondingHeight" | "unbonding_height" => { + Ok(GeneratedField::UnbondingHeight) + } + "unbondingTime" | "unbonding_time" => Ok(GeneratedField::UnbondingTime), + "commission" => Ok(GeneratedField::Commission), + "minSelfDelegation" | "min_self_delegation" => { + Ok(GeneratedField::MinSelfDelegation) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Validator; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.staking.v1beta1.Validator") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut operator_address__ = None; + let mut consensus_pubkey__ = None; + let mut jailed__ = None; + let mut status__ = None; + let mut tokens__ = None; + let mut delegator_shares__ = None; + let mut description__ = None; + let mut unbonding_height__ = None; + let mut unbonding_time__ = None; + let mut commission__ = None; + let mut min_self_delegation__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::OperatorAddress => { + if operator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("operatorAddress")); + } + operator_address__ = Some(map.next_value()?); + } + GeneratedField::ConsensusPubkey => { + if consensus_pubkey__.is_some() { + return Err(serde::de::Error::duplicate_field("consensusPubkey")); + } + consensus_pubkey__ = map.next_value()?; + } + GeneratedField::Jailed => { + if jailed__.is_some() { + return Err(serde::de::Error::duplicate_field("jailed")); + } + jailed__ = Some(map.next_value()?); + } + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); + } + status__ = Some(map.next_value::()? as i32); + } + GeneratedField::Tokens => { + if tokens__.is_some() { + return Err(serde::de::Error::duplicate_field("tokens")); + } + tokens__ = Some(map.next_value()?); + } + GeneratedField::DelegatorShares => { + if delegator_shares__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatorShares")); + } + delegator_shares__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = map.next_value()?; + } + GeneratedField::UnbondingHeight => { + if unbonding_height__.is_some() { + return Err(serde::de::Error::duplicate_field("unbondingHeight")); + } + unbonding_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::UnbondingTime => { + if unbonding_time__.is_some() { + return Err(serde::de::Error::duplicate_field("unbondingTime")); + } + unbonding_time__ = map.next_value()?; + } + GeneratedField::Commission => { + if commission__.is_some() { + return Err(serde::de::Error::duplicate_field("commission")); + } + commission__ = map.next_value()?; + } + GeneratedField::MinSelfDelegation => { + if min_self_delegation__.is_some() { + return Err(serde::de::Error::duplicate_field("minSelfDelegation")); + } + min_self_delegation__ = Some(map.next_value()?); + } + } + } + Ok(Validator { + operator_address: operator_address__.unwrap_or_default(), + consensus_pubkey: consensus_pubkey__, + jailed: jailed__.unwrap_or_default(), + status: status__.unwrap_or_default(), + tokens: tokens__.unwrap_or_default(), + delegator_shares: delegator_shares__.unwrap_or_default(), + description: description__, + unbonding_height: unbonding_height__.unwrap_or_default(), + unbonding_time: unbonding_time__, + commission: commission__, + min_self_delegation: min_self_delegation__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.staking.v1beta1.Validator", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs index ef809f20..1493cf16 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs @@ -127,4 +127,5 @@ impl SignMode { } } } +include!("cosmos.tx.signing.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs new file mode 100644 index 00000000..ea3d0f45 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs @@ -0,0 +1,679 @@ +// @generated +impl serde::Serialize for SignMode { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "SIGN_MODE_UNSPECIFIED", + Self::Direct => "SIGN_MODE_DIRECT", + Self::Textual => "SIGN_MODE_TEXTUAL", + Self::DirectAux => "SIGN_MODE_DIRECT_AUX", + Self::LegacyAminoJson => "SIGN_MODE_LEGACY_AMINO_JSON", + Self::Eip191 => "SIGN_MODE_EIP_191", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for SignMode { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "SIGN_MODE_UNSPECIFIED", + "SIGN_MODE_DIRECT", + "SIGN_MODE_TEXTUAL", + "SIGN_MODE_DIRECT_AUX", + "SIGN_MODE_LEGACY_AMINO_JSON", + "SIGN_MODE_EIP_191", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignMode; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(SignMode::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(SignMode::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "SIGN_MODE_UNSPECIFIED" => Ok(SignMode::Unspecified), + "SIGN_MODE_DIRECT" => Ok(SignMode::Direct), + "SIGN_MODE_TEXTUAL" => Ok(SignMode::Textual), + "SIGN_MODE_DIRECT_AUX" => Ok(SignMode::DirectAux), + "SIGN_MODE_LEGACY_AMINO_JSON" => Ok(SignMode::LegacyAminoJson), + "SIGN_MODE_EIP_191" => Ok(SignMode::Eip191), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for SignatureDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.public_key.is_some() { + len += 1; + } + if self.data.is_some() { + len += 1; + } + if self.sequence != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor", len)?; + if let Some(v) = self.public_key.as_ref() { + struct_ser.serialize_field("publicKey", v)?; + } + if let Some(v) = self.data.as_ref() { + struct_ser.serialize_field("data", v)?; + } + if self.sequence != 0 { + struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignatureDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["public_key", "publicKey", "data", "sequence"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PublicKey, + Data, + Sequence, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "data" => Ok(GeneratedField::Data), + "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 = SignatureDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut public_key__ = None; + let mut data__ = None; + let mut sequence__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = map.next_value()?; + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = 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(SignatureDescriptor { + public_key: public_key__, + data: data__, + sequence: sequence__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.signing.v1beta1.SignatureDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for signature_descriptor::Data { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.sum.is_some() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptor.Data", len)?; + if let Some(v) = self.sum.as_ref() { + match v { + signature_descriptor::data::Sum::Single(v) => { + struct_ser.serialize_field("single", v)?; + } + signature_descriptor::data::Sum::Multi(v) => { + struct_ser.serialize_field("multi", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["single", "multi"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Single, + Multi, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "single" => Ok(GeneratedField::Single), + "multi" => Ok(GeneratedField::Multi), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = signature_descriptor::Data; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor.Data") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sum__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Single => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("single")); + } + sum__ = map + .next_value::<::std::option::Option<_>>()? + .map(signature_descriptor::data::Sum::Single); + } + GeneratedField::Multi => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("multi")); + } + sum__ = map + .next_value::<::std::option::Option<_>>()? + .map(signature_descriptor::data::Sum::Multi); + } + } + } + Ok(signature_descriptor::Data { sum: sum__ }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for signature_descriptor::data::Multi { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.bitarray.is_some() { + len += 1; + } + if !self.signatures.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi", + len, + )?; + if let Some(v) = self.bitarray.as_ref() { + struct_ser.serialize_field("bitarray", v)?; + } + if !self.signatures.is_empty() { + struct_ser.serialize_field("signatures", &self.signatures)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["bitarray", "signatures"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Bitarray, + Signatures, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "bitarray" => Ok(GeneratedField::Bitarray), + "signatures" => Ok(GeneratedField::Signatures), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = signature_descriptor::data::Multi; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut bitarray__ = None; + let mut signatures__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Bitarray => { + if bitarray__.is_some() { + return Err(serde::de::Error::duplicate_field("bitarray")); + } + bitarray__ = map.next_value()?; + } + GeneratedField::Signatures => { + if signatures__.is_some() { + return Err(serde::de::Error::duplicate_field("signatures")); + } + signatures__ = Some(map.next_value()?); + } + } + } + Ok(signature_descriptor::data::Multi { + bitarray: bitarray__, + signatures: signatures__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for signature_descriptor::data::Single { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.mode != 0 { + len += 1; + } + if !self.signature.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single", + len, + )?; + if self.mode != 0 { + let v = SignMode::from_i32(self.mode).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.mode)) + })?; + struct_ser.serialize_field("mode", &v)?; + } + if !self.signature.is_empty() { + struct_ser.serialize_field( + "signature", + pbjson::private::base64::encode(&self.signature).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["mode", "signature"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Mode, + Signature, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "mode" => Ok(GeneratedField::Mode), + "signature" => Ok(GeneratedField::Signature), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = signature_descriptor::data::Single; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut mode__ = None; + let mut signature__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Mode => { + if mode__.is_some() { + return Err(serde::de::Error::duplicate_field("mode")); + } + mode__ = Some(map.next_value::()? as i32); + } + GeneratedField::Signature => { + if signature__.is_some() { + return Err(serde::de::Error::duplicate_field("signature")); + } + signature__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(signature_descriptor::data::Single { + mode: mode__.unwrap_or_default(), + signature: signature__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SignatureDescriptors { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.signatures.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.signing.v1beta1.SignatureDescriptors", len)?; + if !self.signatures.is_empty() { + struct_ser.serialize_field("signatures", &self.signatures)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignatureDescriptors { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["signatures"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Signatures, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "signatures" => Ok(GeneratedField::Signatures), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignatureDescriptors; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptors") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signatures__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Signatures => { + if signatures__.is_some() { + return Err(serde::de::Error::duplicate_field("signatures")); + } + signatures__ = Some(map.next_value()?); + } + } + } + Ok(SignatureDescriptors { + signatures: signatures__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.signing.v1beta1.SignatureDescriptors", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs index 7bf8ca08..99871069 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs @@ -454,5 +454,6 @@ impl BroadcastMode { } } } +include!("cosmos.tx.v1beta1.serde.rs"); include!("cosmos.tx.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs new file mode 100644 index 00000000..ee984e1d --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs @@ -0,0 +1,3220 @@ +// @generated +impl serde::Serialize for AuthInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.signer_infos.is_empty() { + len += 1; + } + if self.fee.is_some() { + len += 1; + } + if self.tip.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.AuthInfo", len)?; + if !self.signer_infos.is_empty() { + struct_ser.serialize_field("signerInfos", &self.signer_infos)?; + } + if let Some(v) = self.fee.as_ref() { + struct_ser.serialize_field("fee", v)?; + } + if let Some(v) = self.tip.as_ref() { + struct_ser.serialize_field("tip", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AuthInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["signer_infos", "signerInfos", "fee", "tip"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SignerInfos, + Fee, + Tip, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "signerInfos" | "signer_infos" => Ok(GeneratedField::SignerInfos), + "fee" => Ok(GeneratedField::Fee), + "tip" => Ok(GeneratedField::Tip), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AuthInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.AuthInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signer_infos__ = None; + let mut fee__ = None; + let mut tip__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::SignerInfos => { + if signer_infos__.is_some() { + return Err(serde::de::Error::duplicate_field("signerInfos")); + } + signer_infos__ = Some(map.next_value()?); + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = map.next_value()?; + } + GeneratedField::Tip => { + if tip__.is_some() { + return Err(serde::de::Error::duplicate_field("tip")); + } + tip__ = map.next_value()?; + } + } + } + Ok(AuthInfo { + signer_infos: signer_infos__.unwrap_or_default(), + fee: fee__, + tip: tip__, + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.AuthInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for AuxSignerData { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.sign_doc.is_some() { + len += 1; + } + if self.mode != 0 { + len += 1; + } + if !self.sig.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.AuxSignerData", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.sign_doc.as_ref() { + struct_ser.serialize_field("signDoc", v)?; + } + if self.mode != 0 { + let v = super::signing::v1beta1::SignMode::from_i32(self.mode).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.mode)) + })?; + struct_ser.serialize_field("mode", &v)?; + } + if !self.sig.is_empty() { + struct_ser + .serialize_field("sig", pbjson::private::base64::encode(&self.sig).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AuxSignerData { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "sign_doc", "signDoc", "mode", "sig"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + SignDoc, + Mode, + Sig, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "signDoc" | "sign_doc" => Ok(GeneratedField::SignDoc), + "mode" => Ok(GeneratedField::Mode), + "sig" => Ok(GeneratedField::Sig), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AuxSignerData; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.AuxSignerData") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut sign_doc__ = None; + let mut mode__ = None; + let mut sig__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::SignDoc => { + if sign_doc__.is_some() { + return Err(serde::de::Error::duplicate_field("signDoc")); + } + sign_doc__ = map.next_value()?; + } + GeneratedField::Mode => { + if mode__.is_some() { + return Err(serde::de::Error::duplicate_field("mode")); + } + mode__ = + Some(map.next_value::()? as i32); + } + GeneratedField::Sig => { + if sig__.is_some() { + return Err(serde::de::Error::duplicate_field("sig")); + } + sig__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(AuxSignerData { + address: address__.unwrap_or_default(), + sign_doc: sign_doc__, + mode: mode__.unwrap_or_default(), + sig: sig__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.AuxSignerData", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for BroadcastMode { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "BROADCAST_MODE_UNSPECIFIED", + Self::Block => "BROADCAST_MODE_BLOCK", + Self::Sync => "BROADCAST_MODE_SYNC", + Self::Async => "BROADCAST_MODE_ASYNC", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for BroadcastMode { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "BROADCAST_MODE_UNSPECIFIED", + "BROADCAST_MODE_BLOCK", + "BROADCAST_MODE_SYNC", + "BROADCAST_MODE_ASYNC", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BroadcastMode; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(BroadcastMode::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(BroadcastMode::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "BROADCAST_MODE_UNSPECIFIED" => Ok(BroadcastMode::Unspecified), + "BROADCAST_MODE_BLOCK" => Ok(BroadcastMode::Block), + "BROADCAST_MODE_SYNC" => Ok(BroadcastMode::Sync), + "BROADCAST_MODE_ASYNC" => Ok(BroadcastMode::Async), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for BroadcastTxRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.tx_bytes.is_empty() { + len += 1; + } + if self.mode != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.BroadcastTxRequest", len)?; + if !self.tx_bytes.is_empty() { + struct_ser.serialize_field( + "txBytes", + pbjson::private::base64::encode(&self.tx_bytes).as_str(), + )?; + } + if self.mode != 0 { + let v = BroadcastMode::from_i32(self.mode).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.mode)) + })?; + struct_ser.serialize_field("mode", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["tx_bytes", "txBytes", "mode"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TxBytes, + Mode, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "txBytes" | "tx_bytes" => Ok(GeneratedField::TxBytes), + "mode" => Ok(GeneratedField::Mode), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BroadcastTxRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.BroadcastTxRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut tx_bytes__ = None; + let mut mode__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::TxBytes => { + if tx_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("txBytes")); + } + tx_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Mode => { + if mode__.is_some() { + return Err(serde::de::Error::duplicate_field("mode")); + } + mode__ = Some(map.next_value::()? as i32); + } + } + } + Ok(BroadcastTxRequest { + tx_bytes: tx_bytes__.unwrap_or_default(), + mode: mode__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.BroadcastTxRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for BroadcastTxResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.tx_response.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.BroadcastTxResponse", len)?; + if let Some(v) = self.tx_response.as_ref() { + struct_ser.serialize_field("txResponse", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BroadcastTxResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["tx_response", "txResponse"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TxResponse, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "txResponse" | "tx_response" => Ok(GeneratedField::TxResponse), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BroadcastTxResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.BroadcastTxResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut tx_response__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::TxResponse => { + if tx_response__.is_some() { + return Err(serde::de::Error::duplicate_field("txResponse")); + } + tx_response__ = map.next_value()?; + } + } + } + Ok(BroadcastTxResponse { + tx_response: tx_response__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.BroadcastTxResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Fee { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.amount.is_empty() { + len += 1; + } + if self.gas_limit != 0 { + len += 1; + } + if !self.payer.is_empty() { + len += 1; + } + if !self.granter.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.Fee", len)?; + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + if self.gas_limit != 0 { + struct_ser + .serialize_field("gasLimit", ToString::to_string(&self.gas_limit).as_str())?; + } + if !self.payer.is_empty() { + struct_ser.serialize_field("payer", &self.payer)?; + } + if !self.granter.is_empty() { + struct_ser.serialize_field("granter", &self.granter)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Fee { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amount", "gas_limit", "gasLimit", "payer", "granter"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + GasLimit, + Payer, + Granter, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + "gasLimit" | "gas_limit" => Ok(GeneratedField::GasLimit), + "payer" => Ok(GeneratedField::Payer), + "granter" => Ok(GeneratedField::Granter), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Fee; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.Fee") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + let mut gas_limit__ = None; + let mut payer__ = None; + let mut granter__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + GeneratedField::GasLimit => { + if gas_limit__.is_some() { + return Err(serde::de::Error::duplicate_field("gasLimit")); + } + gas_limit__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Payer => { + if payer__.is_some() { + return Err(serde::de::Error::duplicate_field("payer")); + } + payer__ = Some(map.next_value()?); + } + GeneratedField::Granter => { + if granter__.is_some() { + return Err(serde::de::Error::duplicate_field("granter")); + } + granter__ = Some(map.next_value()?); + } + } + } + Ok(Fee { + amount: amount__.unwrap_or_default(), + gas_limit: gas_limit__.unwrap_or_default(), + payer: payer__.unwrap_or_default(), + granter: granter__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.Fee", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockWithTxsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.GetBlockWithTxsRequest", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["height", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockWithTxsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.GetBlockWithTxsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(GetBlockWithTxsRequest { + height: height__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.GetBlockWithTxsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetBlockWithTxsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.txs.is_empty() { + len += 1; + } + if self.block_id.is_some() { + len += 1; + } + if self.block.is_some() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.GetBlockWithTxsResponse", len)?; + if !self.txs.is_empty() { + struct_ser.serialize_field("txs", &self.txs)?; + } + if let Some(v) = self.block_id.as_ref() { + struct_ser.serialize_field("blockId", v)?; + } + if let Some(v) = self.block.as_ref() { + struct_ser.serialize_field("block", v)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["txs", "block_id", "blockId", "block", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Txs, + BlockId, + Block, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "txs" => Ok(GeneratedField::Txs), + "blockId" | "block_id" => Ok(GeneratedField::BlockId), + "block" => Ok(GeneratedField::Block), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockWithTxsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.GetBlockWithTxsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut txs__ = None; + let mut block_id__ = None; + let mut block__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Txs => { + if txs__.is_some() { + return Err(serde::de::Error::duplicate_field("txs")); + } + txs__ = Some(map.next_value()?); + } + GeneratedField::BlockId => { + if block_id__.is_some() { + return Err(serde::de::Error::duplicate_field("blockId")); + } + block_id__ = map.next_value()?; + } + GeneratedField::Block => { + if block__.is_some() { + return Err(serde::de::Error::duplicate_field("block")); + } + block__ = map.next_value()?; + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(GetBlockWithTxsResponse { + txs: txs__.unwrap_or_default(), + block_id: block_id__, + block: block__, + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.GetBlockWithTxsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetTxRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.hash.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.GetTxRequest", len)?; + if !self.hash.is_empty() { + struct_ser.serialize_field("hash", &self.hash)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTxRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["hash"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Hash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "hash" => Ok(GeneratedField::Hash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTxRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.GetTxRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut hash__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some(map.next_value()?); + } + } + } + Ok(GetTxRequest { + hash: hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.GetTxRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetTxResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.tx.is_some() { + len += 1; + } + if self.tx_response.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.GetTxResponse", len)?; + if let Some(v) = self.tx.as_ref() { + struct_ser.serialize_field("tx", v)?; + } + if let Some(v) = self.tx_response.as_ref() { + struct_ser.serialize_field("txResponse", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTxResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["tx", "tx_response", "txResponse"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Tx, + TxResponse, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "tx" => Ok(GeneratedField::Tx), + "txResponse" | "tx_response" => Ok(GeneratedField::TxResponse), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTxResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.GetTxResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut tx__ = None; + let mut tx_response__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Tx => { + if tx__.is_some() { + return Err(serde::de::Error::duplicate_field("tx")); + } + tx__ = map.next_value()?; + } + GeneratedField::TxResponse => { + if tx_response__.is_some() { + return Err(serde::de::Error::duplicate_field("txResponse")); + } + tx_response__ = map.next_value()?; + } + } + } + Ok(GetTxResponse { + tx: tx__, + tx_response: tx_response__, + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.GetTxResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetTxsEventRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.events.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + if self.order_by != 0 { + len += 1; + } + if self.page != 0 { + len += 1; + } + if self.limit != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.GetTxsEventRequest", len)?; + if !self.events.is_empty() { + struct_ser.serialize_field("events", &self.events)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + if self.order_by != 0 { + let v = OrderBy::from_i32(self.order_by).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.order_by)) + })?; + struct_ser.serialize_field("orderBy", &v)?; + } + if self.page != 0 { + struct_ser.serialize_field("page", ToString::to_string(&self.page).as_str())?; + } + if self.limit != 0 { + struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "events", + "pagination", + "order_by", + "orderBy", + "page", + "limit", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Events, + Pagination, + OrderBy, + Page, + Limit, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "events" => Ok(GeneratedField::Events), + "pagination" => Ok(GeneratedField::Pagination), + "orderBy" | "order_by" => Ok(GeneratedField::OrderBy), + "page" => Ok(GeneratedField::Page), + "limit" => Ok(GeneratedField::Limit), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTxsEventRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.GetTxsEventRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut events__ = None; + let mut pagination__ = None; + let mut order_by__ = None; + let mut page__ = None; + let mut limit__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Events => { + if events__.is_some() { + return Err(serde::de::Error::duplicate_field("events")); + } + events__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + GeneratedField::OrderBy => { + if order_by__.is_some() { + return Err(serde::de::Error::duplicate_field("orderBy")); + } + order_by__ = Some(map.next_value::()? as i32); + } + GeneratedField::Page => { + if page__.is_some() { + return Err(serde::de::Error::duplicate_field("page")); + } + page__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Limit => { + if limit__.is_some() { + return Err(serde::de::Error::duplicate_field("limit")); + } + limit__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(GetTxsEventRequest { + events: events__.unwrap_or_default(), + pagination: pagination__, + order_by: order_by__.unwrap_or_default(), + page: page__.unwrap_or_default(), + limit: limit__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.GetTxsEventRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GetTxsEventResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.txs.is_empty() { + len += 1; + } + if !self.tx_responses.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + if self.total != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.GetTxsEventResponse", len)?; + if !self.txs.is_empty() { + struct_ser.serialize_field("txs", &self.txs)?; + } + if !self.tx_responses.is_empty() { + struct_ser.serialize_field("txResponses", &self.tx_responses)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + if self.total != 0 { + struct_ser.serialize_field("total", ToString::to_string(&self.total).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["txs", "tx_responses", "txResponses", "pagination", "total"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Txs, + TxResponses, + Pagination, + Total, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "txs" => Ok(GeneratedField::Txs), + "txResponses" | "tx_responses" => Ok(GeneratedField::TxResponses), + "pagination" => Ok(GeneratedField::Pagination), + "total" => Ok(GeneratedField::Total), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTxsEventResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.GetTxsEventResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut txs__ = None; + let mut tx_responses__ = None; + let mut pagination__ = None; + let mut total__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Txs => { + if txs__.is_some() { + return Err(serde::de::Error::duplicate_field("txs")); + } + txs__ = Some(map.next_value()?); + } + GeneratedField::TxResponses => { + if tx_responses__.is_some() { + return Err(serde::de::Error::duplicate_field("txResponses")); + } + tx_responses__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + GeneratedField::Total => { + if total__.is_some() { + return Err(serde::de::Error::duplicate_field("total")); + } + total__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(GetTxsEventResponse { + txs: txs__.unwrap_or_default(), + tx_responses: tx_responses__.unwrap_or_default(), + pagination: pagination__, + total: total__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.GetTxsEventResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ModeInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.sum.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.ModeInfo", len)?; + if let Some(v) = self.sum.as_ref() { + match v { + mode_info::Sum::Single(v) => { + struct_ser.serialize_field("single", v)?; + } + mode_info::Sum::Multi(v) => { + struct_ser.serialize_field("multi", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ModeInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["single", "multi"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Single, + Multi, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "single" => Ok(GeneratedField::Single), + "multi" => Ok(GeneratedField::Multi), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ModeInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.ModeInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sum__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Single => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("single")); + } + sum__ = map + .next_value::<::std::option::Option<_>>()? + .map(mode_info::Sum::Single); + } + GeneratedField::Multi => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("multi")); + } + sum__ = map + .next_value::<::std::option::Option<_>>()? + .map(mode_info::Sum::Multi); + } + } + } + Ok(ModeInfo { sum: sum__ }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.ModeInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for mode_info::Multi { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.bitarray.is_some() { + len += 1; + } + if !self.mode_infos.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.ModeInfo.Multi", len)?; + if let Some(v) = self.bitarray.as_ref() { + struct_ser.serialize_field("bitarray", v)?; + } + if !self.mode_infos.is_empty() { + struct_ser.serialize_field("modeInfos", &self.mode_infos)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for mode_info::Multi { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["bitarray", "mode_infos", "modeInfos"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Bitarray, + ModeInfos, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "bitarray" => Ok(GeneratedField::Bitarray), + "modeInfos" | "mode_infos" => Ok(GeneratedField::ModeInfos), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = mode_info::Multi; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.ModeInfo.Multi") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut bitarray__ = None; + let mut mode_infos__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Bitarray => { + if bitarray__.is_some() { + return Err(serde::de::Error::duplicate_field("bitarray")); + } + bitarray__ = map.next_value()?; + } + GeneratedField::ModeInfos => { + if mode_infos__.is_some() { + return Err(serde::de::Error::duplicate_field("modeInfos")); + } + mode_infos__ = Some(map.next_value()?); + } + } + } + Ok(mode_info::Multi { + bitarray: bitarray__, + mode_infos: mode_infos__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.ModeInfo.Multi", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for mode_info::Single { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.mode != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.ModeInfo.Single", len)?; + if self.mode != 0 { + let v = super::signing::v1beta1::SignMode::from_i32(self.mode).ok_or_else(|| { + serde::ser::Error::custom(format!("Invalid variant {}", self.mode)) + })?; + struct_ser.serialize_field("mode", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for mode_info::Single { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["mode"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Mode, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "mode" => Ok(GeneratedField::Mode), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = mode_info::Single; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.ModeInfo.Single") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut mode__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Mode => { + if mode__.is_some() { + return Err(serde::de::Error::duplicate_field("mode")); + } + mode__ = + Some(map.next_value::()? as i32); + } + } + } + Ok(mode_info::Single { + mode: mode__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.ModeInfo.Single", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for OrderBy { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "ORDER_BY_UNSPECIFIED", + Self::Asc => "ORDER_BY_ASC", + Self::Desc => "ORDER_BY_DESC", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for OrderBy { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["ORDER_BY_UNSPECIFIED", "ORDER_BY_ASC", "ORDER_BY_DESC"]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = OrderBy; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(OrderBy::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(OrderBy::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "ORDER_BY_UNSPECIFIED" => Ok(OrderBy::Unspecified), + "ORDER_BY_ASC" => Ok(OrderBy::Asc), + "ORDER_BY_DESC" => Ok(OrderBy::Desc), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for SignDoc { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.body_bytes.is_empty() { + len += 1; + } + if !self.auth_info_bytes.is_empty() { + len += 1; + } + if !self.chain_id.is_empty() { + len += 1; + } + if self.account_number != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.SignDoc", len)?; + if !self.body_bytes.is_empty() { + struct_ser.serialize_field( + "bodyBytes", + pbjson::private::base64::encode(&self.body_bytes).as_str(), + )?; + } + if !self.auth_info_bytes.is_empty() { + struct_ser.serialize_field( + "authInfoBytes", + pbjson::private::base64::encode(&self.auth_info_bytes).as_str(), + )?; + } + if !self.chain_id.is_empty() { + struct_ser.serialize_field("chainId", &self.chain_id)?; + } + if self.account_number != 0 { + struct_ser.serialize_field( + "accountNumber", + ToString::to_string(&self.account_number).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignDoc { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "body_bytes", + "bodyBytes", + "auth_info_bytes", + "authInfoBytes", + "chain_id", + "chainId", + "account_number", + "accountNumber", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BodyBytes, + AuthInfoBytes, + ChainId, + AccountNumber, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "bodyBytes" | "body_bytes" => Ok(GeneratedField::BodyBytes), + "authInfoBytes" | "auth_info_bytes" => { + Ok(GeneratedField::AuthInfoBytes) + } + "chainId" | "chain_id" => Ok(GeneratedField::ChainId), + "accountNumber" | "account_number" => Ok(GeneratedField::AccountNumber), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignDoc; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.SignDoc") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut body_bytes__ = None; + let mut auth_info_bytes__ = None; + let mut chain_id__ = None; + let mut account_number__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BodyBytes => { + if body_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("bodyBytes")); + } + body_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::AuthInfoBytes => { + if auth_info_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("authInfoBytes")); + } + auth_info_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::ChainId => { + if chain_id__.is_some() { + return Err(serde::de::Error::duplicate_field("chainId")); + } + chain_id__ = Some(map.next_value()?); + } + GeneratedField::AccountNumber => { + if account_number__.is_some() { + return Err(serde::de::Error::duplicate_field("accountNumber")); + } + account_number__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(SignDoc { + body_bytes: body_bytes__.unwrap_or_default(), + auth_info_bytes: auth_info_bytes__.unwrap_or_default(), + chain_id: chain_id__.unwrap_or_default(), + account_number: account_number__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.SignDoc", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SignDocDirectAux { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.body_bytes.is_empty() { + len += 1; + } + if self.public_key.is_some() { + len += 1; + } + if !self.chain_id.is_empty() { + len += 1; + } + if self.account_number != 0 { + len += 1; + } + if self.sequence != 0 { + len += 1; + } + if self.tip.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.SignDocDirectAux", len)?; + if !self.body_bytes.is_empty() { + struct_ser.serialize_field( + "bodyBytes", + pbjson::private::base64::encode(&self.body_bytes).as_str(), + )?; + } + if let Some(v) = self.public_key.as_ref() { + struct_ser.serialize_field("publicKey", v)?; + } + if !self.chain_id.is_empty() { + struct_ser.serialize_field("chainId", &self.chain_id)?; + } + if self.account_number != 0 { + struct_ser.serialize_field( + "accountNumber", + ToString::to_string(&self.account_number).as_str(), + )?; + } + if self.sequence != 0 { + struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; + } + if let Some(v) = self.tip.as_ref() { + struct_ser.serialize_field("tip", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignDocDirectAux { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "body_bytes", + "bodyBytes", + "public_key", + "publicKey", + "chain_id", + "chainId", + "account_number", + "accountNumber", + "sequence", + "tip", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BodyBytes, + PublicKey, + ChainId, + AccountNumber, + Sequence, + Tip, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "bodyBytes" | "body_bytes" => Ok(GeneratedField::BodyBytes), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "chainId" | "chain_id" => Ok(GeneratedField::ChainId), + "accountNumber" | "account_number" => Ok(GeneratedField::AccountNumber), + "sequence" => Ok(GeneratedField::Sequence), + "tip" => Ok(GeneratedField::Tip), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignDocDirectAux; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.SignDocDirectAux") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut body_bytes__ = None; + let mut public_key__ = None; + let mut chain_id__ = None; + let mut account_number__ = None; + let mut sequence__ = None; + let mut tip__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BodyBytes => { + if body_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("bodyBytes")); + } + body_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = map.next_value()?; + } + GeneratedField::ChainId => { + if chain_id__.is_some() { + return Err(serde::de::Error::duplicate_field("chainId")); + } + chain_id__ = Some(map.next_value()?); + } + GeneratedField::AccountNumber => { + if account_number__.is_some() { + return Err(serde::de::Error::duplicate_field("accountNumber")); + } + account_number__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Sequence => { + if sequence__.is_some() { + return Err(serde::de::Error::duplicate_field("sequence")); + } + sequence__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Tip => { + if tip__.is_some() { + return Err(serde::de::Error::duplicate_field("tip")); + } + tip__ = map.next_value()?; + } + } + } + Ok(SignDocDirectAux { + body_bytes: body_bytes__.unwrap_or_default(), + public_key: public_key__, + chain_id: chain_id__.unwrap_or_default(), + account_number: account_number__.unwrap_or_default(), + sequence: sequence__.unwrap_or_default(), + tip: tip__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.SignDocDirectAux", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SignerInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.public_key.is_some() { + len += 1; + } + if self.mode_info.is_some() { + len += 1; + } + if self.sequence != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.SignerInfo", len)?; + if let Some(v) = self.public_key.as_ref() { + struct_ser.serialize_field("publicKey", v)?; + } + if let Some(v) = self.mode_info.as_ref() { + struct_ser.serialize_field("modeInfo", v)?; + } + if self.sequence != 0 { + struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignerInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "public_key", + "publicKey", + "mode_info", + "modeInfo", + "sequence", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PublicKey, + ModeInfo, + Sequence, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "modeInfo" | "mode_info" => Ok(GeneratedField::ModeInfo), + "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 = SignerInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.SignerInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut public_key__ = None; + let mut mode_info__ = None; + let mut sequence__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = map.next_value()?; + } + GeneratedField::ModeInfo => { + if mode_info__.is_some() { + return Err(serde::de::Error::duplicate_field("modeInfo")); + } + mode_info__ = 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(SignerInfo { + public_key: public_key__, + mode_info: mode_info__, + sequence: sequence__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.SignerInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SimulateRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.tx.is_some() { + len += 1; + } + if !self.tx_bytes.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.SimulateRequest", len)?; + if let Some(v) = self.tx.as_ref() { + struct_ser.serialize_field("tx", v)?; + } + if !self.tx_bytes.is_empty() { + struct_ser.serialize_field( + "txBytes", + pbjson::private::base64::encode(&self.tx_bytes).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SimulateRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["tx", "tx_bytes", "txBytes"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Tx, + TxBytes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "tx" => Ok(GeneratedField::Tx), + "txBytes" | "tx_bytes" => Ok(GeneratedField::TxBytes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SimulateRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.SimulateRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut tx__ = None; + let mut tx_bytes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Tx => { + if tx__.is_some() { + return Err(serde::de::Error::duplicate_field("tx")); + } + tx__ = map.next_value()?; + } + GeneratedField::TxBytes => { + if tx_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("txBytes")); + } + tx_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(SimulateRequest { + tx: tx__, + tx_bytes: tx_bytes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.SimulateRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SimulateResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.gas_info.is_some() { + len += 1; + } + if self.result.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.tx.v1beta1.SimulateResponse", len)?; + if let Some(v) = self.gas_info.as_ref() { + struct_ser.serialize_field("gasInfo", v)?; + } + if let Some(v) = self.result.as_ref() { + struct_ser.serialize_field("result", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SimulateResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["gas_info", "gasInfo", "result"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + GasInfo, + Result, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "gasInfo" | "gas_info" => Ok(GeneratedField::GasInfo), + "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 = SimulateResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.SimulateResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut gas_info__ = None; + let mut result__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::GasInfo => { + if gas_info__.is_some() { + return Err(serde::de::Error::duplicate_field("gasInfo")); + } + gas_info__ = map.next_value()?; + } + GeneratedField::Result => { + if result__.is_some() { + return Err(serde::de::Error::duplicate_field("result")); + } + result__ = map.next_value()?; + } + } + } + Ok(SimulateResponse { + gas_info: gas_info__, + result: result__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.tx.v1beta1.SimulateResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Tip { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.amount.is_empty() { + len += 1; + } + if !self.tipper.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.Tip", len)?; + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + if !self.tipper.is_empty() { + struct_ser.serialize_field("tipper", &self.tipper)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Tip { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amount", "tipper"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + Tipper, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + "tipper" => Ok(GeneratedField::Tipper), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Tip; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.Tip") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + let mut tipper__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + GeneratedField::Tipper => { + if tipper__.is_some() { + return Err(serde::de::Error::duplicate_field("tipper")); + } + tipper__ = Some(map.next_value()?); + } + } + } + Ok(Tip { + amount: amount__.unwrap_or_default(), + tipper: tipper__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.Tip", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Tx { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.body.is_some() { + len += 1; + } + if self.auth_info.is_some() { + len += 1; + } + if !self.signatures.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.Tx", len)?; + if let Some(v) = self.body.as_ref() { + struct_ser.serialize_field("body", v)?; + } + if let Some(v) = self.auth_info.as_ref() { + struct_ser.serialize_field("authInfo", v)?; + } + if !self.signatures.is_empty() { + struct_ser.serialize_field( + "signatures", + &self + .signatures + .iter() + .map(pbjson::private::base64::encode) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Tx { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["body", "auth_info", "authInfo", "signatures"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Body, + AuthInfo, + Signatures, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "body" => Ok(GeneratedField::Body), + "authInfo" | "auth_info" => Ok(GeneratedField::AuthInfo), + "signatures" => Ok(GeneratedField::Signatures), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Tx; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.Tx") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut body__ = None; + let mut auth_info__ = None; + let mut signatures__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Body => { + if body__.is_some() { + return Err(serde::de::Error::duplicate_field("body")); + } + body__ = map.next_value()?; + } + GeneratedField::AuthInfo => { + if auth_info__.is_some() { + return Err(serde::de::Error::duplicate_field("authInfo")); + } + auth_info__ = map.next_value()?; + } + GeneratedField::Signatures => { + if signatures__.is_some() { + return Err(serde::de::Error::duplicate_field("signatures")); + } + signatures__ = Some( + map.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(Tx { + body: body__, + auth_info: auth_info__, + signatures: signatures__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.Tx", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TxBody { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.messages.is_empty() { + len += 1; + } + if !self.memo.is_empty() { + len += 1; + } + if self.timeout_height != 0 { + len += 1; + } + if !self.extension_options.is_empty() { + len += 1; + } + if !self.non_critical_extension_options.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.TxBody", len)?; + if !self.messages.is_empty() { + struct_ser.serialize_field("messages", &self.messages)?; + } + if !self.memo.is_empty() { + struct_ser.serialize_field("memo", &self.memo)?; + } + if self.timeout_height != 0 { + struct_ser.serialize_field( + "timeoutHeight", + ToString::to_string(&self.timeout_height).as_str(), + )?; + } + if !self.extension_options.is_empty() { + struct_ser.serialize_field("extensionOptions", &self.extension_options)?; + } + if !self.non_critical_extension_options.is_empty() { + struct_ser.serialize_field( + "nonCriticalExtensionOptions", + &self.non_critical_extension_options, + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TxBody { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "messages", + "memo", + "timeout_height", + "timeoutHeight", + "extension_options", + "extensionOptions", + "non_critical_extension_options", + "nonCriticalExtensionOptions", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Messages, + Memo, + TimeoutHeight, + ExtensionOptions, + NonCriticalExtensionOptions, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "messages" => Ok(GeneratedField::Messages), + "memo" => Ok(GeneratedField::Memo), + "timeoutHeight" | "timeout_height" => Ok(GeneratedField::TimeoutHeight), + "extensionOptions" | "extension_options" => { + Ok(GeneratedField::ExtensionOptions) + } + "nonCriticalExtensionOptions" | "non_critical_extension_options" => { + Ok(GeneratedField::NonCriticalExtensionOptions) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TxBody; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.TxBody") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut messages__ = None; + let mut memo__ = None; + let mut timeout_height__ = None; + let mut extension_options__ = None; + let mut non_critical_extension_options__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Messages => { + if messages__.is_some() { + return Err(serde::de::Error::duplicate_field("messages")); + } + messages__ = Some(map.next_value()?); + } + GeneratedField::Memo => { + if memo__.is_some() { + return Err(serde::de::Error::duplicate_field("memo")); + } + memo__ = Some(map.next_value()?); + } + GeneratedField::TimeoutHeight => { + if timeout_height__.is_some() { + return Err(serde::de::Error::duplicate_field("timeoutHeight")); + } + timeout_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::ExtensionOptions => { + if extension_options__.is_some() { + return Err(serde::de::Error::duplicate_field("extensionOptions")); + } + extension_options__ = Some(map.next_value()?); + } + GeneratedField::NonCriticalExtensionOptions => { + if non_critical_extension_options__.is_some() { + return Err(serde::de::Error::duplicate_field( + "nonCriticalExtensionOptions", + )); + } + non_critical_extension_options__ = Some(map.next_value()?); + } + } + } + Ok(TxBody { + messages: messages__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), + timeout_height: timeout_height__.unwrap_or_default(), + extension_options: extension_options__.unwrap_or_default(), + non_critical_extension_options: non_critical_extension_options__ + .unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.TxBody", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TxRaw { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.body_bytes.is_empty() { + len += 1; + } + if !self.auth_info_bytes.is_empty() { + len += 1; + } + if !self.signatures.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.TxRaw", len)?; + if !self.body_bytes.is_empty() { + struct_ser.serialize_field( + "bodyBytes", + pbjson::private::base64::encode(&self.body_bytes).as_str(), + )?; + } + if !self.auth_info_bytes.is_empty() { + struct_ser.serialize_field( + "authInfoBytes", + pbjson::private::base64::encode(&self.auth_info_bytes).as_str(), + )?; + } + if !self.signatures.is_empty() { + struct_ser.serialize_field( + "signatures", + &self + .signatures + .iter() + .map(pbjson::private::base64::encode) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TxRaw { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "body_bytes", + "bodyBytes", + "auth_info_bytes", + "authInfoBytes", + "signatures", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BodyBytes, + AuthInfoBytes, + Signatures, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "bodyBytes" | "body_bytes" => Ok(GeneratedField::BodyBytes), + "authInfoBytes" | "auth_info_bytes" => { + Ok(GeneratedField::AuthInfoBytes) + } + "signatures" => Ok(GeneratedField::Signatures), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TxRaw; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.tx.v1beta1.TxRaw") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut body_bytes__ = None; + let mut auth_info_bytes__ = None; + let mut signatures__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BodyBytes => { + if body_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("bodyBytes")); + } + body_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::AuthInfoBytes => { + if auth_info_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("authInfoBytes")); + } + auth_info_bytes__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Signatures => { + if signatures__.is_some() { + return Err(serde::de::Error::duplicate_field("signatures")); + } + signatures__ = Some( + map.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(TxRaw { + body_bytes: body_bytes__.unwrap_or_default(), + auth_info_bytes: auth_info_bytes__.unwrap_or_default(), + signatures: signatures__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.tx.v1beta1.TxRaw", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs index cd3ad7d9..949637d6 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs @@ -179,5 +179,6 @@ pub struct MsgCancelUpgrade { /// Since: cosmos-sdk 0.46 #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUpgradeResponse {} +include!("cosmos.upgrade.v1beta1.serde.rs"); include!("cosmos.upgrade.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs new file mode 100644 index 00000000..8bb5f78d --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs @@ -0,0 +1,1886 @@ +// @generated +impl serde::Serialize for CancelSoftwareUpgradeProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CancelSoftwareUpgradeProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + } + } + Ok(CancelSoftwareUpgradeProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ModuleVersion { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if self.version != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.ModuleVersion", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if self.version != 0 { + struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ModuleVersion { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "version"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Version, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "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 = ModuleVersion; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.ModuleVersion") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut version__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(ModuleVersion { + name: name__.unwrap_or_default(), + version: version__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.ModuleVersion", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCancelUpgrade { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.authority.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.MsgCancelUpgrade", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["authority"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authority, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authority" => Ok(GeneratedField::Authority), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCancelUpgrade; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.MsgCancelUpgrade") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authority__ = 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()?); + } + } + } + Ok(MsgCancelUpgrade { + authority: authority__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.MsgCancelUpgrade", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCancelUpgradeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgCancelUpgradeResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgCancelUpgradeResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSoftwareUpgrade { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.authority.is_empty() { + len += 1; + } + if self.plan.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + if let Some(v) = self.plan.as_ref() { + struct_ser.serialize_field("plan", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["authority", "plan"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authority, + Plan, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authority" => Ok(GeneratedField::Authority), + "plan" => Ok(GeneratedField::Plan), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgSoftwareUpgrade; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.MsgSoftwareUpgrade") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authority__ = None; + let mut plan__ = 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::Plan => { + if plan__.is_some() { + return Err(serde::de::Error::duplicate_field("plan")); + } + plan__ = map.next_value()?; + } + } + } + Ok(MsgSoftwareUpgrade { + authority: authority__.unwrap_or_default(), + plan: plan__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgSoftwareUpgradeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgSoftwareUpgradeResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgSoftwareUpgradeResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Plan { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if self.time.is_some() { + len += 1; + } + if self.height != 0 { + len += 1; + } + if !self.info.is_empty() { + len += 1; + } + if self.upgraded_client_state.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.Plan", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if let Some(v) = self.time.as_ref() { + struct_ser.serialize_field("time", v)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + if !self.info.is_empty() { + struct_ser.serialize_field("info", &self.info)?; + } + if let Some(v) = self.upgraded_client_state.as_ref() { + struct_ser.serialize_field("upgradedClientState", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Plan { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "name", + "time", + "height", + "info", + "upgraded_client_state", + "upgradedClientState", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Time, + Height, + Info, + UpgradedClientState, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "time" => Ok(GeneratedField::Time), + "height" => Ok(GeneratedField::Height), + "info" => Ok(GeneratedField::Info), + "upgradedClientState" | "upgraded_client_state" => { + Ok(GeneratedField::UpgradedClientState) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Plan; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.Plan") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut time__ = None; + let mut height__ = None; + let mut info__ = None; + let mut upgraded_client_state__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Time => { + if time__.is_some() { + return Err(serde::de::Error::duplicate_field("time")); + } + time__ = map.next_value()?; + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Info => { + if info__.is_some() { + return Err(serde::de::Error::duplicate_field("info")); + } + info__ = Some(map.next_value()?); + } + GeneratedField::UpgradedClientState => { + if upgraded_client_state__.is_some() { + return Err(serde::de::Error::duplicate_field( + "upgradedClientState", + )); + } + upgraded_client_state__ = map.next_value()?; + } + } + } + Ok(Plan { + name: name__.unwrap_or_default(), + time: time__, + height: height__.unwrap_or_default(), + info: info__.unwrap_or_default(), + upgraded_client_state: upgraded_client_state__, + }) + } + } + deserializer.deserialize_struct("cosmos.upgrade.v1beta1.Plan", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryAppliedPlanRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAppliedPlanRequest", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAppliedPlanRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.QueryAppliedPlanRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + } + } + Ok(QueryAppliedPlanRequest { + name: name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryAppliedPlanRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAppliedPlanResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAppliedPlanResponse", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["height"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAppliedPlanResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.QueryAppliedPlanResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryAppliedPlanResponse { + height: height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryAppliedPlanResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAuthorityRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAuthorityRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryAuthorityRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.QueryAuthorityRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryAuthorityRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryAuthorityRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAuthorityResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAuthorityResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAuthorityResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.QueryAuthorityResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(QueryAuthorityResponse { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryAuthorityResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryCurrentPlanRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryCurrentPlanRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryCurrentPlanRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.QueryCurrentPlanRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(QueryCurrentPlanRequest {}) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryCurrentPlanRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryCurrentPlanResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.plan.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryCurrentPlanResponse", len)?; + if let Some(v) = self.plan.as_ref() { + struct_ser.serialize_field("plan", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["plan"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Plan, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "plan" => Ok(GeneratedField::Plan), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryCurrentPlanResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.QueryCurrentPlanResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut plan__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Plan => { + if plan__.is_some() { + return Err(serde::de::Error::duplicate_field("plan")); + } + plan__ = map.next_value()?; + } + } + } + Ok(QueryCurrentPlanResponse { plan: plan__ }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryModuleVersionsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.module_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.upgrade.v1beta1.QueryModuleVersionsRequest", len)?; + if !self.module_name.is_empty() { + struct_ser.serialize_field("moduleName", &self.module_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["module_name", "moduleName"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ModuleName, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "moduleName" | "module_name" => Ok(GeneratedField::ModuleName), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryModuleVersionsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.QueryModuleVersionsRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut module_name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ModuleName => { + if module_name__.is_some() { + return Err(serde::de::Error::duplicate_field("moduleName")); + } + module_name__ = Some(map.next_value()?); + } + } + } + Ok(QueryModuleVersionsRequest { + module_name: module_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryModuleVersionsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.module_versions.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmos.upgrade.v1beta1.QueryModuleVersionsResponse", len)?; + if !self.module_versions.is_empty() { + struct_ser.serialize_field("moduleVersions", &self.module_versions)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["module_versions", "moduleVersions"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ModuleVersions, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "moduleVersions" | "module_versions" => { + Ok(GeneratedField::ModuleVersions) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryModuleVersionsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.QueryModuleVersionsResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut module_versions__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ModuleVersions => { + if module_versions__.is_some() { + return Err(serde::de::Error::duplicate_field("moduleVersions")); + } + module_versions__ = Some(map.next_value()?); + } + } + } + Ok(QueryModuleVersionsResponse { + module_versions: module_versions__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryUpgradedConsensusStateRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.last_height != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest", + len, + )?; + if self.last_height != 0 { + struct_ser.serialize_field( + "lastHeight", + ToString::to_string(&self.last_height).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["last_height", "lastHeight"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + LastHeight, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "lastHeight" | "last_height" => Ok(GeneratedField::LastHeight), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryUpgradedConsensusStateRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut last_height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::LastHeight => { + if last_height__.is_some() { + return Err(serde::de::Error::duplicate_field("lastHeight")); + } + last_height__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryUpgradedConsensusStateRequest { + last_height: last_height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryUpgradedConsensusStateResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.upgraded_consensus_state.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse", + len, + )?; + if !self.upgraded_consensus_state.is_empty() { + struct_ser.serialize_field( + "upgradedConsensusState", + pbjson::private::base64::encode(&self.upgraded_consensus_state).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["upgraded_consensus_state", "upgradedConsensusState"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + UpgradedConsensusState, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "upgradedConsensusState" | "upgraded_consensus_state" => { + Ok(GeneratedField::UpgradedConsensusState) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryUpgradedConsensusStateResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut upgraded_consensus_state__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::UpgradedConsensusState => { + if upgraded_consensus_state__.is_some() { + return Err(serde::de::Error::duplicate_field( + "upgradedConsensusState", + )); + } + upgraded_consensus_state__ = Some( + map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryUpgradedConsensusStateResponse { + upgraded_consensus_state: upgraded_consensus_state__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SoftwareUpgradeProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if self.plan.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if let Some(v) = self.plan.as_ref() { + struct_ser.serialize_field("plan", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SoftwareUpgradeProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "plan"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + Plan, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "plan" => Ok(GeneratedField::Plan), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SoftwareUpgradeProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.upgrade.v1beta1.SoftwareUpgradeProposal") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut plan__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + GeneratedField::Plan => { + if plan__.is_some() { + return Err(serde::de::Error::duplicate_field("plan")); + } + plan__ = map.next_value()?; + } + } + } + Ok(SoftwareUpgradeProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + plan: plan__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs index 63a56aeb..0ab5fc04 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs @@ -122,5 +122,6 @@ pub struct MsgCreatePeriodicVestingAccount { /// Since: cosmos-sdk 0.46 #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePeriodicVestingAccountResponse {} +include!("cosmos.vesting.v1beta1.serde.rs"); include!("cosmos.vesting.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs new file mode 100644 index 00000000..fa36be12 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs @@ -0,0 +1,1505 @@ +// @generated +impl serde::Serialize for BaseVestingAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.base_account.is_some() { + len += 1; + } + if !self.original_vesting.is_empty() { + len += 1; + } + if !self.delegated_free.is_empty() { + len += 1; + } + if !self.delegated_vesting.is_empty() { + len += 1; + } + if self.end_time != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.vesting.v1beta1.BaseVestingAccount", len)?; + if let Some(v) = self.base_account.as_ref() { + struct_ser.serialize_field("baseAccount", v)?; + } + if !self.original_vesting.is_empty() { + struct_ser.serialize_field("originalVesting", &self.original_vesting)?; + } + if !self.delegated_free.is_empty() { + struct_ser.serialize_field("delegatedFree", &self.delegated_free)?; + } + if !self.delegated_vesting.is_empty() { + struct_ser.serialize_field("delegatedVesting", &self.delegated_vesting)?; + } + if self.end_time != 0 { + struct_ser.serialize_field("endTime", ToString::to_string(&self.end_time).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BaseVestingAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "base_account", + "baseAccount", + "original_vesting", + "originalVesting", + "delegated_free", + "delegatedFree", + "delegated_vesting", + "delegatedVesting", + "end_time", + "endTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BaseAccount, + OriginalVesting, + DelegatedFree, + DelegatedVesting, + EndTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "baseAccount" | "base_account" => Ok(GeneratedField::BaseAccount), + "originalVesting" | "original_vesting" => { + Ok(GeneratedField::OriginalVesting) + } + "delegatedFree" | "delegated_free" => Ok(GeneratedField::DelegatedFree), + "delegatedVesting" | "delegated_vesting" => { + Ok(GeneratedField::DelegatedVesting) + } + "endTime" | "end_time" => Ok(GeneratedField::EndTime), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BaseVestingAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.BaseVestingAccount") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut base_account__ = None; + let mut original_vesting__ = None; + let mut delegated_free__ = None; + let mut delegated_vesting__ = None; + let mut end_time__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BaseAccount => { + if base_account__.is_some() { + return Err(serde::de::Error::duplicate_field("baseAccount")); + } + base_account__ = map.next_value()?; + } + GeneratedField::OriginalVesting => { + if original_vesting__.is_some() { + return Err(serde::de::Error::duplicate_field("originalVesting")); + } + original_vesting__ = Some(map.next_value()?); + } + GeneratedField::DelegatedFree => { + if delegated_free__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatedFree")); + } + delegated_free__ = Some(map.next_value()?); + } + GeneratedField::DelegatedVesting => { + if delegated_vesting__.is_some() { + return Err(serde::de::Error::duplicate_field("delegatedVesting")); + } + delegated_vesting__ = Some(map.next_value()?); + } + GeneratedField::EndTime => { + if end_time__.is_some() { + return Err(serde::de::Error::duplicate_field("endTime")); + } + end_time__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(BaseVestingAccount { + base_account: base_account__, + original_vesting: original_vesting__.unwrap_or_default(), + delegated_free: delegated_free__.unwrap_or_default(), + delegated_vesting: delegated_vesting__.unwrap_or_default(), + end_time: end_time__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.BaseVestingAccount", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ContinuousVestingAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.base_vesting_account.is_some() { + len += 1; + } + if self.start_time != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.vesting.v1beta1.ContinuousVestingAccount", len)?; + if let Some(v) = self.base_vesting_account.as_ref() { + struct_ser.serialize_field("baseVestingAccount", v)?; + } + if self.start_time != 0 { + struct_ser + .serialize_field("startTime", ToString::to_string(&self.start_time).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "base_vesting_account", + "baseVestingAccount", + "start_time", + "startTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BaseVestingAccount, + StartTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "baseVestingAccount" | "base_vesting_account" => { + Ok(GeneratedField::BaseVestingAccount) + } + "startTime" | "start_time" => Ok(GeneratedField::StartTime), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ContinuousVestingAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.ContinuousVestingAccount") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut base_vesting_account__ = None; + let mut start_time__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BaseVestingAccount => { + if base_vesting_account__.is_some() { + return Err(serde::de::Error::duplicate_field( + "baseVestingAccount", + )); + } + base_vesting_account__ = map.next_value()?; + } + GeneratedField::StartTime => { + if start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("startTime")); + } + start_time__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(ContinuousVestingAccount { + base_vesting_account: base_vesting_account__, + start_time: start_time__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.ContinuousVestingAccount", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for DelayedVestingAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.base_vesting_account.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.vesting.v1beta1.DelayedVestingAccount", len)?; + if let Some(v) = self.base_vesting_account.as_ref() { + struct_ser.serialize_field("baseVestingAccount", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["base_vesting_account", "baseVestingAccount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BaseVestingAccount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "baseVestingAccount" | "base_vesting_account" => { + Ok(GeneratedField::BaseVestingAccount) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DelayedVestingAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.DelayedVestingAccount") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut base_vesting_account__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BaseVestingAccount => { + if base_vesting_account__.is_some() { + return Err(serde::de::Error::duplicate_field( + "baseVestingAccount", + )); + } + base_vesting_account__ = map.next_value()?; + } + } + } + Ok(DelayedVestingAccount { + base_vesting_account: base_vesting_account__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.DelayedVestingAccount", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreatePeriodicVestingAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.from_address.is_empty() { + len += 1; + } + if !self.to_address.is_empty() { + len += 1; + } + if self.start_time != 0 { + len += 1; + } + if !self.vesting_periods.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", + len, + )?; + if !self.from_address.is_empty() { + struct_ser.serialize_field("fromAddress", &self.from_address)?; + } + if !self.to_address.is_empty() { + struct_ser.serialize_field("toAddress", &self.to_address)?; + } + if self.start_time != 0 { + struct_ser + .serialize_field("startTime", ToString::to_string(&self.start_time).as_str())?; + } + if !self.vesting_periods.is_empty() { + struct_ser.serialize_field("vestingPeriods", &self.vesting_periods)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "from_address", + "fromAddress", + "to_address", + "toAddress", + "start_time", + "startTime", + "vesting_periods", + "vestingPeriods", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + FromAddress, + ToAddress, + StartTime, + VestingPeriods, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fromAddress" | "from_address" => Ok(GeneratedField::FromAddress), + "toAddress" | "to_address" => Ok(GeneratedField::ToAddress), + "startTime" | "start_time" => Ok(GeneratedField::StartTime), + "vestingPeriods" | "vesting_periods" => { + Ok(GeneratedField::VestingPeriods) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreatePeriodicVestingAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut from_address__ = None; + let mut to_address__ = None; + let mut start_time__ = None; + let mut vesting_periods__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::FromAddress => { + if from_address__.is_some() { + return Err(serde::de::Error::duplicate_field("fromAddress")); + } + from_address__ = Some(map.next_value()?); + } + GeneratedField::ToAddress => { + if to_address__.is_some() { + return Err(serde::de::Error::duplicate_field("toAddress")); + } + to_address__ = Some(map.next_value()?); + } + GeneratedField::StartTime => { + if start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("startTime")); + } + start_time__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::VestingPeriods => { + if vesting_periods__.is_some() { + return Err(serde::de::Error::duplicate_field("vestingPeriods")); + } + vesting_periods__ = Some(map.next_value()?); + } + } + } + Ok(MsgCreatePeriodicVestingAccount { + from_address: from_address__.unwrap_or_default(), + to_address: to_address__.unwrap_or_default(), + start_time: start_time__.unwrap_or_default(), + vesting_periods: vesting_periods__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreatePeriodicVestingAccountResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccountResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgCreatePeriodicVestingAccountResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgCreatePeriodicVestingAccountResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreatePermanentLockedAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.from_address.is_empty() { + len += 1; + } + if !self.to_address.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", + len, + )?; + if !self.from_address.is_empty() { + struct_ser.serialize_field("fromAddress", &self.from_address)?; + } + if !self.to_address.is_empty() { + struct_ser.serialize_field("toAddress", &self.to_address)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "from_address", + "fromAddress", + "to_address", + "toAddress", + "amount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + FromAddress, + ToAddress, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fromAddress" | "from_address" => Ok(GeneratedField::FromAddress), + "toAddress" | "to_address" => Ok(GeneratedField::ToAddress), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreatePermanentLockedAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut from_address__ = None; + let mut to_address__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::FromAddress => { + if from_address__.is_some() { + return Err(serde::de::Error::duplicate_field("fromAddress")); + } + from_address__ = Some(map.next_value()?); + } + GeneratedField::ToAddress => { + if to_address__.is_some() { + return Err(serde::de::Error::duplicate_field("toAddress")); + } + to_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(MsgCreatePermanentLockedAccount { + from_address: from_address__.unwrap_or_default(), + to_address: to_address__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreatePermanentLockedAccountResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccountResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgCreatePermanentLockedAccountResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str( + "struct cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", + ) + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgCreatePermanentLockedAccountResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreateVestingAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.from_address.is_empty() { + len += 1; + } + if !self.to_address.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + if self.end_time != 0 { + len += 1; + } + if self.delayed { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.vesting.v1beta1.MsgCreateVestingAccount", len)?; + if !self.from_address.is_empty() { + struct_ser.serialize_field("fromAddress", &self.from_address)?; + } + if !self.to_address.is_empty() { + struct_ser.serialize_field("toAddress", &self.to_address)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + if self.end_time != 0 { + struct_ser.serialize_field("endTime", ToString::to_string(&self.end_time).as_str())?; + } + if self.delayed { + struct_ser.serialize_field("delayed", &self.delayed)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "from_address", + "fromAddress", + "to_address", + "toAddress", + "amount", + "end_time", + "endTime", + "delayed", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + FromAddress, + ToAddress, + Amount, + EndTime, + Delayed, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fromAddress" | "from_address" => Ok(GeneratedField::FromAddress), + "toAddress" | "to_address" => Ok(GeneratedField::ToAddress), + "amount" => Ok(GeneratedField::Amount), + "endTime" | "end_time" => Ok(GeneratedField::EndTime), + "delayed" => Ok(GeneratedField::Delayed), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCreateVestingAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.MsgCreateVestingAccount") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut from_address__ = None; + let mut to_address__ = None; + let mut amount__ = None; + let mut end_time__ = None; + let mut delayed__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::FromAddress => { + if from_address__.is_some() { + return Err(serde::de::Error::duplicate_field("fromAddress")); + } + from_address__ = Some(map.next_value()?); + } + GeneratedField::ToAddress => { + if to_address__.is_some() { + return Err(serde::de::Error::duplicate_field("toAddress")); + } + to_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + GeneratedField::EndTime => { + if end_time__.is_some() { + return Err(serde::de::Error::duplicate_field("endTime")); + } + end_time__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Delayed => { + if delayed__.is_some() { + return Err(serde::de::Error::duplicate_field("delayed")); + } + delayed__ = Some(map.next_value()?); + } + } + } + Ok(MsgCreateVestingAccount { + from_address: from_address__.unwrap_or_default(), + to_address: to_address__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + end_time: end_time__.unwrap_or_default(), + delayed: delayed__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.MsgCreateVestingAccount", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgCreateVestingAccountResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccountResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgCreateVestingAccountResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgCreateVestingAccountResponse {}) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Period { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.length != 0 { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.vesting.v1beta1.Period", len)?; + if self.length != 0 { + struct_ser.serialize_field("length", ToString::to_string(&self.length).as_str())?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Period { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["length", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Length, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "length" => Ok(GeneratedField::Length), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Period; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.Period") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut length__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Length => { + if length__.is_some() { + return Err(serde::de::Error::duplicate_field("length")); + } + length__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map.next_value()?); + } + } + } + Ok(Period { + length: length__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.vesting.v1beta1.Period", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PeriodicVestingAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.base_vesting_account.is_some() { + len += 1; + } + if self.start_time != 0 { + len += 1; + } + if !self.vesting_periods.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.vesting.v1beta1.PeriodicVestingAccount", len)?; + if let Some(v) = self.base_vesting_account.as_ref() { + struct_ser.serialize_field("baseVestingAccount", v)?; + } + if self.start_time != 0 { + struct_ser + .serialize_field("startTime", ToString::to_string(&self.start_time).as_str())?; + } + if !self.vesting_periods.is_empty() { + struct_ser.serialize_field("vestingPeriods", &self.vesting_periods)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "base_vesting_account", + "baseVestingAccount", + "start_time", + "startTime", + "vesting_periods", + "vestingPeriods", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BaseVestingAccount, + StartTime, + VestingPeriods, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "baseVestingAccount" | "base_vesting_account" => { + Ok(GeneratedField::BaseVestingAccount) + } + "startTime" | "start_time" => Ok(GeneratedField::StartTime), + "vestingPeriods" | "vesting_periods" => { + Ok(GeneratedField::VestingPeriods) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PeriodicVestingAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.PeriodicVestingAccount") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut base_vesting_account__ = None; + let mut start_time__ = None; + let mut vesting_periods__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BaseVestingAccount => { + if base_vesting_account__.is_some() { + return Err(serde::de::Error::duplicate_field( + "baseVestingAccount", + )); + } + base_vesting_account__ = map.next_value()?; + } + GeneratedField::StartTime => { + if start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("startTime")); + } + start_time__ = Some( + map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::VestingPeriods => { + if vesting_periods__.is_some() { + return Err(serde::de::Error::duplicate_field("vestingPeriods")); + } + vesting_periods__ = Some(map.next_value()?); + } + } + } + Ok(PeriodicVestingAccount { + base_vesting_account: base_vesting_account__, + start_time: start_time__.unwrap_or_default(), + vesting_periods: vesting_periods__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.PeriodicVestingAccount", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for PermanentLockedAccount { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.base_vesting_account.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.vesting.v1beta1.PermanentLockedAccount", len)?; + if let Some(v) = self.base_vesting_account.as_ref() { + struct_ser.serialize_field("baseVestingAccount", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PermanentLockedAccount { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["base_vesting_account", "baseVestingAccount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BaseVestingAccount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "baseVestingAccount" | "base_vesting_account" => { + Ok(GeneratedField::BaseVestingAccount) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PermanentLockedAccount; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.vesting.v1beta1.PermanentLockedAccount") + } + + fn visit_map( + self, + mut map: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut base_vesting_account__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BaseVestingAccount => { + if base_vesting_account__.is_some() { + return Err(serde::de::Error::duplicate_field( + "baseVestingAccount", + )); + } + base_vesting_account__ = map.next_value()?; + } + } + } + Ok(PermanentLockedAccount { + base_vesting_account: base_vesting_account__, + }) + } + } + deserializer.deserialize_struct( + "cosmos.vesting.v1beta1.PermanentLockedAccount", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs index a74f2b1e..991c1940 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs @@ -61,4 +61,5 @@ impl ScalarType { } } } +include!("cosmos_proto.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs new file mode 100644 index 00000000..7c96cfc0 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs @@ -0,0 +1,328 @@ +// @generated +impl serde::Serialize for InterfaceDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos_proto.InterfaceDescriptor", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "description"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Description, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "description" => Ok(GeneratedField::Description), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = InterfaceDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos_proto.InterfaceDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut description__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + } + } + Ok(InterfaceDescriptor { + name: name__.unwrap_or_default(), + description: description__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos_proto.InterfaceDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ScalarDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.field_type.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos_proto.ScalarDescriptor", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.field_type.is_empty() { + let v = self + .field_type + .iter() + .cloned() + .map(|v| { + ScalarType::from_i32(v) + .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", v))) + }) + .collect::, _>>()?; + struct_ser.serialize_field("fieldType", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ScalarDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "description", "field_type", "fieldType"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Description, + FieldType, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "description" => Ok(GeneratedField::Description), + "fieldType" | "field_type" => Ok(GeneratedField::FieldType), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ScalarDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos_proto.ScalarDescriptor") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut description__ = None; + let mut field_type__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + GeneratedField::FieldType => { + if field_type__.is_some() { + return Err(serde::de::Error::duplicate_field("fieldType")); + } + field_type__ = Some( + map.next_value::>()? + .into_iter() + .map(|x| x as i32) + .collect(), + ); + } + } + } + Ok(ScalarDescriptor { + name: name__.unwrap_or_default(), + description: description__.unwrap_or_default(), + field_type: field_type__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos_proto.ScalarDescriptor", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ScalarType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "SCALAR_TYPE_UNSPECIFIED", + Self::String => "SCALAR_TYPE_STRING", + Self::Bytes => "SCALAR_TYPE_BYTES", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ScalarType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "SCALAR_TYPE_UNSPECIFIED", + "SCALAR_TYPE_STRING", + "SCALAR_TYPE_BYTES", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ScalarType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ScalarType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(ScalarType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "SCALAR_TYPE_UNSPECIFIED" => Ok(ScalarType::Unspecified), + "SCALAR_TYPE_STRING" => Ok(ScalarType::String), + "SCALAR_TYPE_BYTES" => Ok(ScalarType::Bytes), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} diff --git a/proto-build/buf.sdk.gen.yaml b/proto-build/buf.sdk.gen.yaml index 3565fdcc..accc551d 100644 --- a/proto-build/buf.sdk.gen.yaml +++ b/proto-build/buf.sdk.gen.yaml @@ -4,6 +4,10 @@ plugins: out: . opt: - extern_path=.tendermint=::tendermint_proto::v0_34 + - plugin: buf.build/community/neoeinstein-prost-serde:v0.2.3 + out: . + opt: + - extern_path=.tendermint=::tendermint_proto::v0_34 - plugin: buf.build/community/neoeinstein-tonic:v0.3.0 out: . opt: From 8bfa16cf0de9d7b17d167b09d061a0ee822cac18 Mon Sep 17 00:00:00 2001 From: Ash Date: Sat, 1 Jun 2024 15:57:32 -0700 Subject: [PATCH 02/31] add pbjson g push --- Cargo.lock | 32 ++++++++++++++++++++++---------- cosmos-sdk-proto/Cargo.toml | 1 + 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bcf3a095..1b69fbd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -266,8 +266,10 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" name = "cosmos-sdk-proto" version = "0.22.0-pre" dependencies = [ + "pbjson", "prost", "prost-types", + "serde", "tendermint-proto", "tonic", ] @@ -993,6 +995,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "pbjson" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" +dependencies = [ + "base64", + "serde", +] + [[package]] name = "peg" version = "0.8.2" @@ -1096,9 +1108,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" dependencies = [ "unicode-ident", ] @@ -1171,9 +1183,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1467,9 +1479,9 @@ checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -1485,9 +1497,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", @@ -1639,9 +1651,9 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" [[package]] name = "syn" -version = "2.0.37" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 8ca92920..c7bc5fcd 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -20,6 +20,7 @@ prost = "0.12.3" prost-types = "0.12" tendermint-proto = "0.37" serde = "1.0.203" +pbjson = "0.6.0" # Optional dependencies tonic = { version = "0.11", optional = true, default-features = false, features = ["codegen", "prost"] } From 11179f168ac93df3852705c88a9b1b34097cc46d Mon Sep 17 00:00:00 2001 From: Ash Date: Sat, 1 Jun 2024 16:07:40 -0700 Subject: [PATCH 03/31] add wasmd, update plugins --- .../cosmos-sdk/cosmos.app.module.v1alpha1.rs | 1 + .../cosmos.app.module.v1alpha1.serde.rs | 6 +- .../prost/cosmos-sdk/cosmos.app.v1alpha1.rs | 7 + .../cosmos-sdk/cosmos.app.v1alpha1.serde.rs | 50 +- .../prost/cosmos-sdk/cosmos.auth.v1beta1.rs | 22 + .../cosmos-sdk/cosmos.auth.v1beta1.serde.rs | 173 +- .../prost/cosmos-sdk/cosmos.authz.v1beta1.rs | 19 + .../cosmos-sdk/cosmos.authz.v1beta1.serde.rs | 159 +- .../prost/cosmos-sdk/cosmos.bank.v1beta1.rs | 33 + .../cosmos-sdk/cosmos.bank.v1beta1.serde.rs | 267 +- .../cosmos-sdk/cosmos.base.abci.v1beta1.rs | 10 + .../cosmos.base.abci.v1beta1.serde.rs | 128 +- .../cosmos-sdk/cosmos.base.kv.v1beta1.rs | 2 + .../cosmos.base.kv.v1beta1.serde.rs | 16 +- .../cosmos-sdk/cosmos.base.node.v1beta1.rs | 2 + .../cosmos.base.node.v1beta1.serde.rs | 12 +- .../cosmos-sdk/cosmos.base.query.v1beta1.rs | 2 + .../cosmos.base.query.v1beta1.serde.rs | 27 +- .../cosmos.base.reflection.v1beta1.rs | 4 + .../cosmos.base.reflection.v1beta1.serde.rs | 24 +- .../cosmos.base.reflection.v2alpha1.rs | 26 + .../cosmos.base.reflection.v2alpha1.serde.rs | 186 +- .../cosmos.base.snapshots.v1beta1.rs | 10 + .../cosmos.base.snapshots.v1beta1.serde.rs | 90 +- .../cosmos-sdk/cosmos.base.store.v1beta1.rs | 6 + .../cosmos.base.store.v1beta1.serde.rs | 65 +- .../cosmos.base.tendermint.v1beta1.rs | 21 + .../cosmos.base.tendermint.v1beta1.serde.rs | 251 +- .../prost/cosmos-sdk/cosmos.base.v1beta1.rs | 4 + .../cosmos-sdk/cosmos.base.v1beta1.serde.rs | 28 +- .../cosmos-sdk/cosmos.capability.v1beta1.rs | 5 + .../cosmos.capability.v1beta1.serde.rs | 39 +- .../prost/cosmos-sdk/cosmos.crisis.v1beta1.rs | 3 + .../cosmos-sdk/cosmos.crisis.v1beta1.serde.rs | 22 +- .../prost/cosmos-sdk/cosmos.crypto.ed25519.rs | 2 + .../cosmos-sdk/cosmos.crypto.ed25519.serde.rs | 14 +- .../prost/cosmos-sdk/cosmos.crypto.hd.v1.rs | 1 + .../cosmos-sdk/cosmos.crypto.hd.v1.serde.rs | 14 +- .../cosmos-sdk/cosmos.crypto.keyring.v1.rs | 6 + .../cosmos.crypto.keyring.v1.serde.rs | 40 +- .../cosmos-sdk/cosmos.crypto.multisig.rs | 1 + .../cosmos.crypto.multisig.serde.rs | 8 +- .../cosmos.crypto.multisig.v1beta1.rs | 2 + .../cosmos.crypto.multisig.v1beta1.serde.rs | 15 +- .../cosmos-sdk/cosmos.crypto.secp256k1.rs | 2 + .../cosmos.crypto.secp256k1.serde.rs | 14 +- .../cosmos-sdk/cosmos.crypto.secp256r1.rs | 2 + .../cosmos.crypto.secp256r1.serde.rs | 14 +- .../cosmos-sdk/cosmos.distribution.v1beta1.rs | 46 + .../cosmos.distribution.v1beta1.serde.rs | 381 +- .../cosmos-sdk/cosmos.evidence.v1beta1.rs | 8 + .../cosmos.evidence.v1beta1.serde.rs | 65 +- .../cosmos-sdk/cosmos.feegrant.v1beta1.rs | 15 + .../cosmos.feegrant.v1beta1.serde.rs | 122 +- .../cosmos-sdk/cosmos.genutil.v1beta1.rs | 1 + .../cosmos.genutil.v1beta1.serde.rs | 6 +- .../src/prost/cosmos-sdk/cosmos.gov.v1.rs | 58 + .../prost/cosmos-sdk/cosmos.gov.v1.serde.rs | 358 +- .../prost/cosmos-sdk/cosmos.gov.v1beta1.rs | 57 + .../cosmos-sdk/cosmos.gov.v1beta1.serde.rs | 346 +- .../src/prost/cosmos-sdk/cosmos.group.v1.rs | 121 +- .../prost/cosmos-sdk/cosmos.group.v1.serde.rs | 764 +- .../prost/cosmos-sdk/cosmos.mint.v1beta1.rs | 9 + .../cosmos-sdk/cosmos.mint.v1beta1.serde.rs | 71 +- .../prost/cosmos-sdk/cosmos.nft.v1beta1.rs | 23 + .../cosmos-sdk/cosmos.nft.v1beta1.serde.rs | 204 +- .../cosmos-sdk/cosmos.orm.module.v1alpha1.rs | 1 + .../cosmos.orm.module.v1alpha1.serde.rs | 6 +- .../src/prost/cosmos-sdk/cosmos.orm.v1.rs | 4 + .../prost/cosmos-sdk/cosmos.orm.v1.serde.rs | 37 +- .../prost/cosmos-sdk/cosmos.orm.v1alpha1.rs | 13 + .../cosmos-sdk/cosmos.orm.v1alpha1.serde.rs | 27 +- .../prost/cosmos-sdk/cosmos.params.v1beta1.rs | 7 + .../cosmos-sdk/cosmos.params.v1beta1.serde.rs | 54 +- .../cosmos-sdk/cosmos.slashing.v1beta1.rs | 14 + .../cosmos.slashing.v1beta1.serde.rs | 125 +- .../cosmos-sdk/cosmos.staking.v1beta1.rs | 85 + .../cosmos.staking.v1beta1.serde.rs | 594 +- .../cosmos-sdk/cosmos.tx.signing.v1beta1.rs | 18 + .../cosmos.tx.signing.v1beta1.serde.rs | 56 +- .../src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs | 43 + .../cosmos-sdk/cosmos.tx.v1beta1.serde.rs | 279 +- .../cosmos-sdk/cosmos.upgrade.v1beta1.rs | 18 + .../cosmos.upgrade.v1beta1.serde.rs | 131 +- .../cosmos-sdk/cosmos.vesting.v1beta1.rs | 12 + .../cosmos.vesting.v1beta1.serde.rs | 112 +- .../src/prost/cosmos-sdk/cosmos_proto.rs | 11 + .../prost/cosmos-sdk/cosmos_proto.serde.rs | 28 +- .../prost/wasmd/cosmos.base.query.v1beta1.rs | 3 + .../wasmd/cosmos.base.query.v1beta1.serde.rs | 306 + .../src/prost/wasmd/cosmos.base.v1beta1.rs | 5 + .../prost/wasmd/cosmos.base.v1beta1.serde.rs | 401 + .../src/prost/wasmd/cosmos_proto.rs | 12 + .../src/prost/wasmd/cosmos_proto.serde.rs | 326 + .../src/prost/wasmd/cosmwasm.wasm.v1.rs | 84 + .../src/prost/wasmd/cosmwasm.wasm.v1.serde.rs | 8229 +++++++++++++++++ proto-build/buf.sdk.gen.yaml | 4 +- proto-build/buf.wasmd.gen.yaml | 4 +- 98 files changed, 12966 insertions(+), 2593 deletions(-) create mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs create mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs index db42719c..55572462 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs @@ -1,5 +1,6 @@ // @generated /// Module is the module config object for the cosmos.app v1 app module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module {} include!("cosmos.app.module.v1alpha1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs index 830eadab..ed715133 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs @@ -57,12 +57,12 @@ impl<'de> serde::Deserialize<'de> for Module { formatter.write_str("struct cosmos.app.module.v1alpha1.Module") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(Module {}) } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs index c3805f04..b01df819 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs @@ -1,5 +1,6 @@ // @generated /// ModuleDescriptor describes an app module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleDescriptor { /// go_import names the package that should be imported by an app to load the @@ -24,6 +25,7 @@ pub struct ModuleDescriptor { pub can_migrate_from: ::prost::alloc::vec::Vec, } /// PackageReference is a reference to a protobuf package used by a module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PackageReference { /// name is the fully-qualified name of the package. @@ -69,6 +71,7 @@ pub struct PackageReference { } /// MigrateFromInfo is information on a module version that a newer module /// can migrate from. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateFromInfo { /// module is the fully-qualified protobuf name of the module config object @@ -83,6 +86,7 @@ pub struct MigrateFromInfo { /// allow a mixture of declarative and imperative app wiring, however, apps /// that strive for the maximum ease of maintainability should be able to describe /// their state machine with a config object alone. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Config { /// modules are the module configurations for the app. @@ -90,6 +94,7 @@ pub struct Config { pub modules: ::prost::alloc::vec::Vec, } /// ModuleConfig is a module configuration for an app. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleConfig { /// name is the unique name of the module within the app. It should be a name @@ -110,9 +115,11 @@ pub struct ModuleConfig { pub config: ::core::option::Option<::prost_types::Any>, } /// QueryConfigRequest is the Query/Config request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryConfigRequest {} /// QueryConfigRequest is the Query/Config response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryConfigResponse { /// config is the current app config. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs index f4300d8c..276109cc 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs @@ -68,18 +68,18 @@ impl<'de> serde::Deserialize<'de> for Config { formatter.write_str("struct cosmos.app.v1alpha1.Config") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut modules__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Modules => { if modules__.is_some() { return Err(serde::de::Error::duplicate_field("modules")); } - modules__ = Some(map.next_value()?); + modules__ = Some(map_.next_value()?); } } } @@ -161,18 +161,18 @@ impl<'de> serde::Deserialize<'de> for MigrateFromInfo { formatter.write_str("struct cosmos.app.v1alpha1.MigrateFromInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut module__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Module => { if module__.is_some() { return Err(serde::de::Error::duplicate_field("module")); } - module__ = Some(map.next_value()?); + module__ = Some(map_.next_value()?); } } } @@ -266,25 +266,25 @@ impl<'de> serde::Deserialize<'de> for ModuleConfig { formatter.write_str("struct cosmos.app.v1alpha1.ModuleConfig") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut config__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Config => { if config__.is_some() { return Err(serde::de::Error::duplicate_field("config")); } - config__ = map.next_value()?; + config__ = map_.next_value()?; } } } @@ -396,32 +396,32 @@ impl<'de> serde::Deserialize<'de> for ModuleDescriptor { formatter.write_str("struct cosmos.app.v1alpha1.ModuleDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut go_import__ = None; let mut use_package__ = None; let mut can_migrate_from__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GoImport => { if go_import__.is_some() { return Err(serde::de::Error::duplicate_field("goImport")); } - go_import__ = Some(map.next_value()?); + go_import__ = Some(map_.next_value()?); } GeneratedField::UsePackage => { if use_package__.is_some() { return Err(serde::de::Error::duplicate_field("usePackage")); } - use_package__ = Some(map.next_value()?); + use_package__ = Some(map_.next_value()?); } GeneratedField::CanMigrateFrom => { if can_migrate_from__.is_some() { return Err(serde::de::Error::duplicate_field("canMigrateFrom")); } - can_migrate_from__ = Some(map.next_value()?); + can_migrate_from__ = Some(map_.next_value()?); } } } @@ -517,26 +517,26 @@ impl<'de> serde::Deserialize<'de> for PackageReference { formatter.write_str("struct cosmos.app.v1alpha1.PackageReference") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut revision__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Revision => { if revision__.is_some() { return Err(serde::de::Error::duplicate_field("revision")); } revision__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -614,12 +614,12 @@ impl<'de> serde::Deserialize<'de> for QueryConfigRequest { formatter.write_str("struct cosmos.app.v1alpha1.QueryConfigRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryConfigRequest {}) } @@ -701,18 +701,18 @@ impl<'de> serde::Deserialize<'de> for QueryConfigResponse { formatter.write_str("struct cosmos.app.v1alpha1.QueryConfigResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut config__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Config => { if config__.is_some() { return Err(serde::de::Error::duplicate_field("config")); } - config__ = map.next_value()?; + config__ = map_.next_value()?; } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs index e36ab0b9..675da535 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs @@ -2,6 +2,7 @@ /// BaseAccount defines a base account type. It contains all the necessary fields /// for basic account functionality. Any custom account type should extend this /// type for additional functionality (e.g. vesting). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BaseAccount { #[prost(string, tag = "1")] @@ -14,6 +15,7 @@ pub struct BaseAccount { pub sequence: u64, } /// ModuleAccount defines an account for modules that holds coins on a pool. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleAccount { #[prost(message, optional, tag = "1")] @@ -24,6 +26,7 @@ pub struct ModuleAccount { pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Params defines the parameters for the auth module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(uint64, tag = "1")] @@ -38,6 +41,7 @@ pub struct Params { pub sig_verify_cost_secp256k1: u64, } /// GenesisState defines the auth module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of the module. @@ -50,6 +54,7 @@ pub struct GenesisState { /// QueryAccountsRequest is the request type for the Query/Accounts RPC method. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountsRequest { /// pagination defines an optional pagination for the request. @@ -59,6 +64,7 @@ pub struct QueryAccountsRequest { /// QueryAccountsResponse is the response type for the Query/Accounts RPC method. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountsResponse { /// accounts are the existing accounts @@ -69,6 +75,7 @@ pub struct QueryAccountsResponse { pub pagination: ::core::option::Option, } /// QueryAccountRequest is the request type for the Query/Account RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountRequest { /// address defines the address to query for. @@ -76,6 +83,7 @@ pub struct QueryAccountRequest { pub address: ::prost::alloc::string::String, } /// QueryAccountResponse is the response type for the Query/Account RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountResponse { /// account defines the account of the corresponding address. @@ -83,9 +91,11 @@ pub struct QueryAccountResponse { pub account: ::core::option::Option<::prost_types::Any>, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. @@ -95,23 +105,27 @@ pub struct QueryParamsResponse { /// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountsRequest {} /// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountsResponse { #[prost(message, repeated, tag = "1")] pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, } /// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountByNameRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } /// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountByNameResponse { #[prost(message, optional, tag = "1")] @@ -120,11 +134,13 @@ pub struct QueryModuleAccountByNameResponse { /// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Bech32PrefixRequest {} /// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Bech32PrefixResponse { #[prost(string, tag = "1")] @@ -133,6 +149,7 @@ pub struct Bech32PrefixResponse { /// AddressBytesToStringRequest is the request type for AddressString rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddressBytesToStringRequest { #[prost(bytes = "vec", tag = "1")] @@ -141,6 +158,7 @@ pub struct AddressBytesToStringRequest { /// AddressBytesToStringResponse is the response type for AddressString rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddressBytesToStringResponse { #[prost(string, tag = "1")] @@ -149,6 +167,7 @@ pub struct AddressBytesToStringResponse { /// AddressStringToBytesRequest is the request type for AccountBytes rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddressStringToBytesRequest { #[prost(string, tag = "1")] @@ -157,6 +176,7 @@ pub struct AddressStringToBytesRequest { /// AddressStringToBytesResponse is the response type for AddressBytes rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddressStringToBytesResponse { #[prost(bytes = "vec", tag = "1")] @@ -165,6 +185,7 @@ pub struct AddressStringToBytesResponse { /// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method /// /// Since: cosmos-sdk 0.46.2 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountAddressByIdRequest { /// id is the account number of the address to be queried. This field @@ -176,6 +197,7 @@ pub struct QueryAccountAddressByIdRequest { /// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method /// /// Since: cosmos-sdk 0.46.2 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountAddressByIdResponse { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs index e6f20df2..05c7bef7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs @@ -13,6 +13,7 @@ impl serde::Serialize for AddressBytesToStringRequest { let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.AddressBytesToStringRequest", len)?; if !self.address_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "addressBytes", pbjson::private::base64::encode(&self.address_bytes).as_str(), @@ -74,20 +75,20 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address_bytes__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::AddressBytes => { if address_bytes__.is_some() { return Err(serde::de::Error::duplicate_field("addressBytes")); } address_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -177,19 +178,19 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address_string__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::AddressString => { if address_string__.is_some() { return Err(serde::de::Error::duplicate_field("addressString")); } - address_string__ = Some(map.next_value()?); + address_string__ = Some(map_.next_value()?); } } } @@ -277,19 +278,19 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address_string__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::AddressString => { if address_string__.is_some() { return Err(serde::de::Error::duplicate_field("addressString")); } - address_string__ = Some(map.next_value()?); + address_string__ = Some(map_.next_value()?); } } } @@ -319,6 +320,7 @@ impl serde::Serialize for AddressStringToBytesResponse { let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.AddressStringToBytesResponse", len)?; if !self.address_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "addressBytes", pbjson::private::base64::encode(&self.address_bytes).as_str(), @@ -380,20 +382,20 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address_bytes__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::AddressBytes => { if address_bytes__.is_some() { return Err(serde::de::Error::duplicate_field("addressBytes")); } address_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -439,12 +441,14 @@ impl serde::Serialize for BaseAccount { struct_ser.serialize_field("pubKey", v)?; } if self.account_number != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "accountNumber", ToString::to_string(&self.account_number).as_str(), )?; } if self.sequence != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; } struct_ser.end() @@ -514,7 +518,7 @@ impl<'de> serde::Deserialize<'de> for BaseAccount { formatter.write_str("struct cosmos.auth.v1beta1.BaseAccount") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -522,26 +526,26 @@ impl<'de> serde::Deserialize<'de> for BaseAccount { let mut pub_key__ = None; let mut account_number__ = None; let mut sequence__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::PubKey => { if pub_key__.is_some() { return Err(serde::de::Error::duplicate_field("pubKey")); } - pub_key__ = map.next_value()?; + pub_key__ = map_.next_value()?; } GeneratedField::AccountNumber => { if account_number__.is_some() { return Err(serde::de::Error::duplicate_field("accountNumber")); } account_number__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -550,7 +554,7 @@ impl<'de> serde::Deserialize<'de> for BaseAccount { return Err(serde::de::Error::duplicate_field("sequence")); } sequence__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -626,12 +630,12 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { formatter.write_str("struct cosmos.auth.v1beta1.Bech32PrefixRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(Bech32PrefixRequest {}) } @@ -713,18 +717,21 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { formatter.write_str("struct cosmos.auth.v1beta1.Bech32PrefixResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut bech32_prefix__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Bech32Prefix => { if bech32_prefix__.is_some() { return Err(serde::de::Error::duplicate_field("bech32Prefix")); } - bech32_prefix__ = Some(map.next_value()?); + bech32_prefix__ = Some(map_.next_value()?); } } } @@ -818,25 +825,25 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.auth.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params__ = None; let mut accounts__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } GeneratedField::Accounts => { if accounts__.is_some() { return Err(serde::de::Error::duplicate_field("accounts")); } - accounts__ = Some(map.next_value()?); + accounts__ = Some(map_.next_value()?); } } } @@ -939,32 +946,32 @@ impl<'de> serde::Deserialize<'de> for ModuleAccount { formatter.write_str("struct cosmos.auth.v1beta1.ModuleAccount") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut base_account__ = None; let mut name__ = None; let mut permissions__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BaseAccount => { if base_account__.is_some() { return Err(serde::de::Error::duplicate_field("baseAccount")); } - base_account__ = map.next_value()?; + base_account__ = map_.next_value()?; } GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Permissions => { if permissions__.is_some() { return Err(serde::de::Error::duplicate_field("permissions")); } - permissions__ = Some(map.next_value()?); + permissions__ = Some(map_.next_value()?); } } } @@ -1007,30 +1014,35 @@ impl serde::Serialize for Params { } let mut struct_ser = serializer.serialize_struct("cosmos.auth.v1beta1.Params", len)?; if self.max_memo_characters != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "maxMemoCharacters", ToString::to_string(&self.max_memo_characters).as_str(), )?; } if self.tx_sig_limit != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "txSigLimit", ToString::to_string(&self.tx_sig_limit).as_str(), )?; } if self.tx_size_cost_per_byte != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "txSizeCostPerByte", ToString::to_string(&self.tx_size_cost_per_byte).as_str(), )?; } if self.sig_verify_cost_ed25519 != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "sigVerifyCostEd25519", ToString::to_string(&self.sig_verify_cost_ed25519).as_str(), )?; } if self.sig_verify_cost_secp256k1 != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "sigVerifyCostSecp256k1", ToString::to_string(&self.sig_verify_cost_secp256k1).as_str(), @@ -1117,7 +1129,7 @@ impl<'de> serde::Deserialize<'de> for Params { formatter.write_str("struct cosmos.auth.v1beta1.Params") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1126,14 +1138,14 @@ impl<'de> serde::Deserialize<'de> for Params { let mut tx_size_cost_per_byte__ = None; let mut sig_verify_cost_ed25519__ = None; let mut sig_verify_cost_secp256k1__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MaxMemoCharacters => { if max_memo_characters__.is_some() { return Err(serde::de::Error::duplicate_field("maxMemoCharacters")); } max_memo_characters__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1142,7 +1154,7 @@ impl<'de> serde::Deserialize<'de> for Params { return Err(serde::de::Error::duplicate_field("txSigLimit")); } tx_sig_limit__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1151,7 +1163,7 @@ impl<'de> serde::Deserialize<'de> for Params { return Err(serde::de::Error::duplicate_field("txSizeCostPerByte")); } tx_size_cost_per_byte__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1162,7 +1174,7 @@ impl<'de> serde::Deserialize<'de> for Params { )); } sig_verify_cost_ed25519__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1173,7 +1185,7 @@ impl<'de> serde::Deserialize<'de> for Params { )); } sig_verify_cost_secp256k1__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1205,6 +1217,7 @@ impl serde::Serialize for QueryAccountAddressByIdRequest { let mut struct_ser = serializer .serialize_struct("cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", len)?; if self.id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; } struct_ser.end() @@ -1263,20 +1276,20 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1368,19 +1381,19 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut account_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::AccountAddress => { if account_address__.is_some() { return Err(serde::de::Error::duplicate_field("accountAddress")); } - account_address__ = Some(map.next_value()?); + account_address__ = Some(map_.next_value()?); } } } @@ -1466,18 +1479,18 @@ impl<'de> serde::Deserialize<'de> for QueryAccountRequest { formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -1563,18 +1576,21 @@ impl<'de> serde::Deserialize<'de> for QueryAccountResponse { formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut account__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Account => { if account__.is_some() { return Err(serde::de::Error::duplicate_field("account")); } - account__ = map.next_value()?; + account__ = map_.next_value()?; } } } @@ -1658,18 +1674,21 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { formatter.write_str("struct cosmos.auth.v1beta1.QueryAccountsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1765,26 +1784,26 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut accounts__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Accounts => { if accounts__.is_some() { return Err(serde::de::Error::duplicate_field("accounts")); } - accounts__ = Some(map.next_value()?); + accounts__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1873,19 +1892,19 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } } } @@ -1973,19 +1992,19 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut account__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Account => { if account__.is_some() { return Err(serde::de::Error::duplicate_field("account")); } - account__ = map.next_value()?; + account__ = map_.next_value()?; } } } @@ -2060,13 +2079,13 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryModuleAccountsRequest {}) } @@ -2150,19 +2169,19 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut accounts__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Accounts => { if accounts__.is_some() { return Err(serde::de::Error::duplicate_field("accounts")); } - accounts__ = Some(map.next_value()?); + accounts__ = Some(map_.next_value()?); } } } @@ -2237,12 +2256,12 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.auth.v1beta1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryParamsRequest {}) } @@ -2324,18 +2343,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.auth.v1beta1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs index 3ef99f18..17d96c04 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// GenericAuthorization gives the grantee unrestricted permissions to execute /// the provided method on behalf of the granter's account. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenericAuthorization { /// Msg, identified by it's type URL, to grant unrestricted permissions to execute @@ -9,6 +10,7 @@ pub struct GenericAuthorization { } /// Grant gives permissions to execute /// the provide method with expiration time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Grant { #[prost(message, optional, tag = "1")] @@ -21,6 +23,7 @@ pub struct Grant { } /// GrantAuthorization extends a grant with both the addresses of the grantee and granter. /// It is used in genesis.proto and query.proto +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GrantAuthorization { #[prost(string, tag = "1")] @@ -33,6 +36,7 @@ pub struct GrantAuthorization { pub expiration: ::core::option::Option<::prost_types::Timestamp>, } /// GrantQueueItem contains the list of TypeURL of a sdk.Msg. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GrantQueueItem { /// msg_type_urls contains the list of TypeURL of a sdk.Msg. @@ -40,6 +44,7 @@ pub struct GrantQueueItem { pub msg_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// EventGrant is emitted on Msg/Grant +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventGrant { /// Msg type URL for which an autorization is granted @@ -53,6 +58,7 @@ pub struct EventGrant { pub grantee: ::prost::alloc::string::String, } /// EventRevoke is emitted on Msg/Revoke +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventRevoke { /// Msg type URL for which an autorization is revoked @@ -66,12 +72,14 @@ pub struct EventRevoke { pub grantee: ::prost::alloc::string::String, } /// GenesisState defines the authz module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, repeated, tag = "1")] pub authorization: ::prost::alloc::vec::Vec, } /// QueryGrantsRequest is the request type for the Query/Grants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGrantsRequest { #[prost(string, tag = "1")] @@ -86,6 +94,7 @@ pub struct QueryGrantsRequest { pub pagination: ::core::option::Option, } /// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGrantsResponse { /// authorizations is a list of grants granted for grantee by granter. @@ -96,6 +105,7 @@ pub struct QueryGrantsResponse { pub pagination: ::core::option::Option, } /// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGranterGrantsRequest { #[prost(string, tag = "1")] @@ -105,6 +115,7 @@ pub struct QueryGranterGrantsRequest { pub pagination: ::core::option::Option, } /// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGranterGrantsResponse { /// grants is a list of grants granted by the granter. @@ -115,6 +126,7 @@ pub struct QueryGranterGrantsResponse { pub pagination: ::core::option::Option, } /// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGranteeGrantsRequest { #[prost(string, tag = "1")] @@ -124,6 +136,7 @@ pub struct QueryGranteeGrantsRequest { pub pagination: ::core::option::Option, } /// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGranteeGrantsResponse { /// grants is a list of grants granted to the grantee. @@ -135,6 +148,7 @@ pub struct QueryGranteeGrantsResponse { } /// MsgGrant is a request type for Grant method. It declares authorization to the grantee /// on behalf of the granter with the provided expiration time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrant { #[prost(string, tag = "1")] @@ -145,6 +159,7 @@ pub struct MsgGrant { pub grant: ::core::option::Option, } /// MsgExecResponse defines the Msg/MsgExecResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecResponse { #[prost(bytes = "vec", repeated, tag = "1")] @@ -153,6 +168,7 @@ pub struct MsgExecResponse { /// MsgExec attempts to execute the provided messages using /// authorizations granted to the grantee. Each message should have only /// one signer corresponding to the granter of the authorization. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExec { #[prost(string, tag = "1")] @@ -164,10 +180,12 @@ pub struct MsgExec { pub msgs: ::prost::alloc::vec::Vec<::prost_types::Any>, } /// MsgGrantResponse defines the Msg/MsgGrant response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrantResponse {} /// MsgRevoke revokes any authorization with the provided sdk.Msg type on the /// granter's account with that has been granted to the grantee. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevoke { #[prost(string, tag = "1")] @@ -178,6 +196,7 @@ pub struct MsgRevoke { pub msg_type_url: ::prost::alloc::string::String, } /// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeResponse {} include!("cosmos.authz.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs index 16dce0fa..8e69edd5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs @@ -84,32 +84,32 @@ impl<'de> serde::Deserialize<'de> for EventGrant { formatter.write_str("struct cosmos.authz.v1beta1.EventGrant") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut msg_type_url__ = None; let mut granter__ = None; let mut grantee__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MsgTypeUrl => { if msg_type_url__.is_some() { return Err(serde::de::Error::duplicate_field("msgTypeUrl")); } - msg_type_url__ = Some(map.next_value()?); + msg_type_url__ = Some(map_.next_value()?); } GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } } } @@ -209,32 +209,32 @@ impl<'de> serde::Deserialize<'de> for EventRevoke { formatter.write_str("struct cosmos.authz.v1beta1.EventRevoke") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut msg_type_url__ = None; let mut granter__ = None; let mut grantee__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MsgTypeUrl => { if msg_type_url__.is_some() { return Err(serde::de::Error::duplicate_field("msgTypeUrl")); } - msg_type_url__ = Some(map.next_value()?); + msg_type_url__ = Some(map_.next_value()?); } GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } } } @@ -322,18 +322,21 @@ impl<'de> serde::Deserialize<'de> for GenericAuthorization { formatter.write_str("struct cosmos.authz.v1beta1.GenericAuthorization") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut msg__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Msg => { if msg__.is_some() { return Err(serde::de::Error::duplicate_field("msg")); } - msg__ = Some(map.next_value()?); + msg__ = Some(map_.next_value()?); } } } @@ -419,18 +422,18 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.authz.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut authorization__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Authorization => { if authorization__.is_some() { return Err(serde::de::Error::duplicate_field("authorization")); } - authorization__ = Some(map.next_value()?); + authorization__ = Some(map_.next_value()?); } } } @@ -523,25 +526,25 @@ impl<'de> serde::Deserialize<'de> for Grant { formatter.write_str("struct cosmos.authz.v1beta1.Grant") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut authorization__ = None; let mut expiration__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Authorization => { if authorization__.is_some() { return Err(serde::de::Error::duplicate_field("authorization")); } - authorization__ = map.next_value()?; + authorization__ = map_.next_value()?; } GeneratedField::Expiration => { if expiration__.is_some() { return Err(serde::de::Error::duplicate_field("expiration")); } - expiration__ = map.next_value()?; + expiration__ = map_.next_value()?; } } } @@ -648,7 +651,7 @@ impl<'de> serde::Deserialize<'de> for GrantAuthorization { formatter.write_str("struct cosmos.authz.v1beta1.GrantAuthorization") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -656,31 +659,31 @@ impl<'de> serde::Deserialize<'de> for GrantAuthorization { let mut grantee__ = None; let mut authorization__ = None; let mut expiration__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::Authorization => { if authorization__.is_some() { return Err(serde::de::Error::duplicate_field("authorization")); } - authorization__ = map.next_value()?; + authorization__ = map_.next_value()?; } GeneratedField::Expiration => { if expiration__.is_some() { return Err(serde::de::Error::duplicate_field("expiration")); } - expiration__ = map.next_value()?; + expiration__ = map_.next_value()?; } } } @@ -769,18 +772,18 @@ impl<'de> serde::Deserialize<'de> for GrantQueueItem { formatter.write_str("struct cosmos.authz.v1beta1.GrantQueueItem") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut msg_type_urls__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MsgTypeUrls => { if msg_type_urls__.is_some() { return Err(serde::de::Error::duplicate_field("msgTypeUrls")); } - msg_type_urls__ = Some(map.next_value()?); + msg_type_urls__ = Some(map_.next_value()?); } } } @@ -873,25 +876,25 @@ impl<'de> serde::Deserialize<'de> for MsgExec { formatter.write_str("struct cosmos.authz.v1beta1.MsgExec") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut grantee__ = None; let mut msgs__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::Msgs => { if msgs__.is_some() { return Err(serde::de::Error::duplicate_field("msgs")); } - msgs__ = Some(map.next_value()?); + msgs__ = Some(map_.next_value()?); } } } @@ -981,19 +984,19 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { formatter.write_str("struct cosmos.authz.v1beta1.MsgExecResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut results__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Results => { if results__.is_some() { return Err(serde::de::Error::duplicate_field("results")); } results__ = Some( - map.next_value::>>()? + map_.next_value::>>()? .into_iter() .map(|x| x.0) .collect(), @@ -1098,32 +1101,32 @@ impl<'de> serde::Deserialize<'de> for MsgGrant { formatter.write_str("struct cosmos.authz.v1beta1.MsgGrant") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut granter__ = None; let mut grantee__ = None; let mut grant__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::Grant => { if grant__.is_some() { return Err(serde::de::Error::duplicate_field("grant")); } - grant__ = map.next_value()?; + grant__ = map_.next_value()?; } } } @@ -1196,12 +1199,12 @@ impl<'de> serde::Deserialize<'de> for MsgGrantResponse { formatter.write_str("struct cosmos.authz.v1beta1.MsgGrantResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgGrantResponse {}) } @@ -1298,32 +1301,32 @@ impl<'de> serde::Deserialize<'de> for MsgRevoke { formatter.write_str("struct cosmos.authz.v1beta1.MsgRevoke") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut granter__ = None; let mut grantee__ = None; let mut msg_type_url__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::MsgTypeUrl => { if msg_type_url__.is_some() { return Err(serde::de::Error::duplicate_field("msgTypeUrl")); } - msg_type_url__ = Some(map.next_value()?); + msg_type_url__ = Some(map_.next_value()?); } } } @@ -1396,12 +1399,12 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeResponse { formatter.write_str("struct cosmos.authz.v1beta1.MsgRevokeResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgRevokeResponse {}) } @@ -1493,26 +1496,26 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut grantee__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1609,26 +1612,26 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut grants__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Grants => { if grants__.is_some() { return Err(serde::de::Error::duplicate_field("grants")); } - grants__ = Some(map.next_value()?); + grants__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1725,26 +1728,26 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut granter__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1841,26 +1844,26 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut grants__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Grants => { if grants__.is_some() { return Err(serde::de::Error::duplicate_field("grants")); } - grants__ = Some(map.next_value()?); + grants__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1977,7 +1980,7 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { formatter.write_str("struct cosmos.authz.v1beta1.QueryGrantsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1985,31 +1988,31 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { let mut grantee__ = None; let mut msg_type_url__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::MsgTypeUrl => { if msg_type_url__.is_some() { return Err(serde::de::Error::duplicate_field("msgTypeUrl")); } - msg_type_url__ = Some(map.next_value()?); + msg_type_url__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2106,25 +2109,25 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsResponse { formatter.write_str("struct cosmos.authz.v1beta1.QueryGrantsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut grants__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Grants => { if grants__.is_some() { return Err(serde::de::Error::duplicate_field("grants")); } - grants__ = Some(map.next_value()?); + grants__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs index bdfcea12..996d974c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs @@ -3,12 +3,14 @@ /// the granter's account. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SendAuthorization { #[prost(message, repeated, tag = "1")] pub spend_limit: ::prost::alloc::vec::Vec, } /// Params defines the parameters for the bank module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(message, repeated, tag = "1")] @@ -18,6 +20,7 @@ pub struct Params { } /// SendEnabled maps coin denom to a send_enabled status (whether a denom is /// sendable). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SendEnabled { #[prost(string, tag = "1")] @@ -26,6 +29,7 @@ pub struct SendEnabled { pub enabled: bool, } /// Input models transaction input. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Input { #[prost(string, tag = "1")] @@ -34,6 +38,7 @@ pub struct Input { pub coins: ::prost::alloc::vec::Vec, } /// Output models transaction outputs. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Output { #[prost(string, tag = "1")] @@ -44,6 +49,7 @@ pub struct Output { /// Supply represents a struct that passively keeps track of the total supply /// amounts in the network. /// This message is deprecated now that supply is indexed by denom. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Supply { #[prost(message, repeated, tag = "1")] @@ -51,6 +57,7 @@ pub struct Supply { } /// DenomUnit represents a struct that describes a given /// denomination unit of the basic token. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DenomUnit { /// denom represents the string name of the given denom unit (e.g uatom). @@ -69,6 +76,7 @@ pub struct DenomUnit { } /// Metadata represents a struct that describes /// a basic token. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Metadata { #[prost(string, tag = "1")] @@ -107,6 +115,7 @@ pub struct Metadata { pub uri_hash: ::prost::alloc::string::String, } /// GenesisState defines the bank module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of the module. @@ -125,6 +134,7 @@ pub struct GenesisState { } /// Balance defines an account address and balance pair used in the bank module's /// genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Balance { /// address is the address of the balance holder. @@ -135,6 +145,7 @@ pub struct Balance { pub coins: ::prost::alloc::vec::Vec, } /// QueryBalanceRequest is the request type for the Query/Balance RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBalanceRequest { /// address is the address to query balances for. @@ -145,6 +156,7 @@ pub struct QueryBalanceRequest { pub denom: ::prost::alloc::string::String, } /// QueryBalanceResponse is the response type for the Query/Balance RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBalanceResponse { /// balance is the balance of the coin. @@ -152,6 +164,7 @@ pub struct QueryBalanceResponse { pub balance: ::core::option::Option, } /// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllBalancesRequest { /// address is the address to query balances for. @@ -163,6 +176,7 @@ pub struct QueryAllBalancesRequest { } /// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllBalancesResponse { /// balances is the balances of all the coins. @@ -176,6 +190,7 @@ pub struct QueryAllBalancesResponse { /// an account's spendable balances. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySpendableBalancesRequest { /// address is the address to query spendable balances for. @@ -189,6 +204,7 @@ pub struct QuerySpendableBalancesRequest { /// an account's spendable balances. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySpendableBalancesResponse { /// balances is the spendable balances of all the coins. @@ -200,6 +216,7 @@ pub struct QuerySpendableBalancesResponse { } /// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalSupplyRequest { /// pagination defines an optional pagination for the request. @@ -210,6 +227,7 @@ pub struct QueryTotalSupplyRequest { } /// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalSupplyResponse { /// supply is the supply of the coins @@ -222,6 +240,7 @@ pub struct QueryTotalSupplyResponse { pub pagination: ::core::option::Option, } /// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySupplyOfRequest { /// denom is the coin denom to query balances for. @@ -229,6 +248,7 @@ pub struct QuerySupplyOfRequest { pub denom: ::prost::alloc::string::String, } /// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySupplyOfResponse { /// amount is the supply of the coin. @@ -236,15 +256,18 @@ pub struct QuerySupplyOfResponse { pub amount: ::core::option::Option, } /// QueryParamsRequest defines the request type for querying x/bank parameters. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse defines the response type for querying x/bank parameters. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } /// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomsMetadataRequest { /// pagination defines an optional pagination for the request. @@ -253,6 +276,7 @@ pub struct QueryDenomsMetadataRequest { } /// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomsMetadataResponse { /// metadata provides the client information for all the registered tokens. @@ -263,6 +287,7 @@ pub struct QueryDenomsMetadataResponse { pub pagination: ::core::option::Option, } /// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomMetadataRequest { /// denom is the coin denom to query the metadata for. @@ -271,6 +296,7 @@ pub struct QueryDenomMetadataRequest { } /// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomMetadataResponse { /// metadata describes and provides all the client information for the requested token. @@ -280,6 +306,7 @@ pub struct QueryDenomMetadataResponse { /// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, /// which queries for a paginated set of all account holders of a particular /// denomination. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomOwnersRequest { /// denom defines the coin denomination to query all account holders for. @@ -294,6 +321,7 @@ pub struct QueryDenomOwnersRequest { /// balance of the denominated token. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DenomOwner { /// address defines the address that owns a particular denomination. @@ -306,6 +334,7 @@ pub struct DenomOwner { /// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomOwnersResponse { #[prost(message, repeated, tag = "1")] @@ -315,6 +344,7 @@ pub struct QueryDenomOwnersResponse { pub pagination: ::core::option::Option, } /// MsgSend represents a message to send coins from one account to another. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSend { #[prost(string, tag = "1")] @@ -325,9 +355,11 @@ pub struct MsgSend { pub amount: ::prost::alloc::vec::Vec, } /// MsgSendResponse defines the Msg/Send response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSendResponse {} /// MsgMultiSend represents an arbitrary multi-in, multi-out send message. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMultiSend { #[prost(message, repeated, tag = "1")] @@ -336,6 +368,7 @@ pub struct MsgMultiSend { pub outputs: ::prost::alloc::vec::Vec, } /// MsgMultiSendResponse defines the Msg/MultiSend response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMultiSendResponse {} include!("cosmos.bank.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs index 6e2c8c7b..b94ff2a1 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs @@ -76,25 +76,25 @@ impl<'de> serde::Deserialize<'de> for Balance { formatter.write_str("struct cosmos.bank.v1beta1.Balance") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut coins__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Coins => { if coins__.is_some() { return Err(serde::de::Error::duplicate_field("coins")); } - coins__ = Some(map.next_value()?); + coins__ = Some(map_.next_value()?); } } } @@ -184,25 +184,25 @@ impl<'de> serde::Deserialize<'de> for DenomOwner { formatter.write_str("struct cosmos.bank.v1beta1.DenomOwner") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut balance__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Balance => { if balance__.is_some() { return Err(serde::de::Error::duplicate_field("balance")); } - balance__ = map.next_value()?; + balance__ = map_.next_value()?; } } } @@ -300,27 +300,27 @@ impl<'de> serde::Deserialize<'de> for DenomUnit { formatter.write_str("struct cosmos.bank.v1beta1.DenomUnit") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut denom__ = None; let mut exponent__ = None; let mut aliases__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Denom => { if denom__.is_some() { return Err(serde::de::Error::duplicate_field("denom")); } - denom__ = Some(map.next_value()?); + denom__ = Some(map_.next_value()?); } GeneratedField::Exponent => { if exponent__.is_some() { return Err(serde::de::Error::duplicate_field("exponent")); } exponent__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -328,7 +328,7 @@ impl<'de> serde::Deserialize<'de> for DenomUnit { if aliases__.is_some() { return Err(serde::de::Error::duplicate_field("aliases")); } - aliases__ = Some(map.next_value()?); + aliases__ = Some(map_.next_value()?); } } } @@ -442,7 +442,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.bank.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -450,31 +450,31 @@ impl<'de> serde::Deserialize<'de> for GenesisState { let mut balances__ = None; let mut supply__ = None; let mut denom_metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } GeneratedField::Balances => { if balances__.is_some() { return Err(serde::de::Error::duplicate_field("balances")); } - balances__ = Some(map.next_value()?); + balances__ = Some(map_.next_value()?); } GeneratedField::Supply => { if supply__.is_some() { return Err(serde::de::Error::duplicate_field("supply")); } - supply__ = Some(map.next_value()?); + supply__ = Some(map_.next_value()?); } GeneratedField::DenomMetadata => { if denom_metadata__.is_some() { return Err(serde::de::Error::duplicate_field("denomMetadata")); } - denom_metadata__ = Some(map.next_value()?); + denom_metadata__ = Some(map_.next_value()?); } } } @@ -570,25 +570,25 @@ impl<'de> serde::Deserialize<'de> for Input { formatter.write_str("struct cosmos.bank.v1beta1.Input") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut coins__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Coins => { if coins__.is_some() { return Err(serde::de::Error::duplicate_field("coins")); } - coins__ = Some(map.next_value()?); + coins__ = Some(map_.next_value()?); } } } @@ -737,7 +737,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { formatter.write_str("struct cosmos.bank.v1beta1.Metadata") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -749,55 +749,55 @@ impl<'de> serde::Deserialize<'de> for Metadata { let mut symbol__ = None; let mut uri__ = None; let mut uri_hash__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } GeneratedField::DenomUnits => { if denom_units__.is_some() { return Err(serde::de::Error::duplicate_field("denomUnits")); } - denom_units__ = Some(map.next_value()?); + denom_units__ = Some(map_.next_value()?); } GeneratedField::Base => { if base__.is_some() { return Err(serde::de::Error::duplicate_field("base")); } - base__ = Some(map.next_value()?); + base__ = Some(map_.next_value()?); } GeneratedField::Display => { if display__.is_some() { return Err(serde::de::Error::duplicate_field("display")); } - display__ = Some(map.next_value()?); + display__ = Some(map_.next_value()?); } GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Symbol => { if symbol__.is_some() { return Err(serde::de::Error::duplicate_field("symbol")); } - symbol__ = Some(map.next_value()?); + symbol__ = Some(map_.next_value()?); } GeneratedField::Uri => { if uri__.is_some() { return Err(serde::de::Error::duplicate_field("uri")); } - uri__ = Some(map.next_value()?); + uri__ = Some(map_.next_value()?); } GeneratedField::UriHash => { if uri_hash__.is_some() { return Err(serde::de::Error::duplicate_field("uriHash")); } - uri_hash__ = Some(map.next_value()?); + uri_hash__ = Some(map_.next_value()?); } } } @@ -894,25 +894,25 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSend { formatter.write_str("struct cosmos.bank.v1beta1.MsgMultiSend") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut inputs__ = None; let mut outputs__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Inputs => { if inputs__.is_some() { return Err(serde::de::Error::duplicate_field("inputs")); } - inputs__ = Some(map.next_value()?); + inputs__ = Some(map_.next_value()?); } GeneratedField::Outputs => { if outputs__.is_some() { return Err(serde::de::Error::duplicate_field("outputs")); } - outputs__ = Some(map.next_value()?); + outputs__ = Some(map_.next_value()?); } } } @@ -988,12 +988,15 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { formatter.write_str("struct cosmos.bank.v1beta1.MsgMultiSendResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgMultiSendResponse {}) } @@ -1096,32 +1099,32 @@ impl<'de> serde::Deserialize<'de> for MsgSend { formatter.write_str("struct cosmos.bank.v1beta1.MsgSend") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut from_address__ = None; let mut to_address__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::FromAddress => { if from_address__.is_some() { return Err(serde::de::Error::duplicate_field("fromAddress")); } - from_address__ = Some(map.next_value()?); + from_address__ = Some(map_.next_value()?); } GeneratedField::ToAddress => { if to_address__.is_some() { return Err(serde::de::Error::duplicate_field("toAddress")); } - to_address__ = Some(map.next_value()?); + to_address__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -1193,12 +1196,12 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { formatter.write_str("struct cosmos.bank.v1beta1.MsgSendResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgSendResponse {}) } @@ -1287,25 +1290,25 @@ impl<'de> serde::Deserialize<'de> for Output { formatter.write_str("struct cosmos.bank.v1beta1.Output") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut coins__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Coins => { if coins__.is_some() { return Err(serde::de::Error::duplicate_field("coins")); } - coins__ = Some(map.next_value()?); + coins__ = Some(map_.next_value()?); } } } @@ -1402,19 +1405,19 @@ impl<'de> serde::Deserialize<'de> for Params { formatter.write_str("struct cosmos.bank.v1beta1.Params") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut send_enabled__ = None; let mut default_send_enabled__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::SendEnabled => { if send_enabled__.is_some() { return Err(serde::de::Error::duplicate_field("sendEnabled")); } - send_enabled__ = Some(map.next_value()?); + send_enabled__ = Some(map_.next_value()?); } GeneratedField::DefaultSendEnabled => { if default_send_enabled__.is_some() { @@ -1422,7 +1425,7 @@ impl<'de> serde::Deserialize<'de> for Params { "defaultSendEnabled", )); } - default_send_enabled__ = Some(map.next_value()?); + default_send_enabled__ = Some(map_.next_value()?); } } } @@ -1515,26 +1518,26 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1631,26 +1634,26 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut balances__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Balances => { if balances__.is_some() { return Err(serde::de::Error::duplicate_field("balances")); } - balances__ = Some(map.next_value()?); + balances__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1745,25 +1748,25 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { formatter.write_str("struct cosmos.bank.v1beta1.QueryBalanceRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut denom__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Denom => { if denom__.is_some() { return Err(serde::de::Error::duplicate_field("denom")); } - denom__ = Some(map.next_value()?); + denom__ = Some(map_.next_value()?); } } } @@ -1850,18 +1853,21 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { formatter.write_str("struct cosmos.bank.v1beta1.QueryBalanceResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut balance__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Balance => { if balance__.is_some() { return Err(serde::de::Error::duplicate_field("balance")); } - balance__ = map.next_value()?; + balance__ = map_.next_value()?; } } } @@ -1947,19 +1953,19 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut denom__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Denom => { if denom__.is_some() { return Err(serde::de::Error::duplicate_field("denom")); } - denom__ = Some(map.next_value()?); + denom__ = Some(map_.next_value()?); } } } @@ -2047,19 +2053,19 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = map.next_value()?; + metadata__ = map_.next_value()?; } } } @@ -2155,26 +2161,26 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut denom__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Denom => { if denom__.is_some() { return Err(serde::de::Error::duplicate_field("denom")); } - denom__ = Some(map.next_value()?); + denom__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2271,26 +2277,26 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut denom_owners__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DenomOwners => { if denom_owners__.is_some() { return Err(serde::de::Error::duplicate_field("denomOwners")); } - denom_owners__ = Some(map.next_value()?); + denom_owners__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2379,19 +2385,19 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2487,26 +2493,26 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut metadatas__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Metadatas => { if metadatas__.is_some() { return Err(serde::de::Error::duplicate_field("metadatas")); } - metadatas__ = Some(map.next_value()?); + metadatas__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2582,12 +2588,12 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.bank.v1beta1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryParamsRequest {}) } @@ -2669,18 +2675,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.bank.v1beta1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } } } @@ -2774,26 +2780,26 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2890,26 +2896,26 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut balances__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Balances => { if balances__.is_some() { return Err(serde::de::Error::duplicate_field("balances")); } - balances__ = Some(map.next_value()?); + balances__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2996,18 +3002,21 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { formatter.write_str("struct cosmos.bank.v1beta1.QuerySupplyOfRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut denom__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Denom => { if denom__.is_some() { return Err(serde::de::Error::duplicate_field("denom")); } - denom__ = Some(map.next_value()?); + denom__ = Some(map_.next_value()?); } } } @@ -3095,19 +3104,19 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = map.next_value()?; + amount__ = map_.next_value()?; } } } @@ -3193,19 +3202,19 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3301,26 +3310,26 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut supply__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Supply => { if supply__.is_some() { return Err(serde::de::Error::duplicate_field("supply")); } - supply__ = Some(map.next_value()?); + supply__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3407,18 +3416,18 @@ impl<'de> serde::Deserialize<'de> for SendAuthorization { formatter.write_str("struct cosmos.bank.v1beta1.SendAuthorization") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut spend_limit__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::SpendLimit => { if spend_limit__.is_some() { return Err(serde::de::Error::duplicate_field("spendLimit")); } - spend_limit__ = Some(map.next_value()?); + spend_limit__ = Some(map_.next_value()?); } } } @@ -3511,25 +3520,25 @@ impl<'de> serde::Deserialize<'de> for SendEnabled { formatter.write_str("struct cosmos.bank.v1beta1.SendEnabled") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut denom__ = None; let mut enabled__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Denom => { if denom__.is_some() { return Err(serde::de::Error::duplicate_field("denom")); } - denom__ = Some(map.next_value()?); + denom__ = Some(map_.next_value()?); } GeneratedField::Enabled => { if enabled__.is_some() { return Err(serde::de::Error::duplicate_field("enabled")); } - enabled__ = Some(map.next_value()?); + enabled__ = Some(map_.next_value()?); } } } @@ -3611,18 +3620,18 @@ impl<'de> serde::Deserialize<'de> for Supply { formatter.write_str("struct cosmos.bank.v1beta1.Supply") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut total__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Total => { if total__.is_some() { return Err(serde::de::Error::duplicate_field("total")); } - total__ = Some(map.next_value()?); + total__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs index aab14bf0..926a3fd4 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// TxResponse defines a structure containing relevant tx data and metadata. The /// tags are stringified and the log is JSON decoded. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxResponse { /// The block height @@ -52,6 +53,7 @@ pub struct TxResponse { pub events: ::prost::alloc::vec::Vec<::tendermint_proto::v0_34::abci::Event>, } /// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbciMessageLog { #[prost(uint32, tag = "1")] @@ -65,6 +67,7 @@ pub struct AbciMessageLog { } /// StringEvent defines en Event object wrapper where all the attributes /// contain key/value pairs that are strings instead of raw bytes. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StringEvent { #[prost(string, tag = "1")] @@ -74,6 +77,7 @@ pub struct StringEvent { } /// Attribute defines an attribute wrapper where the key and value are /// strings instead of raw bytes. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Attribute { #[prost(string, tag = "1")] @@ -82,6 +86,7 @@ pub struct Attribute { pub value: ::prost::alloc::string::String, } /// GasInfo defines tx execution gas context. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GasInfo { /// GasWanted is the maximum units of work we allow this tx to perform. @@ -92,6 +97,7 @@ pub struct GasInfo { pub gas_used: u64, } /// Result is the union of ResponseFormat and ResponseCheckTx. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { /// Data is any data returned from message or handler execution. It MUST be @@ -116,6 +122,7 @@ pub struct Result { } /// SimulationResponse defines the response generated when a transaction is /// successfully simulated. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulationResponse { #[prost(message, optional, tag = "1")] @@ -125,6 +132,7 @@ pub struct SimulationResponse { } /// MsgData defines the data returned in a Result object during message /// execution. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgData { #[prost(string, tag = "1")] @@ -134,6 +142,7 @@ pub struct MsgData { } /// TxMsgData defines a list of MsgData. A transaction will have a MsgData object /// for each message. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxMsgData { /// data field is deprecated and not populated. @@ -147,6 +156,7 @@ pub struct TxMsgData { pub msg_responses: ::prost::alloc::vec::Vec<::prost_types::Any>, } /// SearchTxsResult defines a structure for querying txs pageable +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchTxsResult { /// Count of all txs diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs index 78c8a001..564486fd 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs @@ -85,21 +85,21 @@ impl<'de> serde::Deserialize<'de> for AbciMessageLog { formatter.write_str("struct cosmos.base.abci.v1beta1.ABCIMessageLog") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut msg_index__ = None; let mut log__ = None; let mut events__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MsgIndex => { if msg_index__.is_some() { return Err(serde::de::Error::duplicate_field("msgIndex")); } msg_index__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -107,13 +107,13 @@ impl<'de> serde::Deserialize<'de> for AbciMessageLog { if log__.is_some() { return Err(serde::de::Error::duplicate_field("log")); } - log__ = Some(map.next_value()?); + log__ = Some(map_.next_value()?); } GeneratedField::Events => { if events__.is_some() { return Err(serde::de::Error::duplicate_field("events")); } - events__ = Some(map.next_value()?); + events__ = Some(map_.next_value()?); } } } @@ -209,25 +209,25 @@ impl<'de> serde::Deserialize<'de> for Attribute { formatter.write_str("struct cosmos.base.abci.v1beta1.Attribute") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut key__ = None; let mut value__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } - key__ = Some(map.next_value()?); + key__ = Some(map_.next_value()?); } GeneratedField::Value => { if value__.is_some() { return Err(serde::de::Error::duplicate_field("value")); } - value__ = Some(map.next_value()?); + value__ = Some(map_.next_value()?); } } } @@ -261,10 +261,12 @@ impl serde::Serialize for GasInfo { let mut struct_ser = serializer.serialize_struct("cosmos.base.abci.v1beta1.GasInfo", len)?; if self.gas_wanted != 0 { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("gasWanted", ToString::to_string(&self.gas_wanted).as_str())?; } if self.gas_used != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("gasUsed", ToString::to_string(&self.gas_used).as_str())?; } struct_ser.end() @@ -323,20 +325,20 @@ impl<'de> serde::Deserialize<'de> for GasInfo { formatter.write_str("struct cosmos.base.abci.v1beta1.GasInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut gas_wanted__ = None; let mut gas_used__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GasWanted => { if gas_wanted__.is_some() { return Err(serde::de::Error::duplicate_field("gasWanted")); } gas_wanted__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -345,7 +347,7 @@ impl<'de> serde::Deserialize<'de> for GasInfo { return Err(serde::de::Error::duplicate_field("gasUsed")); } gas_used__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -384,6 +386,7 @@ impl serde::Serialize for MsgData { struct_ser.serialize_field("msgType", &self.msg_type)?; } if !self.data.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } @@ -443,26 +446,26 @@ impl<'de> serde::Deserialize<'de> for MsgData { formatter.write_str("struct cosmos.base.abci.v1beta1.MsgData") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut msg_type__ = None; let mut data__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MsgType => { if msg_type__.is_some() { return Err(serde::de::Error::duplicate_field("msgType")); } - msg_type__ = Some(map.next_value()?); + msg_type__ = 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<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -503,6 +506,7 @@ impl serde::Serialize for Result { } let mut struct_ser = serializer.serialize_struct("cosmos.base.abci.v1beta1.Result", len)?; if !self.data.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } @@ -575,7 +579,7 @@ impl<'de> serde::Deserialize<'de> for Result { formatter.write_str("struct cosmos.base.abci.v1beta1.Result") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -583,14 +587,14 @@ impl<'de> serde::Deserialize<'de> for Result { let mut log__ = None; let mut events__ = None; let mut msg_responses__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Data => { if data__.is_some() { return Err(serde::de::Error::duplicate_field("data")); } data__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -598,19 +602,19 @@ impl<'de> serde::Deserialize<'de> for Result { if log__.is_some() { return Err(serde::de::Error::duplicate_field("log")); } - log__ = Some(map.next_value()?); + log__ = Some(map_.next_value()?); } GeneratedField::Events => { if events__.is_some() { return Err(serde::de::Error::duplicate_field("events")); } - events__ = Some(map.next_value()?); + events__ = Some(map_.next_value()?); } GeneratedField::MsgResponses => { if msg_responses__.is_some() { return Err(serde::de::Error::duplicate_field("msgResponses")); } - msg_responses__ = Some(map.next_value()?); + msg_responses__ = Some(map_.next_value()?); } } } @@ -654,25 +658,30 @@ impl serde::Serialize for SearchTxsResult { let mut struct_ser = serializer.serialize_struct("cosmos.base.abci.v1beta1.SearchTxsResult", len)?; if self.total_count != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "totalCount", ToString::to_string(&self.total_count).as_str(), )?; } if self.count != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("count", ToString::to_string(&self.count).as_str())?; } if self.page_number != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "pageNumber", ToString::to_string(&self.page_number).as_str(), )?; } if self.page_total != 0 { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("pageTotal", ToString::to_string(&self.page_total).as_str())?; } if self.limit != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?; } if !self.txs.is_empty() { @@ -752,7 +761,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { formatter.write_str("struct cosmos.base.abci.v1beta1.SearchTxsResult") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -762,14 +771,14 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { let mut page_total__ = None; let mut limit__ = None; let mut txs__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::TotalCount => { if total_count__.is_some() { return Err(serde::de::Error::duplicate_field("totalCount")); } total_count__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -778,7 +787,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { return Err(serde::de::Error::duplicate_field("count")); } count__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -787,7 +796,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { return Err(serde::de::Error::duplicate_field("pageNumber")); } page_number__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -796,7 +805,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { return Err(serde::de::Error::duplicate_field("pageTotal")); } page_total__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -805,7 +814,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { return Err(serde::de::Error::duplicate_field("limit")); } limit__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -813,7 +822,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { if txs__.is_some() { return Err(serde::de::Error::duplicate_field("txs")); } - txs__ = Some(map.next_value()?); + txs__ = Some(map_.next_value()?); } } } @@ -912,25 +921,25 @@ impl<'de> serde::Deserialize<'de> for SimulationResponse { formatter.write_str("struct cosmos.base.abci.v1beta1.SimulationResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut gas_info__ = None; let mut result__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GasInfo => { if gas_info__.is_some() { return Err(serde::de::Error::duplicate_field("gasInfo")); } - gas_info__ = map.next_value()?; + gas_info__ = map_.next_value()?; } GeneratedField::Result => { if result__.is_some() { return Err(serde::de::Error::duplicate_field("result")); } - result__ = map.next_value()?; + result__ = map_.next_value()?; } } } @@ -1025,25 +1034,25 @@ impl<'de> serde::Deserialize<'de> for StringEvent { formatter.write_str("struct cosmos.base.abci.v1beta1.StringEvent") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut attributes__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Type => { if r#type__.is_some() { return Err(serde::de::Error::duplicate_field("type")); } - r#type__ = Some(map.next_value()?); + r#type__ = Some(map_.next_value()?); } GeneratedField::Attributes => { if attributes__.is_some() { return Err(serde::de::Error::duplicate_field("attributes")); } - attributes__ = Some(map.next_value()?); + attributes__ = Some(map_.next_value()?); } } } @@ -1138,25 +1147,25 @@ impl<'de> serde::Deserialize<'de> for TxMsgData { formatter.write_str("struct cosmos.base.abci.v1beta1.TxMsgData") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut data__ = None; let mut msg_responses__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Data => { if data__.is_some() { return Err(serde::de::Error::duplicate_field("data")); } - data__ = Some(map.next_value()?); + data__ = Some(map_.next_value()?); } GeneratedField::MsgResponses => { if msg_responses__.is_some() { return Err(serde::de::Error::duplicate_field("msgResponses")); } - msg_responses__ = Some(map.next_value()?); + msg_responses__ = Some(map_.next_value()?); } } } @@ -1223,6 +1232,7 @@ impl serde::Serialize for TxResponse { let mut struct_ser = serializer.serialize_struct("cosmos.base.abci.v1beta1.TxResponse", len)?; if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if !self.txhash.is_empty() { @@ -1247,10 +1257,12 @@ impl serde::Serialize for TxResponse { struct_ser.serialize_field("info", &self.info)?; } if self.gas_wanted != 0 { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("gasWanted", ToString::to_string(&self.gas_wanted).as_str())?; } if self.gas_used != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("gasUsed", ToString::to_string(&self.gas_used).as_str())?; } if let Some(v) = self.tx.as_ref() { @@ -1357,7 +1369,7 @@ impl<'de> serde::Deserialize<'de> for TxResponse { formatter.write_str("struct cosmos.base.abci.v1beta1.TxResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1374,14 +1386,14 @@ impl<'de> serde::Deserialize<'de> for TxResponse { let mut tx__ = None; let mut timestamp__ = None; let mut events__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1389,20 +1401,20 @@ impl<'de> serde::Deserialize<'de> for TxResponse { if txhash__.is_some() { return Err(serde::de::Error::duplicate_field("txhash")); } - txhash__ = Some(map.next_value()?); + txhash__ = Some(map_.next_value()?); } GeneratedField::Codespace => { if codespace__.is_some() { return Err(serde::de::Error::duplicate_field("codespace")); } - codespace__ = Some(map.next_value()?); + codespace__ = Some(map_.next_value()?); } GeneratedField::Code => { if code__.is_some() { return Err(serde::de::Error::duplicate_field("code")); } code__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1410,32 +1422,32 @@ impl<'de> serde::Deserialize<'de> for TxResponse { if data__.is_some() { return Err(serde::de::Error::duplicate_field("data")); } - data__ = Some(map.next_value()?); + data__ = Some(map_.next_value()?); } GeneratedField::RawLog => { if raw_log__.is_some() { return Err(serde::de::Error::duplicate_field("rawLog")); } - raw_log__ = Some(map.next_value()?); + raw_log__ = Some(map_.next_value()?); } GeneratedField::Logs => { if logs__.is_some() { return Err(serde::de::Error::duplicate_field("logs")); } - logs__ = Some(map.next_value()?); + logs__ = Some(map_.next_value()?); } GeneratedField::Info => { if info__.is_some() { return Err(serde::de::Error::duplicate_field("info")); } - info__ = Some(map.next_value()?); + info__ = Some(map_.next_value()?); } GeneratedField::GasWanted => { if gas_wanted__.is_some() { return Err(serde::de::Error::duplicate_field("gasWanted")); } gas_wanted__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1444,7 +1456,7 @@ impl<'de> serde::Deserialize<'de> for TxResponse { return Err(serde::de::Error::duplicate_field("gasUsed")); } gas_used__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1452,19 +1464,19 @@ impl<'de> serde::Deserialize<'de> for TxResponse { if tx__.is_some() { return Err(serde::de::Error::duplicate_field("tx")); } - tx__ = map.next_value()?; + tx__ = map_.next_value()?; } GeneratedField::Timestamp => { if timestamp__.is_some() { return Err(serde::de::Error::duplicate_field("timestamp")); } - timestamp__ = Some(map.next_value()?); + timestamp__ = Some(map_.next_value()?); } GeneratedField::Events => { if events__.is_some() { return Err(serde::de::Error::duplicate_field("events")); } - events__ = Some(map.next_value()?); + events__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs index 79623a3a..ddd20355 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs @@ -1,11 +1,13 @@ // @generated /// Pairs defines a repeated slice of Pair objects. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pairs { #[prost(message, repeated, tag = "1")] pub pairs: ::prost::alloc::vec::Vec, } /// Pair defines a key/value bytes tuple. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pair { #[prost(bytes = "vec", tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs index 5ed923da..eeed8c9c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs @@ -15,10 +15,12 @@ impl serde::Serialize for Pair { } let mut struct_ser = serializer.serialize_struct("cosmos.base.kv.v1beta1.Pair", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } if !self.value.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "value", pbjson::private::base64::encode(&self.value).as_str(), @@ -80,20 +82,20 @@ impl<'de> serde::Deserialize<'de> for Pair { formatter.write_str("struct cosmos.base.kv.v1beta1.Pair") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut key__ = None; let mut value__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -102,7 +104,7 @@ impl<'de> serde::Deserialize<'de> for Pair { return Err(serde::de::Error::duplicate_field("value")); } value__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -186,18 +188,18 @@ impl<'de> serde::Deserialize<'de> for Pairs { formatter.write_str("struct cosmos.base.kv.v1beta1.Pairs") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pairs__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pairs => { if pairs__.is_some() { return Err(serde::de::Error::duplicate_field("pairs")); } - pairs__ = Some(map.next_value()?); + pairs__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs index 3b2ae2a6..5b2fcbb4 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs @@ -1,8 +1,10 @@ // @generated /// ConfigRequest defines the request structure for the Config gRPC query. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConfigRequest {} /// ConfigResponse defines the response structure for the Config gRPC query. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConfigResponse { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs index 9488d617..54ab64bb 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs @@ -58,12 +58,12 @@ impl<'de> serde::Deserialize<'de> for ConfigRequest { formatter.write_str("struct cosmos.base.node.v1beta1.ConfigRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(ConfigRequest {}) } @@ -147,18 +147,18 @@ impl<'de> serde::Deserialize<'de> for ConfigResponse { formatter.write_str("struct cosmos.base.node.v1beta1.ConfigResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut minimum_gas_price__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MinimumGasPrice => { if minimum_gas_price__.is_some() { return Err(serde::de::Error::duplicate_field("minimumGasPrice")); } - minimum_gas_price__ = Some(map.next_value()?); + minimum_gas_price__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs index 748232b7..9e79d078 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs @@ -6,6 +6,7 @@ /// Foo some_parameter = 1; /// PageRequest pagination = 2; /// } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PageRequest { /// key is a value returned in PageResponse.next_key to begin @@ -41,6 +42,7 @@ pub struct PageRequest { /// repeated Bar results = 1; /// PageResponse page = 2; /// } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PageResponse { /// next_key is the key to be passed to PageRequest.key to diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs index ff0d0276..a0a7ca8d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs @@ -25,13 +25,16 @@ impl serde::Serialize for PageRequest { let mut struct_ser = serializer.serialize_struct("cosmos.base.query.v1beta1.PageRequest", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } if self.offset != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("offset", ToString::to_string(&self.offset).as_str())?; } if self.limit != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?; } if self.count_total { @@ -109,7 +112,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { formatter.write_str("struct cosmos.base.query.v1beta1.PageRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -118,14 +121,14 @@ impl<'de> serde::Deserialize<'de> for PageRequest { let mut limit__ = None; let mut count_total__ = None; let mut reverse__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -134,7 +137,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { return Err(serde::de::Error::duplicate_field("offset")); } offset__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -143,7 +146,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { return Err(serde::de::Error::duplicate_field("limit")); } limit__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -151,13 +154,13 @@ impl<'de> serde::Deserialize<'de> for PageRequest { if count_total__.is_some() { return Err(serde::de::Error::duplicate_field("countTotal")); } - count_total__ = Some(map.next_value()?); + count_total__ = Some(map_.next_value()?); } GeneratedField::Reverse => { if reverse__.is_some() { return Err(serde::de::Error::duplicate_field("reverse")); } - reverse__ = Some(map.next_value()?); + reverse__ = Some(map_.next_value()?); } } } @@ -194,12 +197,14 @@ impl serde::Serialize for PageResponse { let mut struct_ser = serializer.serialize_struct("cosmos.base.query.v1beta1.PageResponse", len)?; if !self.next_key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "nextKey", pbjson::private::base64::encode(&self.next_key).as_str(), )?; } if self.total != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("total", ToString::to_string(&self.total).as_str())?; } struct_ser.end() @@ -258,20 +263,20 @@ impl<'de> serde::Deserialize<'de> for PageResponse { formatter.write_str("struct cosmos.base.query.v1beta1.PageResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut next_key__ = None; let mut total__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::NextKey => { if next_key__.is_some() { return Err(serde::de::Error::duplicate_field("nextKey")); } next_key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -280,7 +285,7 @@ impl<'de> serde::Deserialize<'de> for PageResponse { return Err(serde::de::Error::duplicate_field("total")); } total__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs index 769f6f2f..0f244d14 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs @@ -1,8 +1,10 @@ // @generated /// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAllInterfacesRequest {} /// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAllInterfacesResponse { /// interface_names is an array of all the registered interfaces. @@ -11,6 +13,7 @@ pub struct ListAllInterfacesResponse { } /// ListImplementationsRequest is the request type of the ListImplementations /// RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListImplementationsRequest { /// interface_name defines the interface to query the implementations for. @@ -19,6 +22,7 @@ pub struct ListImplementationsRequest { } /// ListImplementationsResponse is the response type of the ListImplementations /// RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListImplementationsResponse { #[prost(string, repeated, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs index 58834489..f58bcae2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs @@ -63,13 +63,13 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(ListAllInterfacesRequest {}) } @@ -158,19 +158,19 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut interface_names__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::InterfaceNames => { if interface_names__.is_some() { return Err(serde::de::Error::duplicate_field("interfaceNames")); } - interface_names__ = Some(map.next_value()?); + interface_names__ = Some(map_.next_value()?); } } } @@ -261,19 +261,19 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut interface_name__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::InterfaceName => { if interface_name__.is_some() { return Err(serde::de::Error::duplicate_field("interfaceName")); } - interface_name__ = Some(map.next_value()?); + interface_name__ = Some(map_.next_value()?); } } } @@ -369,13 +369,13 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut implementation_message_names__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ImplementationMessageNames => { if implementation_message_names__.is_some() { @@ -383,7 +383,7 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsResponse { "implementationMessageNames", )); } - implementation_message_names__ = Some(map.next_value()?); + implementation_message_names__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs index d3b5e7c0..14c79bd6 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs @@ -1,5 +1,6 @@ // @generated /// AppDescriptor describes a cosmos-sdk based application +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AppDescriptor { /// AuthnDescriptor provides information on how to authenticate transactions on the application @@ -23,6 +24,7 @@ pub struct AppDescriptor { pub tx: ::core::option::Option, } /// TxDescriptor describes the accepted transaction type +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxDescriptor { /// fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) @@ -36,6 +38,7 @@ pub struct TxDescriptor { } /// AuthnDescriptor provides information on how to sign transactions without relying /// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuthnDescriptor { /// sign_modes defines the supported signature algorithm @@ -46,6 +49,7 @@ pub struct AuthnDescriptor { /// NOTE(fdymylja): here we could go as far as providing an entire flow on how /// to sign a message given a SigningModeDescriptor, but it's better to think about /// this another time +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SigningModeDescriptor { /// name defines the unique name of the signing mode @@ -60,6 +64,7 @@ pub struct SigningModeDescriptor { pub authn_info_provider_method_fullname: ::prost::alloc::string::String, } /// ChainDescriptor describes chain information of the application +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChainDescriptor { /// id is the chain id @@ -67,6 +72,7 @@ pub struct ChainDescriptor { pub id: ::prost::alloc::string::String, } /// CodecDescriptor describes the registered interfaces and provides metadata information on the types +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CodecDescriptor { /// interfaces is a list of the registerted interfaces descriptors @@ -74,6 +80,7 @@ pub struct CodecDescriptor { pub interfaces: ::prost::alloc::vec::Vec, } /// InterfaceDescriptor describes the implementation of an interface +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceDescriptor { /// fullname is the name of the interface @@ -88,6 +95,7 @@ pub struct InterfaceDescriptor { pub interface_implementers: ::prost::alloc::vec::Vec, } /// InterfaceImplementerDescriptor describes an interface implementer +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceImplementerDescriptor { /// fullname is the protobuf queryable name of the interface implementer @@ -102,6 +110,7 @@ pub struct InterfaceImplementerDescriptor { } /// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains /// an interface represented as a google.protobuf.Any +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceAcceptingMessageDescriptor { /// fullname is the protobuf fullname of the type containing the interface @@ -114,6 +123,7 @@ pub struct InterfaceAcceptingMessageDescriptor { pub field_descriptor_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// ConfigurationDescriptor contains metadata information on the sdk.Config +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConfigurationDescriptor { /// bech32_account_address_prefix is the account address prefix @@ -121,6 +131,7 @@ pub struct ConfigurationDescriptor { pub bech32_account_address_prefix: ::prost::alloc::string::String, } /// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDescriptor { /// msg_type_url contains the TypeURL of a sdk.Msg. @@ -128,9 +139,11 @@ pub struct MsgDescriptor { pub msg_type_url: ::prost::alloc::string::String, } /// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAuthnDescriptorRequest {} /// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAuthnDescriptorResponse { /// authn describes how to authenticate to the application when sending transactions @@ -138,9 +151,11 @@ pub struct GetAuthnDescriptorResponse { pub authn: ::core::option::Option, } /// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetChainDescriptorRequest {} /// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetChainDescriptorResponse { /// chain describes application chain information @@ -148,9 +163,11 @@ pub struct GetChainDescriptorResponse { pub chain: ::core::option::Option, } /// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetCodecDescriptorRequest {} /// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetCodecDescriptorResponse { /// codec describes the application codec such as registered interfaces and implementations @@ -158,9 +175,11 @@ pub struct GetCodecDescriptorResponse { pub codec: ::core::option::Option, } /// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetConfigurationDescriptorRequest {} /// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetConfigurationDescriptorResponse { /// config describes the application's sdk.Config @@ -168,9 +187,11 @@ pub struct GetConfigurationDescriptorResponse { pub config: ::core::option::Option, } /// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetQueryServicesDescriptorRequest {} /// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetQueryServicesDescriptorResponse { /// queries provides information on the available queryable services @@ -178,9 +199,11 @@ pub struct GetQueryServicesDescriptorResponse { pub queries: ::core::option::Option, } /// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxDescriptorRequest {} /// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxDescriptorResponse { /// tx provides information on msgs that can be forwarded to the application @@ -189,6 +212,7 @@ pub struct GetTxDescriptorResponse { pub tx: ::core::option::Option, } /// QueryServicesDescriptor contains the list of cosmos-sdk queriable services +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryServicesDescriptor { /// query_services is a list of cosmos-sdk QueryServiceDescriptor @@ -196,6 +220,7 @@ pub struct QueryServicesDescriptor { pub query_services: ::prost::alloc::vec::Vec, } /// QueryServiceDescriptor describes a cosmos-sdk queryable service +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryServiceDescriptor { /// fullname is the protobuf fullname of the service descriptor @@ -211,6 +236,7 @@ pub struct QueryServiceDescriptor { /// QueryMethodDescriptor describes a queryable method of a query service /// no other info is provided beside method name and tendermint queryable path /// because it would be redundant with the grpc reflection service +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryMethodDescriptor { /// name is the protobuf name (not fullname) of the method diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs index 26e06121..56c02fcb 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs @@ -117,7 +117,7 @@ impl<'de> serde::Deserialize<'de> for AppDescriptor { formatter.write_str("struct cosmos.base.reflection.v2alpha1.AppDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -127,43 +127,43 @@ impl<'de> serde::Deserialize<'de> for AppDescriptor { let mut configuration__ = None; let mut query_services__ = None; let mut tx__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Authn => { if authn__.is_some() { return Err(serde::de::Error::duplicate_field("authn")); } - authn__ = map.next_value()?; + authn__ = map_.next_value()?; } GeneratedField::Chain => { if chain__.is_some() { return Err(serde::de::Error::duplicate_field("chain")); } - chain__ = map.next_value()?; + chain__ = map_.next_value()?; } GeneratedField::Codec => { if codec__.is_some() { return Err(serde::de::Error::duplicate_field("codec")); } - codec__ = map.next_value()?; + codec__ = map_.next_value()?; } GeneratedField::Configuration => { if configuration__.is_some() { return Err(serde::de::Error::duplicate_field("configuration")); } - configuration__ = map.next_value()?; + configuration__ = map_.next_value()?; } GeneratedField::QueryServices => { if query_services__.is_some() { return Err(serde::de::Error::duplicate_field("queryServices")); } - query_services__ = map.next_value()?; + query_services__ = map_.next_value()?; } GeneratedField::Tx => { if tx__.is_some() { return Err(serde::de::Error::duplicate_field("tx")); } - tx__ = map.next_value()?; + tx__ = map_.next_value()?; } } } @@ -254,18 +254,18 @@ impl<'de> serde::Deserialize<'de> for AuthnDescriptor { formatter.write_str("struct cosmos.base.reflection.v2alpha1.AuthnDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut sign_modes__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::SignModes => { if sign_modes__.is_some() { return Err(serde::de::Error::duplicate_field("signModes")); } - sign_modes__ = Some(map.next_value()?); + sign_modes__ = Some(map_.next_value()?); } } } @@ -351,18 +351,18 @@ impl<'de> serde::Deserialize<'de> for ChainDescriptor { formatter.write_str("struct cosmos.base.reflection.v2alpha1.ChainDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } } } @@ -448,18 +448,18 @@ impl<'de> serde::Deserialize<'de> for CodecDescriptor { formatter.write_str("struct cosmos.base.reflection.v2alpha1.CodecDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut interfaces__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Interfaces => { if interfaces__.is_some() { return Err(serde::de::Error::duplicate_field("interfaces")); } - interfaces__ = Some(map.next_value()?); + interfaces__ = Some(map_.next_value()?); } } } @@ -558,13 +558,13 @@ impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut bech32_account_address_prefix__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Bech32AccountAddressPrefix => { if bech32_account_address_prefix__.is_some() { @@ -572,7 +572,7 @@ impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { "bech32AccountAddressPrefix", )); } - bech32_account_address_prefix__ = Some(map.next_value()?); + bech32_account_address_prefix__ = Some(map_.next_value()?); } } } @@ -653,13 +653,13 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetAuthnDescriptorRequest {}) } @@ -746,19 +746,19 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut authn__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Authn => { if authn__.is_some() { return Err(serde::de::Error::duplicate_field("authn")); } - authn__ = map.next_value()?; + authn__ = map_.next_value()?; } } } @@ -836,13 +836,13 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetChainDescriptorRequest {}) } @@ -929,19 +929,19 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut chain__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Chain => { if chain__.is_some() { return Err(serde::de::Error::duplicate_field("chain")); } - chain__ = map.next_value()?; + chain__ = map_.next_value()?; } } } @@ -1019,13 +1019,13 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetCodecDescriptorRequest {}) } @@ -1112,19 +1112,19 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut codec__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Codec => { if codec__.is_some() { return Err(serde::de::Error::duplicate_field("codec")); } - codec__ = map.next_value()?; + codec__ = map_.next_value()?; } } } @@ -1203,13 +1203,13 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetConfigurationDescriptorRequest {}) } @@ -1297,19 +1297,19 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut config__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Config => { if config__.is_some() { return Err(serde::de::Error::duplicate_field("config")); } - config__ = map.next_value()?; + config__ = map_.next_value()?; } } } @@ -1388,13 +1388,13 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetQueryServicesDescriptorRequest {}) } @@ -1482,19 +1482,19 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut queries__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Queries => { if queries__.is_some() { return Err(serde::de::Error::duplicate_field("queries")); } - queries__ = map.next_value()?; + queries__ = map_.next_value()?; } } } @@ -1571,13 +1571,13 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetTxDescriptorRequest {}) } @@ -1664,19 +1664,19 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut tx__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Tx => { if tx__.is_some() { return Err(serde::de::Error::duplicate_field("tx")); } - tx__ = map.next_value()?; + tx__ = map_.next_value()?; } } } @@ -1776,20 +1776,20 @@ impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut fullname__ = None; let mut field_descriptor_names__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Fullname => { if fullname__.is_some() { return Err(serde::de::Error::duplicate_field("fullname")); } - fullname__ = Some(map.next_value()?); + fullname__ = Some(map_.next_value()?); } GeneratedField::FieldDescriptorNames => { if field_descriptor_names__.is_some() { @@ -1797,7 +1797,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { "fieldDescriptorNames", )); } - field_descriptor_names__ = Some(map.next_value()?); + field_descriptor_names__ = Some(map_.next_value()?); } } } @@ -1913,20 +1913,20 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { formatter.write_str("struct cosmos.base.reflection.v2alpha1.InterfaceDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut fullname__ = None; let mut interface_accepting_messages__ = None; let mut interface_implementers__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Fullname => { if fullname__.is_some() { return Err(serde::de::Error::duplicate_field("fullname")); } - fullname__ = Some(map.next_value()?); + fullname__ = Some(map_.next_value()?); } GeneratedField::InterfaceAcceptingMessages => { if interface_accepting_messages__.is_some() { @@ -1934,7 +1934,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { "interfaceAcceptingMessages", )); } - interface_accepting_messages__ = Some(map.next_value()?); + interface_accepting_messages__ = Some(map_.next_value()?); } GeneratedField::InterfaceImplementers => { if interface_implementers__.is_some() { @@ -1942,7 +1942,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { "interfaceImplementers", )); } - interface_implementers__ = Some(map.next_value()?); + interface_implementers__ = Some(map_.next_value()?); } } } @@ -2045,26 +2045,26 @@ impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut fullname__ = None; let mut type_url__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Fullname => { if fullname__.is_some() { return Err(serde::de::Error::duplicate_field("fullname")); } - fullname__ = Some(map.next_value()?); + fullname__ = Some(map_.next_value()?); } GeneratedField::TypeUrl => { if type_url__.is_some() { return Err(serde::de::Error::duplicate_field("typeUrl")); } - type_url__ = Some(map.next_value()?); + type_url__ = Some(map_.next_value()?); } } } @@ -2151,18 +2151,18 @@ impl<'de> serde::Deserialize<'de> for MsgDescriptor { formatter.write_str("struct cosmos.base.reflection.v2alpha1.MsgDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut msg_type_url__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MsgTypeUrl => { if msg_type_url__.is_some() { return Err(serde::de::Error::duplicate_field("msgTypeUrl")); } - msg_type_url__ = Some(map.next_value()?); + msg_type_url__ = Some(map_.next_value()?); } } } @@ -2260,26 +2260,26 @@ impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut full_query_path__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::FullQueryPath => { if full_query_path__.is_some() { return Err(serde::de::Error::duplicate_field("fullQueryPath")); } - full_query_path__ = Some(map.next_value()?); + full_query_path__ = Some(map_.next_value()?); } } } @@ -2386,7 +2386,7 @@ impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -2394,25 +2394,25 @@ impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { let mut fullname__ = None; let mut is_module__ = None; let mut methods__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Fullname => { if fullname__.is_some() { return Err(serde::de::Error::duplicate_field("fullname")); } - fullname__ = Some(map.next_value()?); + fullname__ = Some(map_.next_value()?); } GeneratedField::IsModule => { if is_module__.is_some() { return Err(serde::de::Error::duplicate_field("isModule")); } - is_module__ = Some(map.next_value()?); + is_module__ = Some(map_.next_value()?); } GeneratedField::Methods => { if methods__.is_some() { return Err(serde::de::Error::duplicate_field("methods")); } - methods__ = Some(map.next_value()?); + methods__ = Some(map_.next_value()?); } } } @@ -2505,19 +2505,19 @@ impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut query_services__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::QueryServices => { if query_services__.is_some() { return Err(serde::de::Error::duplicate_field("queryServices")); } - query_services__ = Some(map.next_value()?); + query_services__ = Some(map_.next_value()?); } } } @@ -2632,7 +2632,7 @@ impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -2640,20 +2640,20 @@ impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { let mut name__ = None; let mut number__ = None; let mut authn_info_provider_method_fullname__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Number => { if number__.is_some() { return Err(serde::de::Error::duplicate_field("number")); } number__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2663,7 +2663,7 @@ impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { "authnInfoProviderMethodFullname", )); } - authn_info_provider_method_fullname__ = Some(map.next_value()?); + authn_info_provider_method_fullname__ = Some(map_.next_value()?); } } } @@ -2760,25 +2760,25 @@ impl<'de> serde::Deserialize<'de> for TxDescriptor { formatter.write_str("struct cosmos.base.reflection.v2alpha1.TxDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut fullname__ = None; let mut msgs__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Fullname => { if fullname__.is_some() { return Err(serde::de::Error::duplicate_field("fullname")); } - fullname__ = Some(map.next_value()?); + fullname__ = Some(map_.next_value()?); } GeneratedField::Msgs => { if msgs__.is_some() { return Err(serde::de::Error::duplicate_field("msgs")); } - msgs__ = Some(map.next_value()?); + msgs__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs index 73be1e76..a606bad5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Snapshot contains Tendermint state sync snapshot info. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Snapshot { #[prost(uint64, tag = "1")] @@ -14,6 +15,7 @@ pub struct Snapshot { pub metadata: ::core::option::Option, } /// Metadata contains SDK-specific snapshot metadata. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Metadata { /// SHA-256 chunk hashes @@ -23,6 +25,7 @@ pub struct Metadata { /// SnapshotItem is an item contained in a rootmulti.Store snapshot. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotItem { /// item is the specific type of snapshot item. @@ -32,6 +35,7 @@ pub struct SnapshotItem { /// Nested message and enum types in `SnapshotItem`. pub mod snapshot_item { /// item is the specific type of snapshot item. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Item { #[prost(message, tag = "1")] @@ -51,6 +55,7 @@ pub mod snapshot_item { /// SnapshotStoreItem contains metadata about a snapshotted store. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotStoreItem { #[prost(string, tag = "1")] @@ -59,6 +64,7 @@ pub struct SnapshotStoreItem { /// SnapshotIAVLItem is an exported IAVL node. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotIavlItem { #[prost(bytes = "vec", tag = "1")] @@ -75,6 +81,7 @@ pub struct SnapshotIavlItem { /// SnapshotExtensionMeta contains metadata about an external snapshotter. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotExtensionMeta { #[prost(string, tag = "1")] @@ -85,6 +92,7 @@ pub struct SnapshotExtensionMeta { /// SnapshotExtensionPayload contains payloads of an external snapshotter. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotExtensionPayload { #[prost(bytes = "vec", tag = "1")] @@ -93,6 +101,7 @@ pub struct SnapshotExtensionPayload { /// SnapshotKVItem is an exported Key/Value Pair /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotKvItem { #[prost(bytes = "vec", tag = "1")] @@ -103,6 +112,7 @@ pub struct SnapshotKvItem { /// SnapshotSchema is an exported schema of smt store /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotSchema { #[prost(bytes = "vec", repeated, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs index ecc4e5ba..e0fdf274 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs @@ -76,19 +76,19 @@ impl<'de> serde::Deserialize<'de> for Metadata { formatter.write_str("struct cosmos.base.snapshots.v1beta1.Metadata") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut chunk_hashes__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ChunkHashes => { if chunk_hashes__.is_some() { return Err(serde::de::Error::duplicate_field("chunkHashes")); } chunk_hashes__ = Some( - map.next_value::>>()? + map_.next_value::>>()? .into_iter() .map(|x| x.0) .collect(), @@ -134,6 +134,7 @@ impl serde::Serialize for Snapshot { let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.Snapshot", len)?; if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if self.format != 0 { @@ -143,6 +144,7 @@ impl serde::Serialize for Snapshot { struct_ser.serialize_field("chunks", &self.chunks)?; } if !self.hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; } @@ -211,7 +213,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { formatter.write_str("struct cosmos.base.snapshots.v1beta1.Snapshot") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -220,14 +222,14 @@ impl<'de> serde::Deserialize<'de> for Snapshot { let mut chunks__ = None; let mut hash__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -236,7 +238,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { return Err(serde::de::Error::duplicate_field("format")); } format__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -245,7 +247,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { return Err(serde::de::Error::duplicate_field("chunks")); } chunks__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -254,7 +256,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { return Err(serde::de::Error::duplicate_field("hash")); } hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -262,7 +264,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = map.next_value()?; + metadata__ = map_.next_value()?; } } } @@ -362,27 +364,27 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut format__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Format => { if format__.is_some() { return Err(serde::de::Error::duplicate_field("format")); } format__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -417,6 +419,7 @@ impl serde::Serialize for SnapshotExtensionPayload { len, )?; if !self.payload.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "payload", pbjson::private::base64::encode(&self.payload).as_str(), @@ -478,20 +481,20 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut payload__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Payload => { if payload__.is_some() { return Err(serde::de::Error::duplicate_field("payload")); } payload__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -532,16 +535,19 @@ impl serde::Serialize for SnapshotIavlItem { let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } if !self.value.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "value", pbjson::private::base64::encode(&self.value).as_str(), )?; } if self.version != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; } if self.height != 0 { @@ -607,7 +613,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotIAVLItem") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -615,14 +621,14 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { let mut value__ = None; let mut version__ = None; let mut height__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -631,7 +637,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { return Err(serde::de::Error::duplicate_field("value")); } value__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -640,7 +646,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { return Err(serde::de::Error::duplicate_field("version")); } version__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -649,7 +655,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -779,18 +785,18 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotItem") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut item__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Store => { if item__.is_some() { return Err(serde::de::Error::duplicate_field("store")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(snapshot_item::Item::Store); } @@ -798,7 +804,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { if item__.is_some() { return Err(serde::de::Error::duplicate_field("iavl")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(snapshot_item::Item::Iavl); } @@ -806,7 +812,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { if item__.is_some() { return Err(serde::de::Error::duplicate_field("extension")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(snapshot_item::Item::Extension); } @@ -814,7 +820,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { if item__.is_some() { return Err(serde::de::Error::duplicate_field("extensionPayload")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(snapshot_item::Item::ExtensionPayload); } @@ -822,7 +828,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { if item__.is_some() { return Err(serde::de::Error::duplicate_field("kv")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(snapshot_item::Item::Kv); } @@ -830,7 +836,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { if item__.is_some() { return Err(serde::de::Error::duplicate_field("schema")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(snapshot_item::Item::Schema); } @@ -863,10 +869,12 @@ impl serde::Serialize for SnapshotKvItem { let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotKVItem", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } if !self.value.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "value", pbjson::private::base64::encode(&self.value).as_str(), @@ -928,20 +936,20 @@ impl<'de> serde::Deserialize<'de> for SnapshotKvItem { formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotKVItem") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut key__ = None; let mut value__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -950,7 +958,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotKvItem { return Err(serde::de::Error::duplicate_field("value")); } value__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -1046,19 +1054,19 @@ impl<'de> serde::Deserialize<'de> for SnapshotSchema { formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotSchema") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut keys__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Keys => { if keys__.is_some() { return Err(serde::de::Error::duplicate_field("keys")); } keys__ = Some( - map.next_value::>>()? + map_.next_value::>>()? .into_iter() .map(|x| x.0) .collect(), @@ -1148,18 +1156,18 @@ impl<'de> serde::Deserialize<'de> for SnapshotStoreItem { formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotStoreItem") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs index 39a113e9..7c93c011 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// CommitInfo defines commit information used by the multi-store when committing /// a version/height. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitInfo { #[prost(int64, tag = "1")] @@ -10,6 +11,7 @@ pub struct CommitInfo { } /// StoreInfo defines store-specific commit information. It contains a reference /// between a store name and the commit ID. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreInfo { #[prost(string, tag = "1")] @@ -19,6 +21,7 @@ pub struct StoreInfo { } /// CommitID defines the committment information when a specific store is /// committed. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitId { #[prost(int64, tag = "1")] @@ -31,6 +34,7 @@ pub struct CommitId { /// Deletes /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreKvPair { /// the store key for the KVStore this pair originates from @@ -46,6 +50,7 @@ pub struct StoreKvPair { } /// BlockMetadata contains all the abci event data of a block /// the file streamer dump them into files together with the state changes. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockMetadata { #[prost(message, optional, tag = "1")] @@ -67,6 +72,7 @@ pub struct BlockMetadata { /// Nested message and enum types in `BlockMetadata`. pub mod block_metadata { /// DeliverTx encapulate deliver tx request and response. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeliverTx { #[prost(message, optional, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs index dd0f8fe6..e3f007fb 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs @@ -132,7 +132,7 @@ impl<'de> serde::Deserialize<'de> for BlockMetadata { formatter.write_str("struct cosmos.base.store.v1beta1.BlockMetadata") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -142,13 +142,13 @@ impl<'de> serde::Deserialize<'de> for BlockMetadata { let mut request_end_block__ = None; let mut response_end_block__ = None; let mut response_commit__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::RequestBeginBlock => { if request_begin_block__.is_some() { return Err(serde::de::Error::duplicate_field("requestBeginBlock")); } - request_begin_block__ = map.next_value()?; + request_begin_block__ = map_.next_value()?; } GeneratedField::ResponseBeginBlock => { if response_begin_block__.is_some() { @@ -156,31 +156,31 @@ impl<'de> serde::Deserialize<'de> for BlockMetadata { "responseBeginBlock", )); } - response_begin_block__ = map.next_value()?; + response_begin_block__ = map_.next_value()?; } GeneratedField::DeliverTxs => { if deliver_txs__.is_some() { return Err(serde::de::Error::duplicate_field("deliverTxs")); } - deliver_txs__ = Some(map.next_value()?); + deliver_txs__ = Some(map_.next_value()?); } GeneratedField::RequestEndBlock => { if request_end_block__.is_some() { return Err(serde::de::Error::duplicate_field("requestEndBlock")); } - request_end_block__ = map.next_value()?; + request_end_block__ = map_.next_value()?; } GeneratedField::ResponseEndBlock => { if response_end_block__.is_some() { return Err(serde::de::Error::duplicate_field("responseEndBlock")); } - response_end_block__ = map.next_value()?; + response_end_block__ = map_.next_value()?; } GeneratedField::ResponseCommit => { if response_commit__.is_some() { return Err(serde::de::Error::duplicate_field("responseCommit")); } - response_commit__ = map.next_value()?; + response_commit__ = map_.next_value()?; } } } @@ -281,26 +281,26 @@ impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut request__ = None; let mut response__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Request => { if request__.is_some() { return Err(serde::de::Error::duplicate_field("request")); } - request__ = map.next_value()?; + request__ = map_.next_value()?; } GeneratedField::Response => { if response__.is_some() { return Err(serde::de::Error::duplicate_field("response")); } - response__ = map.next_value()?; + response__ = map_.next_value()?; } } } @@ -334,9 +334,11 @@ impl serde::Serialize for CommitId { let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.CommitID", len)?; if self.version != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; } if !self.hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; } @@ -396,20 +398,20 @@ impl<'de> serde::Deserialize<'de> for CommitId { formatter.write_str("struct cosmos.base.store.v1beta1.CommitID") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut version__ = None; let mut hash__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Version => { if version__.is_some() { return Err(serde::de::Error::duplicate_field("version")); } version__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -418,7 +420,7 @@ impl<'de> serde::Deserialize<'de> for CommitId { return Err(serde::de::Error::duplicate_field("hash")); } hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -454,6 +456,7 @@ impl serde::Serialize for CommitInfo { let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.CommitInfo", len)?; if self.version != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; } if !self.store_infos.is_empty() { @@ -515,20 +518,20 @@ impl<'de> serde::Deserialize<'de> for CommitInfo { formatter.write_str("struct cosmos.base.store.v1beta1.CommitInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut version__ = None; let mut store_infos__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Version => { if version__.is_some() { return Err(serde::de::Error::duplicate_field("version")); } version__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -536,7 +539,7 @@ impl<'de> serde::Deserialize<'de> for CommitInfo { if store_infos__.is_some() { return Err(serde::de::Error::duplicate_field("storeInfos")); } - store_infos__ = Some(map.next_value()?); + store_infos__ = Some(map_.next_value()?); } } } @@ -631,25 +634,25 @@ impl<'de> serde::Deserialize<'de> for StoreInfo { formatter.write_str("struct cosmos.base.store.v1beta1.StoreInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut commit_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::CommitId => { if commit_id__.is_some() { return Err(serde::de::Error::duplicate_field("commitId")); } - commit_id__ = map.next_value()?; + commit_id__ = map_.next_value()?; } } } @@ -695,10 +698,12 @@ impl serde::Serialize for StoreKvPair { struct_ser.serialize_field("delete", &self.delete)?; } if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } if !self.value.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "value", pbjson::private::base64::encode(&self.value).as_str(), @@ -764,7 +769,7 @@ impl<'de> serde::Deserialize<'de> for StoreKvPair { formatter.write_str("struct cosmos.base.store.v1beta1.StoreKVPair") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -772,26 +777,26 @@ impl<'de> serde::Deserialize<'de> for StoreKvPair { let mut delete__ = None; let mut key__ = None; let mut value__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::StoreKey => { if store_key__.is_some() { return Err(serde::de::Error::duplicate_field("storeKey")); } - store_key__ = Some(map.next_value()?); + store_key__ = Some(map_.next_value()?); } GeneratedField::Delete => { if delete__.is_some() { return Err(serde::de::Error::duplicate_field("delete")); } - delete__ = Some(map.next_value()?); + delete__ = Some(map_.next_value()?); } GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -800,7 +805,7 @@ impl<'de> serde::Deserialize<'de> for StoreKvPair { return Err(serde::de::Error::duplicate_field("value")); } value__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs index d4c36abf..3b8fb2fc 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// Block is tendermint type Block, with the Header proposer address /// field converted to bech32 string. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { #[prost(message, optional, tag = "1")] @@ -13,6 +14,7 @@ pub struct Block { pub last_commit: ::core::option::Option<::tendermint_proto::v0_34::types::Commit>, } /// Header defines the structure of a Tendermint block header. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Header { /// basic block info @@ -67,6 +69,7 @@ pub struct Header { } /// GetValidatorSetByHeightRequest is the request type for the /// Query/GetValidatorSetByHeight RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetValidatorSetByHeightRequest { #[prost(int64, tag = "1")] @@ -77,6 +80,7 @@ pub struct GetValidatorSetByHeightRequest { } /// GetValidatorSetByHeightResponse is the response type for the /// Query/GetValidatorSetByHeight RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetValidatorSetByHeightResponse { #[prost(int64, tag = "1")] @@ -89,6 +93,7 @@ pub struct GetValidatorSetByHeightResponse { } /// GetLatestValidatorSetRequest is the request type for the /// Query/GetValidatorSetByHeight RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestValidatorSetRequest { /// pagination defines an pagination for the request. @@ -97,6 +102,7 @@ pub struct GetLatestValidatorSetRequest { } /// GetLatestValidatorSetResponse is the response type for the /// Query/GetValidatorSetByHeight RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestValidatorSetResponse { #[prost(int64, tag = "1")] @@ -108,6 +114,7 @@ pub struct GetLatestValidatorSetResponse { pub pagination: ::core::option::Option, } /// Validator is the type for the validator-set. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Validator { #[prost(string, tag = "1")] @@ -121,6 +128,7 @@ pub struct Validator { } /// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockByHeightRequest { #[prost(int64, tag = "1")] @@ -128,6 +136,7 @@ pub struct GetBlockByHeightRequest { } /// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockByHeightResponse { #[prost(message, optional, tag = "1")] @@ -141,10 +150,12 @@ pub struct GetBlockByHeightResponse { } /// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestBlockRequest {} /// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestBlockResponse { #[prost(message, optional, tag = "1")] @@ -157,19 +168,23 @@ pub struct GetLatestBlockResponse { pub sdk_block: ::core::option::Option, } /// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSyncingRequest {} /// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSyncingResponse { #[prost(bool, tag = "1")] pub syncing: bool, } /// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetNodeInfoRequest {} /// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetNodeInfoResponse { #[prost(message, optional, tag = "1")] @@ -178,6 +193,7 @@ pub struct GetNodeInfoResponse { pub application_version: ::core::option::Option, } /// VersionInfo is the type for the GetNodeInfoResponse message. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VersionInfo { #[prost(string, tag = "1")] @@ -199,6 +215,7 @@ pub struct VersionInfo { pub cosmos_sdk_version: ::prost::alloc::string::String, } /// Module is the type for VersionInfo +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module { /// module path @@ -212,6 +229,7 @@ pub struct Module { pub sum: ::prost::alloc::string::String, } /// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbciQueryRequest { #[prost(bytes = "vec", tag = "1")] @@ -228,6 +246,7 @@ pub struct AbciQueryRequest { /// /// Note: This type is a duplicate of the ResponseQuery proto type defined in /// Tendermint. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbciQueryResponse { #[prost(uint32, tag = "1")] @@ -257,6 +276,7 @@ pub struct AbciQueryResponse { /// /// Note: This type is a duplicate of the ProofOp proto type defined in /// Tendermint. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProofOp { #[prost(string, tag = "1")] @@ -270,6 +290,7 @@ pub struct ProofOp { /// /// Note: This type is a duplicate of the ProofOps proto type defined in /// Tendermint. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProofOps { #[prost(message, repeated, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs index 794fdd91..8e2e11a7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs @@ -22,6 +22,7 @@ impl serde::Serialize for AbciQueryRequest { let mut struct_ser = serializer.serialize_struct("cosmos.base.tendermint.v1beta1.ABCIQueryRequest", len)?; if !self.data.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } @@ -29,6 +30,7 @@ impl serde::Serialize for AbciQueryRequest { struct_ser.serialize_field("path", &self.path)?; } if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if self.prove { @@ -94,7 +96,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryRequest { formatter.write_str("struct cosmos.base.tendermint.v1beta1.ABCIQueryRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -102,14 +104,14 @@ impl<'de> serde::Deserialize<'de> for AbciQueryRequest { let mut path__ = None; let mut height__ = None; let mut prove__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Data => { if data__.is_some() { return Err(serde::de::Error::duplicate_field("data")); } data__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -117,14 +119,14 @@ impl<'de> serde::Deserialize<'de> for AbciQueryRequest { if path__.is_some() { return Err(serde::de::Error::duplicate_field("path")); } - path__ = Some(map.next_value()?); + path__ = Some(map_.next_value()?); } GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -132,7 +134,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryRequest { if prove__.is_some() { return Err(serde::de::Error::duplicate_field("prove")); } - prove__ = Some(map.next_value()?); + prove__ = Some(map_.next_value()?); } } } @@ -198,13 +200,16 @@ impl serde::Serialize for AbciQueryResponse { struct_ser.serialize_field("info", &self.info)?; } if self.index != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; } if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } if !self.value.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "value", pbjson::private::base64::encode(&self.value).as_str(), @@ -214,6 +219,7 @@ impl serde::Serialize for AbciQueryResponse { struct_ser.serialize_field("proofOps", v)?; } if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if !self.codespace.is_empty() { @@ -300,7 +306,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { formatter.write_str("struct cosmos.base.tendermint.v1beta1.ABCIQueryResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -313,14 +319,14 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { let mut proof_ops__ = None; let mut height__ = None; let mut codespace__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Code => { if code__.is_some() { return Err(serde::de::Error::duplicate_field("code")); } code__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -328,20 +334,20 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { if log__.is_some() { return Err(serde::de::Error::duplicate_field("log")); } - log__ = Some(map.next_value()?); + log__ = Some(map_.next_value()?); } GeneratedField::Info => { if info__.is_some() { return Err(serde::de::Error::duplicate_field("info")); } - info__ = Some(map.next_value()?); + info__ = Some(map_.next_value()?); } GeneratedField::Index => { if index__.is_some() { return Err(serde::de::Error::duplicate_field("index")); } index__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -350,7 +356,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -359,7 +365,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { return Err(serde::de::Error::duplicate_field("value")); } value__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -367,14 +373,14 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { if proof_ops__.is_some() { return Err(serde::de::Error::duplicate_field("proofOps")); } - proof_ops__ = map.next_value()?; + proof_ops__ = map_.next_value()?; } GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -382,7 +388,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { if codespace__.is_some() { return Err(serde::de::Error::duplicate_field("codespace")); } - codespace__ = Some(map.next_value()?); + codespace__ = Some(map_.next_value()?); } } } @@ -500,7 +506,7 @@ impl<'de> serde::Deserialize<'de> for Block { formatter.write_str("struct cosmos.base.tendermint.v1beta1.Block") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -508,31 +514,31 @@ impl<'de> serde::Deserialize<'de> for Block { let mut data__ = None; let mut evidence__ = None; let mut last_commit__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Header => { if header__.is_some() { return Err(serde::de::Error::duplicate_field("header")); } - header__ = map.next_value()?; + header__ = map_.next_value()?; } GeneratedField::Data => { if data__.is_some() { return Err(serde::de::Error::duplicate_field("data")); } - data__ = map.next_value()?; + data__ = map_.next_value()?; } GeneratedField::Evidence => { if evidence__.is_some() { return Err(serde::de::Error::duplicate_field("evidence")); } - evidence__ = map.next_value()?; + evidence__ = map_.next_value()?; } GeneratedField::LastCommit => { if last_commit__.is_some() { return Err(serde::de::Error::duplicate_field("lastCommit")); } - last_commit__ = map.next_value()?; + last_commit__ = map_.next_value()?; } } } @@ -567,6 +573,7 @@ impl serde::Serialize for GetBlockByHeightRequest { len, )?; if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } struct_ser.end() @@ -625,20 +632,20 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut height__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -747,7 +754,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -755,25 +762,25 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { let mut block_id__ = None; let mut block__ = None; let mut sdk_block__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BlockId => { if block_id__.is_some() { return Err(serde::de::Error::duplicate_field("blockId")); } - block_id__ = map.next_value()?; + block_id__ = map_.next_value()?; } GeneratedField::Block => { if block__.is_some() { return Err(serde::de::Error::duplicate_field("block")); } - block__ = map.next_value()?; + block__ = map_.next_value()?; } GeneratedField::SdkBlock => { if sdk_block__.is_some() { return Err(serde::de::Error::duplicate_field("sdkBlock")); } - sdk_block__ = map.next_value()?; + sdk_block__ = map_.next_value()?; } } } @@ -852,13 +859,13 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetLatestBlockRequest {}) } @@ -958,7 +965,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -966,25 +973,25 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { let mut block_id__ = None; let mut block__ = None; let mut sdk_block__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BlockId => { if block_id__.is_some() { return Err(serde::de::Error::duplicate_field("blockId")); } - block_id__ = map.next_value()?; + block_id__ = map_.next_value()?; } GeneratedField::Block => { if block__.is_some() { return Err(serde::de::Error::duplicate_field("block")); } - block__ = map.next_value()?; + block__ = map_.next_value()?; } GeneratedField::SdkBlock => { if sdk_block__.is_some() { return Err(serde::de::Error::duplicate_field("sdkBlock")); } - sdk_block__ = map.next_value()?; + sdk_block__ = map_.next_value()?; } } } @@ -1077,19 +1084,19 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1127,6 +1134,7 @@ impl serde::Serialize for GetLatestValidatorSetResponse { len, )?; if self.block_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "blockHeight", ToString::to_string(&self.block_height).as_str(), @@ -1200,7 +1208,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -1208,14 +1216,14 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { let mut block_height__ = None; let mut validators__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BlockHeight => { if block_height__.is_some() { return Err(serde::de::Error::duplicate_field("blockHeight")); } block_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1223,13 +1231,13 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { if validators__.is_some() { return Err(serde::de::Error::duplicate_field("validators")); } - validators__ = Some(map.next_value()?); + validators__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1306,12 +1314,12 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetNodeInfoRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetNodeInfoRequest {}) } @@ -1410,19 +1418,19 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetNodeInfoResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut default_node_info__ = None; let mut application_version__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DefaultNodeInfo => { if default_node_info__.is_some() { return Err(serde::de::Error::duplicate_field("defaultNodeInfo")); } - default_node_info__ = map.next_value()?; + default_node_info__ = map_.next_value()?; } GeneratedField::ApplicationVersion => { if application_version__.is_some() { @@ -1430,7 +1438,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { "applicationVersion", )); } - application_version__ = map.next_value()?; + application_version__ = map_.next_value()?; } } } @@ -1506,12 +1514,12 @@ impl<'de> serde::Deserialize<'de> for GetSyncingRequest { formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetSyncingRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(GetSyncingRequest {}) } @@ -1593,18 +1601,18 @@ impl<'de> serde::Deserialize<'de> for GetSyncingResponse { formatter.write_str("struct cosmos.base.tendermint.v1beta1.GetSyncingResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut syncing__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Syncing => { if syncing__.is_some() { return Err(serde::de::Error::duplicate_field("syncing")); } - syncing__ = Some(map.next_value()?); + syncing__ = Some(map_.next_value()?); } } } @@ -1639,6 +1647,7 @@ impl serde::Serialize for GetValidatorSetByHeightRequest { len, )?; if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if let Some(v) = self.pagination.as_ref() { @@ -1704,21 +1713,21 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut height__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1726,7 +1735,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1765,6 +1774,7 @@ impl serde::Serialize for GetValidatorSetByHeightResponse { len, )?; if self.block_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "blockHeight", ToString::to_string(&self.block_height).as_str(), @@ -1838,7 +1848,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -1846,14 +1856,14 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { let mut block_height__ = None; let mut validators__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BlockHeight => { if block_height__.is_some() { return Err(serde::de::Error::duplicate_field("blockHeight")); } block_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1861,13 +1871,13 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { if validators__.is_some() { return Err(serde::de::Error::duplicate_field("validators")); } - validators__ = Some(map.next_value()?); + validators__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1944,6 +1954,7 @@ impl serde::Serialize for Header { struct_ser.serialize_field("chainId", &self.chain_id)?; } if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if let Some(v) = self.time.as_ref() { @@ -1953,48 +1964,56 @@ impl serde::Serialize for Header { struct_ser.serialize_field("lastBlockId", v)?; } if !self.last_commit_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "lastCommitHash", pbjson::private::base64::encode(&self.last_commit_hash).as_str(), )?; } if !self.data_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "dataHash", pbjson::private::base64::encode(&self.data_hash).as_str(), )?; } if !self.validators_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "validatorsHash", pbjson::private::base64::encode(&self.validators_hash).as_str(), )?; } if !self.next_validators_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "nextValidatorsHash", pbjson::private::base64::encode(&self.next_validators_hash).as_str(), )?; } if !self.consensus_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "consensusHash", pbjson::private::base64::encode(&self.consensus_hash).as_str(), )?; } if !self.app_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "appHash", pbjson::private::base64::encode(&self.app_hash).as_str(), )?; } if !self.last_results_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "lastResultsHash", pbjson::private::base64::encode(&self.last_results_hash).as_str(), )?; } if !self.evidence_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "evidenceHash", pbjson::private::base64::encode(&self.evidence_hash).as_str(), @@ -2119,7 +2138,7 @@ impl<'de> serde::Deserialize<'de> for Header { formatter.write_str("struct cosmos.base.tendermint.v1beta1.Header") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2137,26 +2156,26 @@ impl<'de> serde::Deserialize<'de> for Header { let mut last_results_hash__ = None; let mut evidence_hash__ = None; let mut proposer_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Version => { if version__.is_some() { return Err(serde::de::Error::duplicate_field("version")); } - version__ = map.next_value()?; + version__ = map_.next_value()?; } GeneratedField::ChainId => { if chain_id__.is_some() { return Err(serde::de::Error::duplicate_field("chainId")); } - chain_id__ = Some(map.next_value()?); + chain_id__ = Some(map_.next_value()?); } GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2164,20 +2183,20 @@ impl<'de> serde::Deserialize<'de> for Header { if time__.is_some() { return Err(serde::de::Error::duplicate_field("time")); } - time__ = map.next_value()?; + time__ = map_.next_value()?; } GeneratedField::LastBlockId => { if last_block_id__.is_some() { return Err(serde::de::Error::duplicate_field("lastBlockId")); } - last_block_id__ = map.next_value()?; + last_block_id__ = map_.next_value()?; } GeneratedField::LastCommitHash => { if last_commit_hash__.is_some() { return Err(serde::de::Error::duplicate_field("lastCommitHash")); } last_commit_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2186,7 +2205,7 @@ impl<'de> serde::Deserialize<'de> for Header { return Err(serde::de::Error::duplicate_field("dataHash")); } data_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2195,7 +2214,7 @@ impl<'de> serde::Deserialize<'de> for Header { return Err(serde::de::Error::duplicate_field("validatorsHash")); } validators_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2206,7 +2225,7 @@ impl<'de> serde::Deserialize<'de> for Header { )); } next_validators_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2215,7 +2234,7 @@ impl<'de> serde::Deserialize<'de> for Header { return Err(serde::de::Error::duplicate_field("consensusHash")); } consensus_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2224,7 +2243,7 @@ impl<'de> serde::Deserialize<'de> for Header { return Err(serde::de::Error::duplicate_field("appHash")); } app_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2233,7 +2252,7 @@ impl<'de> serde::Deserialize<'de> for Header { return Err(serde::de::Error::duplicate_field("lastResultsHash")); } last_results_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2242,7 +2261,7 @@ impl<'de> serde::Deserialize<'de> for Header { return Err(serde::de::Error::duplicate_field("evidenceHash")); } evidence_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2250,7 +2269,7 @@ impl<'de> serde::Deserialize<'de> for Header { if proposer_address__.is_some() { return Err(serde::de::Error::duplicate_field("proposerAddress")); } - proposer_address__ = Some(map.next_value()?); + proposer_address__ = Some(map_.next_value()?); } } } @@ -2365,32 +2384,32 @@ impl<'de> serde::Deserialize<'de> for Module { formatter.write_str("struct cosmos.base.tendermint.v1beta1.Module") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut path__ = None; let mut version__ = None; let mut sum__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Path => { if path__.is_some() { return Err(serde::de::Error::duplicate_field("path")); } - path__ = Some(map.next_value()?); + path__ = Some(map_.next_value()?); } GeneratedField::Version => { if version__.is_some() { return Err(serde::de::Error::duplicate_field("version")); } - version__ = Some(map.next_value()?); + version__ = Some(map_.next_value()?); } GeneratedField::Sum => { if sum__.is_some() { return Err(serde::de::Error::duplicate_field("sum")); } - sum__ = Some(map.next_value()?); + sum__ = Some(map_.next_value()?); } } } @@ -2431,10 +2450,12 @@ impl serde::Serialize for ProofOp { struct_ser.serialize_field("type", &self.r#type)?; } if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } if !self.data.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } @@ -2496,27 +2517,27 @@ impl<'de> serde::Deserialize<'de> for ProofOp { formatter.write_str("struct cosmos.base.tendermint.v1beta1.ProofOp") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut key__ = None; let mut data__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Type => { if r#type__.is_some() { return Err(serde::de::Error::duplicate_field("type")); } - r#type__ = Some(map.next_value()?); + r#type__ = Some(map_.next_value()?); } GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2525,7 +2546,7 @@ impl<'de> serde::Deserialize<'de> for ProofOp { return Err(serde::de::Error::duplicate_field("data")); } data__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2615,18 +2636,18 @@ impl<'de> serde::Deserialize<'de> for ProofOps { formatter.write_str("struct cosmos.base.tendermint.v1beta1.ProofOps") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut ops__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Ops => { if ops__.is_some() { return Err(serde::de::Error::duplicate_field("ops")); } - ops__ = Some(map.next_value()?); + ops__ = Some(map_.next_value()?); } } } @@ -2671,12 +2692,14 @@ impl serde::Serialize for Validator { struct_ser.serialize_field("pubKey", v)?; } if self.voting_power != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "votingPower", ToString::to_string(&self.voting_power).as_str(), )?; } if self.proposer_priority != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposerPriority", ToString::to_string(&self.proposer_priority).as_str(), @@ -2752,7 +2775,7 @@ impl<'de> serde::Deserialize<'de> for Validator { formatter.write_str("struct cosmos.base.tendermint.v1beta1.Validator") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2760,26 +2783,26 @@ impl<'de> serde::Deserialize<'de> for Validator { let mut pub_key__ = None; let mut voting_power__ = None; let mut proposer_priority__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::PubKey => { if pub_key__.is_some() { return Err(serde::de::Error::duplicate_field("pubKey")); } - pub_key__ = map.next_value()?; + pub_key__ = map_.next_value()?; } GeneratedField::VotingPower => { if voting_power__.is_some() { return Err(serde::de::Error::duplicate_field("votingPower")); } voting_power__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2788,7 +2811,7 @@ impl<'de> serde::Deserialize<'de> for Validator { return Err(serde::de::Error::duplicate_field("proposerPriority")); } proposer_priority__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2952,7 +2975,7 @@ impl<'de> serde::Deserialize<'de> for VersionInfo { formatter.write_str("struct cosmos.base.tendermint.v1beta1.VersionInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2964,55 +2987,55 @@ impl<'de> serde::Deserialize<'de> for VersionInfo { let mut go_version__ = None; let mut build_deps__ = None; let mut cosmos_sdk_version__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::AppName => { if app_name__.is_some() { return Err(serde::de::Error::duplicate_field("appName")); } - app_name__ = Some(map.next_value()?); + app_name__ = Some(map_.next_value()?); } GeneratedField::Version => { if version__.is_some() { return Err(serde::de::Error::duplicate_field("version")); } - version__ = Some(map.next_value()?); + version__ = Some(map_.next_value()?); } GeneratedField::GitCommit => { if git_commit__.is_some() { return Err(serde::de::Error::duplicate_field("gitCommit")); } - git_commit__ = Some(map.next_value()?); + git_commit__ = Some(map_.next_value()?); } GeneratedField::BuildTags => { if build_tags__.is_some() { return Err(serde::de::Error::duplicate_field("buildTags")); } - build_tags__ = Some(map.next_value()?); + build_tags__ = Some(map_.next_value()?); } GeneratedField::GoVersion => { if go_version__.is_some() { return Err(serde::de::Error::duplicate_field("goVersion")); } - go_version__ = Some(map.next_value()?); + go_version__ = Some(map_.next_value()?); } GeneratedField::BuildDeps => { if build_deps__.is_some() { return Err(serde::de::Error::duplicate_field("buildDeps")); } - build_deps__ = Some(map.next_value()?); + build_deps__ = Some(map_.next_value()?); } GeneratedField::CosmosSdkVersion => { if cosmos_sdk_version__.is_some() { return Err(serde::de::Error::duplicate_field("cosmosSdkVersion")); } - cosmos_sdk_version__ = Some(map.next_value()?); + cosmos_sdk_version__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs index b536e326..8a02bbd7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs @@ -3,6 +3,7 @@ /// /// NOTE: The amount field is an Int which implements the custom method /// signatures required by gogoproto. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Coin { #[prost(string, tag = "1")] @@ -14,6 +15,7 @@ pub struct Coin { /// /// NOTE: The amount field is an Dec which implements the custom method /// signatures required by gogoproto. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecCoin { #[prost(string, tag = "1")] @@ -22,12 +24,14 @@ pub struct DecCoin { pub amount: ::prost::alloc::string::String, } /// IntProto defines a Protobuf wrapper around an Int object. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IntProto { #[prost(string, tag = "1")] pub int: ::prost::alloc::string::String, } /// DecProto defines a Protobuf wrapper around a Dec object. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecProto { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs index 27675988..a9daa350 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs @@ -76,25 +76,25 @@ impl<'de> serde::Deserialize<'de> for Coin { formatter.write_str("struct cosmos.base.v1beta1.Coin") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut denom__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Denom => { if denom__.is_some() { return Err(serde::de::Error::duplicate_field("denom")); } - denom__ = Some(map.next_value()?); + denom__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -184,25 +184,25 @@ impl<'de> serde::Deserialize<'de> for DecCoin { formatter.write_str("struct cosmos.base.v1beta1.DecCoin") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut denom__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Denom => { if denom__.is_some() { return Err(serde::de::Error::duplicate_field("denom")); } - denom__ = Some(map.next_value()?); + denom__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -284,18 +284,18 @@ impl<'de> serde::Deserialize<'de> for DecProto { formatter.write_str("struct cosmos.base.v1beta1.DecProto") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut dec__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Dec => { if dec__.is_some() { return Err(serde::de::Error::duplicate_field("dec")); } - dec__ = Some(map.next_value()?); + dec__ = Some(map_.next_value()?); } } } @@ -376,18 +376,18 @@ impl<'de> serde::Deserialize<'de> for IntProto { formatter.write_str("struct cosmos.base.v1beta1.IntProto") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut int__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Int => { if int__.is_some() { return Err(serde::de::Error::duplicate_field("int")); } - int__ = Some(map.next_value()?); + int__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs index d095b226..2e2a7da7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// Capability defines an implementation of an object capability. The index /// provided to a Capability must be globally unique. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Capability { #[prost(uint64, tag = "1")] @@ -8,6 +9,7 @@ pub struct Capability { } /// Owner defines a single capability owner. An owner is defined by the name of /// capability and the module name. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Owner { #[prost(string, tag = "1")] @@ -17,12 +19,14 @@ pub struct Owner { } /// CapabilityOwners defines a set of owners of a single Capability. The set of /// owners must be unique. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CapabilityOwners { #[prost(message, repeated, tag = "1")] pub owners: ::prost::alloc::vec::Vec, } /// GenesisOwners defines the capability owners with their corresponding index. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisOwners { /// index is the index of the capability owner. @@ -33,6 +37,7 @@ pub struct GenesisOwners { pub index_owners: ::core::option::Option, } /// GenesisState defines the capability module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// index is the capability global index. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs index 6a3201d0..6fb7b000 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs @@ -13,6 +13,7 @@ impl serde::Serialize for Capability { let mut struct_ser = serializer.serialize_struct("cosmos.capability.v1beta1.Capability", len)?; if self.index != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; } struct_ser.end() @@ -69,19 +70,19 @@ impl<'de> serde::Deserialize<'de> for Capability { formatter.write_str("struct cosmos.capability.v1beta1.Capability") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut index__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Index => { if index__.is_some() { return Err(serde::de::Error::duplicate_field("index")); } index__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -169,18 +170,18 @@ impl<'de> serde::Deserialize<'de> for CapabilityOwners { formatter.write_str("struct cosmos.capability.v1beta1.CapabilityOwners") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut owners__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Owners => { if owners__.is_some() { return Err(serde::de::Error::duplicate_field("owners")); } - owners__ = Some(map.next_value()?); + owners__ = Some(map_.next_value()?); } } } @@ -213,6 +214,7 @@ impl serde::Serialize for GenesisOwners { let mut struct_ser = serializer.serialize_struct("cosmos.capability.v1beta1.GenesisOwners", len)?; if self.index != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; } if let Some(v) = self.index_owners.as_ref() { @@ -274,20 +276,20 @@ impl<'de> serde::Deserialize<'de> for GenesisOwners { formatter.write_str("struct cosmos.capability.v1beta1.GenesisOwners") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut index__ = None; let mut index_owners__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Index => { if index__.is_some() { return Err(serde::de::Error::duplicate_field("index")); } index__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -295,7 +297,7 @@ impl<'de> serde::Deserialize<'de> for GenesisOwners { if index_owners__.is_some() { return Err(serde::de::Error::duplicate_field("indexOwners")); } - index_owners__ = map.next_value()?; + index_owners__ = map_.next_value()?; } } } @@ -329,6 +331,7 @@ impl serde::Serialize for GenesisState { let mut struct_ser = serializer.serialize_struct("cosmos.capability.v1beta1.GenesisState", len)?; if self.index != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; } if !self.owners.is_empty() { @@ -390,20 +393,20 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.capability.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut index__ = None; let mut owners__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Index => { if index__.is_some() { return Err(serde::de::Error::duplicate_field("index")); } index__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -411,7 +414,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { if owners__.is_some() { return Err(serde::de::Error::duplicate_field("owners")); } - owners__ = Some(map.next_value()?); + owners__ = Some(map_.next_value()?); } } } @@ -505,25 +508,25 @@ impl<'de> serde::Deserialize<'de> for Owner { formatter.write_str("struct cosmos.capability.v1beta1.Owner") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut module__ = None; let mut name__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Module => { if module__.is_some() { return Err(serde::de::Error::duplicate_field("module")); } - module__ = Some(map.next_value()?); + module__ = Some(map_.next_value()?); } GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs index fa7fb771..470ed705 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// GenesisState defines the crisis module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// constant_fee is the fee used to verify the invariant in the crisis @@ -8,6 +9,7 @@ pub struct GenesisState { pub constant_fee: ::core::option::Option, } /// MsgVerifyInvariant represents a message to verify a particular invariance. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVerifyInvariant { #[prost(string, tag = "1")] @@ -18,6 +20,7 @@ pub struct MsgVerifyInvariant { pub invariant_route: ::prost::alloc::string::String, } /// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVerifyInvariantResponse {} include!("cosmos.crisis.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs index edcf9600..2dcb6741 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs @@ -69,18 +69,18 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.crisis.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut constant_fee__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ConstantFee => { if constant_fee__.is_some() { return Err(serde::de::Error::duplicate_field("constantFee")); } - constant_fee__ = map.next_value()?; + constant_fee__ = map_.next_value()?; } } } @@ -192,20 +192,20 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { formatter.write_str("struct cosmos.crisis.v1beta1.MsgVerifyInvariant") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut sender__ = None; let mut invariant_module_name__ = None; let mut invariant_route__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Sender => { if sender__.is_some() { return Err(serde::de::Error::duplicate_field("sender")); } - sender__ = Some(map.next_value()?); + sender__ = Some(map_.next_value()?); } GeneratedField::InvariantModuleName => { if invariant_module_name__.is_some() { @@ -213,13 +213,13 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { "invariantModuleName", )); } - invariant_module_name__ = Some(map.next_value()?); + invariant_module_name__ = Some(map_.next_value()?); } GeneratedField::InvariantRoute => { if invariant_route__.is_some() { return Err(serde::de::Error::duplicate_field("invariantRoute")); } - invariant_route__ = Some(map.next_value()?); + invariant_route__ = Some(map_.next_value()?); } } } @@ -298,13 +298,13 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariantResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgVerifyInvariantResponse {}) } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs index 9b0590f2..833192d2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs @@ -4,6 +4,7 @@ /// It must not be used in a non Tendermint key context because it doesn't implement /// ADR-28. Nevertheless, you will like to use ed25519 in app user level /// then you must create a new proto message and follow ADR-28 for Address construction. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubKey { #[prost(bytes = "vec", tag = "1")] @@ -11,6 +12,7 @@ pub struct PubKey { } /// Deprecated: PrivKey defines a ed25519 private key. /// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs index 50f53da1..9b2f6a41 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs @@ -12,6 +12,7 @@ impl serde::Serialize for PrivKey { } let mut struct_ser = serializer.serialize_struct("cosmos.crypto.ed25519.PrivKey", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } @@ -69,19 +70,19 @@ impl<'de> serde::Deserialize<'de> for PrivKey { formatter.write_str("struct cosmos.crypto.ed25519.PrivKey") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut key__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -108,6 +109,7 @@ impl serde::Serialize for PubKey { } let mut struct_ser = serializer.serialize_struct("cosmos.crypto.ed25519.PubKey", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } @@ -165,19 +167,19 @@ impl<'de> serde::Deserialize<'de> for PubKey { formatter.write_str("struct cosmos.crypto.ed25519.PubKey") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut key__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs index a873cedb..818e4abc 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs @@ -1,5 +1,6 @@ // @generated /// BIP44Params is used as path field in ledger item in Record. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Bip44Params { /// purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs index 96350051..bbc76ca9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs @@ -108,7 +108,7 @@ impl<'de> serde::Deserialize<'de> for Bip44Params { formatter.write_str("struct cosmos.crypto.hd.v1.BIP44Params") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -117,14 +117,14 @@ impl<'de> serde::Deserialize<'de> for Bip44Params { let mut account__ = None; let mut change__ = None; let mut address_index__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Purpose => { if purpose__.is_some() { return Err(serde::de::Error::duplicate_field("purpose")); } purpose__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -133,7 +133,7 @@ impl<'de> serde::Deserialize<'de> for Bip44Params { return Err(serde::de::Error::duplicate_field("coinType")); } coin_type__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -142,7 +142,7 @@ impl<'de> serde::Deserialize<'de> for Bip44Params { return Err(serde::de::Error::duplicate_field("account")); } account__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -150,14 +150,14 @@ impl<'de> serde::Deserialize<'de> for Bip44Params { if change__.is_some() { return Err(serde::de::Error::duplicate_field("change")); } - change__ = Some(map.next_value()?); + change__ = Some(map_.next_value()?); } GeneratedField::AddressIndex => { if address_index__.is_some() { return Err(serde::de::Error::duplicate_field("addressIndex")); } address_index__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs index 5a7c39f6..4643f946 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs @@ -1,5 +1,6 @@ // @generated /// Record is used for representing a key in the keyring. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Record { /// name represents a name of Record @@ -16,24 +17,29 @@ pub struct Record { pub mod record { /// Item is a keyring item stored in a keyring backend. /// Local item + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Local { #[prost(message, optional, tag = "1")] pub priv_key: ::core::option::Option<::prost_types::Any>, } /// Ledger item + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Ledger { #[prost(message, optional, tag = "1")] pub path: ::core::option::Option, } /// Multi item + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Multi {} /// Offline item + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Offline {} /// Record contains one of the following items + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Item { /// local stores the private key locally. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs index 8c2bff9f..ecd57986 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs @@ -105,32 +105,32 @@ impl<'de> serde::Deserialize<'de> for Record { formatter.write_str("struct cosmos.crypto.keyring.v1.Record") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut pub_key__ = None; let mut item__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::PubKey => { if pub_key__.is_some() { return Err(serde::de::Error::duplicate_field("pubKey")); } - pub_key__ = map.next_value()?; + pub_key__ = map_.next_value()?; } GeneratedField::Local => { if item__.is_some() { return Err(serde::de::Error::duplicate_field("local")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(record::Item::Local); } @@ -138,7 +138,7 @@ impl<'de> serde::Deserialize<'de> for Record { if item__.is_some() { return Err(serde::de::Error::duplicate_field("ledger")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(record::Item::Ledger); } @@ -146,7 +146,7 @@ impl<'de> serde::Deserialize<'de> for Record { if item__.is_some() { return Err(serde::de::Error::duplicate_field("multi")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(record::Item::Multi); } @@ -154,7 +154,7 @@ impl<'de> serde::Deserialize<'de> for Record { if item__.is_some() { return Err(serde::de::Error::duplicate_field("offline")); } - item__ = map + item__ = map_ .next_value::<::std::option::Option<_>>()? .map(record::Item::Offline); } @@ -240,18 +240,18 @@ impl<'de> serde::Deserialize<'de> for record::Ledger { formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Ledger") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut path__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Path => { if path__.is_some() { return Err(serde::de::Error::duplicate_field("path")); } - path__ = map.next_value()?; + path__ = map_.next_value()?; } } } @@ -335,18 +335,18 @@ impl<'de> serde::Deserialize<'de> for record::Local { formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Local") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut priv_key__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::PrivKey => { if priv_key__.is_some() { return Err(serde::de::Error::duplicate_field("privKey")); } - priv_key__ = map.next_value()?; + priv_key__ = map_.next_value()?; } } } @@ -421,12 +421,12 @@ impl<'de> serde::Deserialize<'de> for record::Multi { formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Multi") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(record::Multi {}) } @@ -497,12 +497,12 @@ impl<'de> serde::Deserialize<'de> for record::Offline { formatter.write_str("struct cosmos.crypto.keyring.v1.Record.Offline") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(record::Offline {}) } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs index fd122cdd..7d82167f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs @@ -2,6 +2,7 @@ /// LegacyAminoPubKey specifies a public key type /// which nests multiple public keys and a threshold, /// it uses legacy amino address rules. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LegacyAminoPubKey { #[prost(uint32, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs index cd754931..11ffd34c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs @@ -77,20 +77,20 @@ impl<'de> serde::Deserialize<'de> for LegacyAminoPubKey { formatter.write_str("struct cosmos.crypto.multisig.LegacyAminoPubKey") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut threshold__ = None; let mut public_keys__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Threshold => { if threshold__.is_some() { return Err(serde::de::Error::duplicate_field("threshold")); } threshold__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -98,7 +98,7 @@ impl<'de> serde::Deserialize<'de> for LegacyAminoPubKey { if public_keys__.is_some() { return Err(serde::de::Error::duplicate_field("publicKeys")); } - public_keys__ = Some(map.next_value()?); + public_keys__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs index 497374dc..38dcaeb7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs @@ -2,6 +2,7 @@ /// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. /// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers /// signed and with which modes. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiSignature { #[prost(bytes = "vec", repeated, tag = "1")] @@ -11,6 +12,7 @@ pub struct MultiSignature { /// This is used to ensure that the encoded data takes up a minimal amount of /// space after proto encoding. /// This is not thread safe, and is not intended for concurrent usage. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompactBitArray { #[prost(uint32, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs index c9110507..99814e8c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs @@ -19,6 +19,7 @@ impl serde::Serialize for CompactBitArray { struct_ser.serialize_field("extraBitsStored", &self.extra_bits_stored)?; } if !self.elems.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "elems", pbjson::private::base64::encode(&self.elems).as_str(), @@ -82,20 +83,20 @@ impl<'de> serde::Deserialize<'de> for CompactBitArray { formatter.write_str("struct cosmos.crypto.multisig.v1beta1.CompactBitArray") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut extra_bits_stored__ = None; let mut elems__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ExtraBitsStored => { if extra_bits_stored__.is_some() { return Err(serde::de::Error::duplicate_field("extraBitsStored")); } extra_bits_stored__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -104,7 +105,7 @@ impl<'de> serde::Deserialize<'de> for CompactBitArray { return Err(serde::de::Error::duplicate_field("elems")); } elems__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -200,19 +201,19 @@ impl<'de> serde::Deserialize<'de> for MultiSignature { formatter.write_str("struct cosmos.crypto.multisig.v1beta1.MultiSignature") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut signatures__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Signatures => { if signatures__.is_some() { return Err(serde::de::Error::duplicate_field("signatures")); } signatures__ = Some( - map.next_value::>>()? + map_.next_value::>>()? .into_iter() .map(|x| x.0) .collect(), diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs index fe5e61b2..bc3e9ac2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs @@ -4,12 +4,14 @@ /// if the y-coordinate is the lexicographically largest of the two associated with /// the x-coordinate. Otherwise the first byte is a 0x03. /// This prefix is followed with the x-coordinate. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubKey { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, } /// PrivKey defines a secp256k1 private key. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs index 2cab5fd6..db1140f5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs @@ -12,6 +12,7 @@ impl serde::Serialize for PrivKey { } let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256k1.PrivKey", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } @@ -69,19 +70,19 @@ impl<'de> serde::Deserialize<'de> for PrivKey { formatter.write_str("struct cosmos.crypto.secp256k1.PrivKey") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut key__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -108,6 +109,7 @@ impl serde::Serialize for PubKey { } let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256k1.PubKey", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } @@ -165,19 +167,19 @@ impl<'de> serde::Deserialize<'de> for PubKey { formatter.write_str("struct cosmos.crypto.secp256k1.PubKey") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut key__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs index 5301b9c3..23cc50dc 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs @@ -1,5 +1,6 @@ // @generated /// PubKey defines a secp256r1 ECDSA public key. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubKey { /// Point on secp256r1 curve in a compressed representation as specified in section @@ -8,6 +9,7 @@ pub struct PubKey { pub key: ::prost::alloc::vec::Vec, } /// PrivKey defines a secp256r1 ECDSA private key. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrivKey { /// secret number serialized using big-endian encoding diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs index d909334b..6ff278d8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs @@ -12,6 +12,7 @@ impl serde::Serialize for PrivKey { } let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256r1.PrivKey", len)?; if !self.secret.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "secret", pbjson::private::base64::encode(&self.secret).as_str(), @@ -71,19 +72,19 @@ impl<'de> serde::Deserialize<'de> for PrivKey { formatter.write_str("struct cosmos.crypto.secp256r1.PrivKey") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut secret__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Secret => { if secret__.is_some() { return Err(serde::de::Error::duplicate_field("secret")); } secret__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -110,6 +111,7 @@ impl serde::Serialize for PubKey { } let mut struct_ser = serializer.serialize_struct("cosmos.crypto.secp256r1.PubKey", len)?; if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } @@ -167,19 +169,19 @@ impl<'de> serde::Deserialize<'de> for PubKey { formatter.write_str("struct cosmos.crypto.secp256r1.PubKey") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut key__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } key__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs index 3612c905..9cbfccb6 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Params defines the set of params for the distribution module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(string, tag = "1")] @@ -23,6 +24,7 @@ pub struct Params { /// + number of slashes which ended the associated period (and might need to /// read that record) /// + one per validator for the zeroeth period, set on initialization +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorHistoricalRewards { #[prost(message, repeated, tag = "1")] @@ -33,6 +35,7 @@ pub struct ValidatorHistoricalRewards { /// ValidatorCurrentRewards represents current rewards and current /// period for a validator kept as a running counter and incremented /// each block as long as the validator's tokens remain constant. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorCurrentRewards { #[prost(message, repeated, tag = "1")] @@ -42,6 +45,7 @@ pub struct ValidatorCurrentRewards { } /// ValidatorAccumulatedCommission represents accumulated commission /// for a validator kept as a running counter, can be withdrawn at any time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorAccumulatedCommission { #[prost(message, repeated, tag = "1")] @@ -49,6 +53,7 @@ pub struct ValidatorAccumulatedCommission { } /// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards /// for a validator inexpensive to track, allows simple sanity checks. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorOutstandingRewards { #[prost(message, repeated, tag = "1")] @@ -58,6 +63,7 @@ pub struct ValidatorOutstandingRewards { /// Height is implicit within the store key. /// This is needed to calculate appropriate amount of staking tokens /// for delegations which are withdrawn after a slash has occurred. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorSlashEvent { #[prost(uint64, tag = "1")] @@ -66,12 +72,14 @@ pub struct ValidatorSlashEvent { pub fraction: ::prost::alloc::string::String, } /// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorSlashEvents { #[prost(message, repeated, tag = "1")] pub validator_slash_events: ::prost::alloc::vec::Vec, } /// FeePool is the global fee pool for distribution. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FeePool { #[prost(message, repeated, tag = "1")] @@ -80,6 +88,7 @@ pub struct FeePool { /// CommunityPoolSpendProposal details a proposal for use of community funds, /// together with how many coins are proposed to be spent, and to which /// recipient account. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommunityPoolSpendProposal { #[prost(string, tag = "1")] @@ -97,6 +106,7 @@ pub struct CommunityPoolSpendProposal { /// occurred). NOTE: Even though validators are slashed to whole staking tokens, /// the delegators within the validator may be left with less than a full token, /// thus sdk.Dec is used. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegatorStartingInfo { #[prost(uint64, tag = "1")] @@ -108,6 +118,7 @@ pub struct DelegatorStartingInfo { } /// DelegationDelegatorReward represents the properties /// of a delegator's delegation reward. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegationDelegatorReward { #[prost(string, tag = "1")] @@ -117,6 +128,7 @@ pub struct DelegationDelegatorReward { } /// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal /// with a deposit +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommunityPoolSpendProposalWithDeposit { #[prost(string, tag = "1")] @@ -133,6 +145,7 @@ pub struct CommunityPoolSpendProposalWithDeposit { /// DelegatorWithdrawInfo is the address for where distributions rewards are /// withdrawn to by default this struct is only used at genesis to feed in /// default withdraw addresses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegatorWithdrawInfo { /// delegator_address is the address of the delegator. @@ -143,6 +156,7 @@ pub struct DelegatorWithdrawInfo { pub withdraw_address: ::prost::alloc::string::String, } /// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorOutstandingRewardsRecord { /// validator_address is the address of the validator. @@ -154,6 +168,7 @@ pub struct ValidatorOutstandingRewardsRecord { } /// ValidatorAccumulatedCommissionRecord is used for import / export via genesis /// json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorAccumulatedCommissionRecord { /// validator_address is the address of the validator. @@ -165,6 +180,7 @@ pub struct ValidatorAccumulatedCommissionRecord { } /// ValidatorHistoricalRewardsRecord is used for import / export via genesis /// json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorHistoricalRewardsRecord { /// validator_address is the address of the validator. @@ -178,6 +194,7 @@ pub struct ValidatorHistoricalRewardsRecord { pub rewards: ::core::option::Option, } /// ValidatorCurrentRewardsRecord is used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorCurrentRewardsRecord { /// validator_address is the address of the validator. @@ -188,6 +205,7 @@ pub struct ValidatorCurrentRewardsRecord { pub rewards: ::core::option::Option, } /// DelegatorStartingInfoRecord used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegatorStartingInfoRecord { /// delegator_address is the address of the delegator. @@ -201,6 +219,7 @@ pub struct DelegatorStartingInfoRecord { pub starting_info: ::core::option::Option, } /// ValidatorSlashEventRecord is used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorSlashEventRecord { /// validator_address is the address of the validator. @@ -217,6 +236,7 @@ pub struct ValidatorSlashEventRecord { pub validator_slash_event: ::core::option::Option, } /// GenesisState defines the distribution module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of the module. @@ -252,9 +272,11 @@ pub struct GenesisState { pub validator_slash_events: ::prost::alloc::vec::Vec, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. @@ -263,6 +285,7 @@ pub struct QueryParamsResponse { } /// QueryValidatorOutstandingRewardsRequest is the request type for the /// Query/ValidatorOutstandingRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorOutstandingRewardsRequest { /// validator_address defines the validator address to query for. @@ -271,6 +294,7 @@ pub struct QueryValidatorOutstandingRewardsRequest { } /// QueryValidatorOutstandingRewardsResponse is the response type for the /// Query/ValidatorOutstandingRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorOutstandingRewardsResponse { #[prost(message, optional, tag = "1")] @@ -278,6 +302,7 @@ pub struct QueryValidatorOutstandingRewardsResponse { } /// QueryValidatorCommissionRequest is the request type for the /// Query/ValidatorCommission RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorCommissionRequest { /// validator_address defines the validator address to query for. @@ -286,6 +311,7 @@ pub struct QueryValidatorCommissionRequest { } /// QueryValidatorCommissionResponse is the response type for the /// Query/ValidatorCommission RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorCommissionResponse { /// commission defines the commision the validator received. @@ -294,6 +320,7 @@ pub struct QueryValidatorCommissionResponse { } /// QueryValidatorSlashesRequest is the request type for the /// Query/ValidatorSlashes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorSlashesRequest { /// validator_address defines the validator address to query for. @@ -311,6 +338,7 @@ pub struct QueryValidatorSlashesRequest { } /// QueryValidatorSlashesResponse is the response type for the /// Query/ValidatorSlashes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorSlashesResponse { /// slashes defines the slashes the validator received. @@ -322,6 +350,7 @@ pub struct QueryValidatorSlashesResponse { } /// QueryDelegationRewardsRequest is the request type for the /// Query/DelegationRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationRewardsRequest { /// delegator_address defines the delegator address to query for. @@ -333,6 +362,7 @@ pub struct QueryDelegationRewardsRequest { } /// QueryDelegationRewardsResponse is the response type for the /// Query/DelegationRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationRewardsResponse { /// rewards defines the rewards accrued by a delegation. @@ -341,6 +371,7 @@ pub struct QueryDelegationRewardsResponse { } /// QueryDelegationTotalRewardsRequest is the request type for the /// Query/DelegationTotalRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationTotalRewardsRequest { /// delegator_address defines the delegator address to query for. @@ -349,6 +380,7 @@ pub struct QueryDelegationTotalRewardsRequest { } /// QueryDelegationTotalRewardsResponse is the response type for the /// Query/DelegationTotalRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationTotalRewardsResponse { /// rewards defines all the rewards accrued by a delegator. @@ -360,6 +392,7 @@ pub struct QueryDelegationTotalRewardsResponse { } /// QueryDelegatorValidatorsRequest is the request type for the /// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorsRequest { /// delegator_address defines the delegator address to query for. @@ -368,6 +401,7 @@ pub struct QueryDelegatorValidatorsRequest { } /// QueryDelegatorValidatorsResponse is the response type for the /// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorsResponse { /// validators defines the validators a delegator is delegating for. @@ -376,6 +410,7 @@ pub struct QueryDelegatorValidatorsResponse { } /// QueryDelegatorWithdrawAddressRequest is the request type for the /// Query/DelegatorWithdrawAddress RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorWithdrawAddressRequest { /// delegator_address defines the delegator address to query for. @@ -384,6 +419,7 @@ pub struct QueryDelegatorWithdrawAddressRequest { } /// QueryDelegatorWithdrawAddressResponse is the response type for the /// Query/DelegatorWithdrawAddress RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorWithdrawAddressResponse { /// withdraw_address defines the delegator address to query for. @@ -392,10 +428,12 @@ pub struct QueryDelegatorWithdrawAddressResponse { } /// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCommunityPoolRequest {} /// QueryCommunityPoolResponse is the response type for the Query/CommunityPool /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCommunityPoolResponse { /// pool defines community pool's coins. @@ -404,6 +442,7 @@ pub struct QueryCommunityPoolResponse { } /// MsgSetWithdrawAddress sets the withdraw address for /// a delegator (or validator self-delegation). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSetWithdrawAddress { #[prost(string, tag = "1")] @@ -412,10 +451,12 @@ pub struct MsgSetWithdrawAddress { pub withdraw_address: ::prost::alloc::string::String, } /// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSetWithdrawAddressResponse {} /// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator /// from a single validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawDelegatorReward { #[prost(string, tag = "1")] @@ -424,6 +465,7 @@ pub struct MsgWithdrawDelegatorReward { pub validator_address: ::prost::alloc::string::String, } /// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawDelegatorRewardResponse { /// Since: cosmos-sdk 0.46 @@ -432,12 +474,14 @@ pub struct MsgWithdrawDelegatorRewardResponse { } /// MsgWithdrawValidatorCommission withdraws the full commission to the validator /// address. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawValidatorCommission { #[prost(string, tag = "1")] pub validator_address: ::prost::alloc::string::String, } /// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawValidatorCommissionResponse { /// Since: cosmos-sdk 0.46 @@ -446,6 +490,7 @@ pub struct MsgWithdrawValidatorCommissionResponse { } /// MsgFundCommunityPool allows an account to directly /// fund the community pool. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgFundCommunityPool { #[prost(message, repeated, tag = "1")] @@ -454,6 +499,7 @@ pub struct MsgFundCommunityPool { pub depositor: ::prost::alloc::string::String, } /// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgFundCommunityPoolResponse {} include!("cosmos.distribution.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs index c6aa7370..f440c919 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs @@ -97,7 +97,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -106,31 +106,31 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { let mut description__ = None; let mut recipient__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Title => { if title__.is_some() { return Err(serde::de::Error::duplicate_field("title")); } - title__ = Some(map.next_value()?); + title__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } GeneratedField::Recipient => { if recipient__.is_some() { return Err(serde::de::Error::duplicate_field("recipient")); } - recipient__ = Some(map.next_value()?); + recipient__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -257,7 +257,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -267,37 +267,37 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { let mut recipient__ = None; let mut amount__ = None; let mut deposit__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Title => { if title__.is_some() { return Err(serde::de::Error::duplicate_field("title")); } - title__ = Some(map.next_value()?); + title__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } GeneratedField::Recipient => { if recipient__.is_some() { return Err(serde::de::Error::duplicate_field("recipient")); } - recipient__ = Some(map.next_value()?); + recipient__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } GeneratedField::Deposit => { if deposit__.is_some() { return Err(serde::de::Error::duplicate_field("deposit")); } - deposit__ = Some(map.next_value()?); + deposit__ = Some(map_.next_value()?); } } } @@ -399,26 +399,26 @@ impl<'de> serde::Deserialize<'de> for DelegationDelegatorReward { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_address__ = None; let mut reward__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Reward => { if reward__.is_some() { return Err(serde::de::Error::duplicate_field("reward")); } - reward__ = Some(map.next_value()?); + reward__ = Some(map_.next_value()?); } } } @@ -455,6 +455,7 @@ impl serde::Serialize for DelegatorStartingInfo { let mut struct_ser = serializer .serialize_struct("cosmos.distribution.v1beta1.DelegatorStartingInfo", len)?; if self.previous_period != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "previousPeriod", ToString::to_string(&self.previous_period).as_str(), @@ -464,6 +465,7 @@ impl serde::Serialize for DelegatorStartingInfo { struct_ser.serialize_field("stake", &self.stake)?; } if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } struct_ser.end() @@ -528,7 +530,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -536,14 +538,14 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { let mut previous_period__ = None; let mut stake__ = None; let mut height__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::PreviousPeriod => { if previous_period__.is_some() { return Err(serde::de::Error::duplicate_field("previousPeriod")); } previous_period__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -551,14 +553,14 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { if stake__.is_some() { return Err(serde::de::Error::duplicate_field("stake")); } - stake__ = Some(map.next_value()?); + stake__ = Some(map_.next_value()?); } GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -680,7 +682,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -688,25 +690,25 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { let mut delegator_address__ = None; let mut validator_address__ = None; let mut starting_info__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::StartingInfo => { if starting_info__.is_some() { return Err(serde::de::Error::duplicate_field("startingInfo")); } - starting_info__ = map.next_value()?; + starting_info__ = map_.next_value()?; } } } @@ -813,26 +815,26 @@ impl<'de> serde::Deserialize<'de> for DelegatorWithdrawInfo { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut withdraw_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::WithdrawAddress => { if withdraw_address__.is_some() { return Err(serde::de::Error::duplicate_field("withdrawAddress")); } - withdraw_address__ = Some(map.next_value()?); + withdraw_address__ = Some(map_.next_value()?); } } } @@ -919,18 +921,18 @@ impl<'de> serde::Deserialize<'de> for FeePool { formatter.write_str("struct cosmos.distribution.v1beta1.FeePool") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut community_pool__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::CommunityPool => { if community_pool__.is_some() { return Err(serde::de::Error::duplicate_field("communityPool")); } - community_pool__ = Some(map.next_value()?); + community_pool__ = Some(map_.next_value()?); } } } @@ -1132,7 +1134,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.distribution.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1146,19 +1148,19 @@ impl<'de> serde::Deserialize<'de> for GenesisState { let mut validator_current_rewards__ = None; let mut delegator_starting_infos__ = None; let mut validator_slash_events__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } GeneratedField::FeePool => { if fee_pool__.is_some() { return Err(serde::de::Error::duplicate_field("feePool")); } - fee_pool__ = map.next_value()?; + fee_pool__ = map_.next_value()?; } GeneratedField::DelegatorWithdrawInfos => { if delegator_withdraw_infos__.is_some() { @@ -1166,13 +1168,13 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "delegatorWithdrawInfos", )); } - delegator_withdraw_infos__ = Some(map.next_value()?); + delegator_withdraw_infos__ = Some(map_.next_value()?); } GeneratedField::PreviousProposer => { if previous_proposer__.is_some() { return Err(serde::de::Error::duplicate_field("previousProposer")); } - previous_proposer__ = Some(map.next_value()?); + previous_proposer__ = Some(map_.next_value()?); } GeneratedField::OutstandingRewards => { if outstanding_rewards__.is_some() { @@ -1180,7 +1182,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "outstandingRewards", )); } - outstanding_rewards__ = Some(map.next_value()?); + outstanding_rewards__ = Some(map_.next_value()?); } GeneratedField::ValidatorAccumulatedCommissions => { if validator_accumulated_commissions__.is_some() { @@ -1188,7 +1190,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "validatorAccumulatedCommissions", )); } - validator_accumulated_commissions__ = Some(map.next_value()?); + validator_accumulated_commissions__ = Some(map_.next_value()?); } GeneratedField::ValidatorHistoricalRewards => { if validator_historical_rewards__.is_some() { @@ -1196,7 +1198,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "validatorHistoricalRewards", )); } - validator_historical_rewards__ = Some(map.next_value()?); + validator_historical_rewards__ = Some(map_.next_value()?); } GeneratedField::ValidatorCurrentRewards => { if validator_current_rewards__.is_some() { @@ -1204,7 +1206,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "validatorCurrentRewards", )); } - validator_current_rewards__ = Some(map.next_value()?); + validator_current_rewards__ = Some(map_.next_value()?); } GeneratedField::DelegatorStartingInfos => { if delegator_starting_infos__.is_some() { @@ -1212,7 +1214,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "delegatorStartingInfos", )); } - delegator_starting_infos__ = Some(map.next_value()?); + delegator_starting_infos__ = Some(map_.next_value()?); } GeneratedField::ValidatorSlashEvents => { if validator_slash_events__.is_some() { @@ -1220,7 +1222,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "validatorSlashEvents", )); } - validator_slash_events__ = Some(map.next_value()?); + validator_slash_events__ = Some(map_.next_value()?); } } } @@ -1325,25 +1327,28 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPool { formatter.write_str("struct cosmos.distribution.v1beta1.MsgFundCommunityPool") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut amount__ = None; let mut depositor__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } GeneratedField::Depositor => { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } } } @@ -1424,13 +1429,13 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPoolResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgFundCommunityPoolResponse {}) } @@ -1531,26 +1536,26 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddress { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut withdraw_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::WithdrawAddress => { if withdraw_address__.is_some() { return Err(serde::de::Error::duplicate_field("withdrawAddress")); } - withdraw_address__ = Some(map.next_value()?); + withdraw_address__ = Some(map_.next_value()?); } } } @@ -1631,13 +1636,13 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddressResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgSetWithdrawAddressResponse {}) } @@ -1740,26 +1745,26 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorReward { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut validator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } } } @@ -1852,19 +1857,19 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorRewardResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -1957,19 +1962,19 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommission { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } } } @@ -2061,19 +2066,19 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommissionResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -2198,7 +2203,7 @@ impl<'de> serde::Deserialize<'de> for Params { formatter.write_str("struct cosmos.distribution.v1beta1.Params") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2206,13 +2211,13 @@ impl<'de> serde::Deserialize<'de> for Params { let mut base_proposer_reward__ = None; let mut bonus_proposer_reward__ = None; let mut withdraw_addr_enabled__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::CommunityTax => { if community_tax__.is_some() { return Err(serde::de::Error::duplicate_field("communityTax")); } - community_tax__ = Some(map.next_value()?); + community_tax__ = Some(map_.next_value()?); } GeneratedField::BaseProposerReward => { if base_proposer_reward__.is_some() { @@ -2220,7 +2225,7 @@ impl<'de> serde::Deserialize<'de> for Params { "baseProposerReward", )); } - base_proposer_reward__ = Some(map.next_value()?); + base_proposer_reward__ = Some(map_.next_value()?); } GeneratedField::BonusProposerReward => { if bonus_proposer_reward__.is_some() { @@ -2228,7 +2233,7 @@ impl<'de> serde::Deserialize<'de> for Params { "bonusProposerReward", )); } - bonus_proposer_reward__ = Some(map.next_value()?); + bonus_proposer_reward__ = Some(map_.next_value()?); } GeneratedField::WithdrawAddrEnabled => { if withdraw_addr_enabled__.is_some() { @@ -2236,7 +2241,7 @@ impl<'de> serde::Deserialize<'de> for Params { "withdrawAddrEnabled", )); } - withdraw_addr_enabled__ = Some(map.next_value()?); + withdraw_addr_enabled__ = Some(map_.next_value()?); } } } @@ -2316,13 +2321,13 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryCommunityPoolRequest {}) } @@ -2408,19 +2413,19 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pool__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pool => { if pool__.is_some() { return Err(serde::de::Error::duplicate_field("pool")); } - pool__ = Some(map.next_value()?); + pool__ = Some(map_.next_value()?); } } } @@ -2528,26 +2533,26 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut validator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } } } @@ -2639,19 +2644,19 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut rewards__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Rewards => { if rewards__.is_some() { return Err(serde::de::Error::duplicate_field("rewards")); } - rewards__ = Some(map.next_value()?); + rewards__ = Some(map_.next_value()?); } } } @@ -2745,19 +2750,19 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } } } @@ -2857,26 +2862,26 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut rewards__ = None; let mut total__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Rewards => { if rewards__.is_some() { return Err(serde::de::Error::duplicate_field("rewards")); } - rewards__ = Some(map.next_value()?); + rewards__ = Some(map_.next_value()?); } GeneratedField::Total => { if total__.is_some() { return Err(serde::de::Error::duplicate_field("total")); } - total__ = Some(map.next_value()?); + total__ = Some(map_.next_value()?); } } } @@ -2970,19 +2975,19 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } } } @@ -3074,19 +3079,19 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validators__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Validators => { if validators__.is_some() { return Err(serde::de::Error::duplicate_field("validators")); } - validators__ = Some(map.next_value()?); + validators__ = Some(map_.next_value()?); } } } @@ -3180,19 +3185,19 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } } } @@ -3286,19 +3291,19 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut withdraw_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::WithdrawAddress => { if withdraw_address__.is_some() { return Err(serde::de::Error::duplicate_field("withdrawAddress")); } - withdraw_address__ = Some(map.next_value()?); + withdraw_address__ = Some(map_.next_value()?); } } } @@ -3373,12 +3378,12 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.distribution.v1beta1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryParamsRequest {}) } @@ -3460,18 +3465,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.distribution.v1beta1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } } } @@ -3562,19 +3567,19 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } } } @@ -3666,19 +3671,19 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut commission__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Commission => { if commission__.is_some() { return Err(serde::de::Error::duplicate_field("commission")); } - commission__ = map.next_value()?; + commission__ = map_.next_value()?; } } } @@ -3772,19 +3777,19 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } } } @@ -3876,19 +3881,19 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut rewards__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Rewards => { if rewards__.is_some() { return Err(serde::de::Error::duplicate_field("rewards")); } - rewards__ = map.next_value()?; + rewards__ = map_.next_value()?; } } } @@ -3930,12 +3935,14 @@ impl serde::Serialize for QueryValidatorSlashesRequest { struct_ser.serialize_field("validatorAddress", &self.validator_address)?; } if self.starting_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "startingHeight", ToString::to_string(&self.starting_height).as_str(), )?; } if self.ending_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "endingHeight", ToString::to_string(&self.ending_height).as_str(), @@ -4019,7 +4026,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -4028,20 +4035,20 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { let mut starting_height__ = None; let mut ending_height__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::StartingHeight => { if starting_height__.is_some() { return Err(serde::de::Error::duplicate_field("startingHeight")); } starting_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4050,7 +4057,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { return Err(serde::de::Error::duplicate_field("endingHeight")); } ending_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4058,7 +4065,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -4160,26 +4167,26 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut slashes__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Slashes => { if slashes__.is_some() { return Err(serde::de::Error::duplicate_field("slashes")); } - slashes__ = Some(map.next_value()?); + slashes__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -4271,19 +4278,19 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommission { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut commission__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Commission => { if commission__.is_some() { return Err(serde::de::Error::duplicate_field("commission")); } - commission__ = Some(map.next_value()?); + commission__ = Some(map_.next_value()?); } } } @@ -4385,26 +4392,26 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommissionRecord { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_address__ = None; let mut accumulated__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Accumulated => { if accumulated__.is_some() { return Err(serde::de::Error::duplicate_field("accumulated")); } - accumulated__ = map.next_value()?; + accumulated__ = map_.next_value()?; } } } @@ -4441,6 +4448,7 @@ impl serde::Serialize for ValidatorCurrentRewards { struct_ser.serialize_field("rewards", &self.rewards)?; } if self.period != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("period", ToString::to_string(&self.period).as_str())?; } struct_ser.end() @@ -4501,27 +4509,27 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewards { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut rewards__ = None; let mut period__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Rewards => { if rewards__.is_some() { return Err(serde::de::Error::duplicate_field("rewards")); } - rewards__ = Some(map.next_value()?); + rewards__ = Some(map_.next_value()?); } GeneratedField::Period => { if period__.is_some() { return Err(serde::de::Error::duplicate_field("period")); } period__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4625,26 +4633,26 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewardsRecord { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_address__ = None; let mut rewards__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Rewards => { if rewards__.is_some() { return Err(serde::de::Error::duplicate_field("rewards")); } - rewards__ = map.next_value()?; + rewards__ = map_.next_value()?; } } } @@ -4752,14 +4760,14 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut cumulative_reward_ratio__ = None; let mut reference_count__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::CumulativeRewardRatio => { if cumulative_reward_ratio__.is_some() { @@ -4767,14 +4775,14 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { "cumulativeRewardRatio", )); } - cumulative_reward_ratio__ = Some(map.next_value()?); + cumulative_reward_ratio__ = Some(map_.next_value()?); } GeneratedField::ReferenceCount => { if reference_count__.is_some() { return Err(serde::de::Error::duplicate_field("referenceCount")); } reference_count__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4818,6 +4826,7 @@ impl serde::Serialize for ValidatorHistoricalRewardsRecord { struct_ser.serialize_field("validatorAddress", &self.validator_address)?; } if self.period != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("period", ToString::to_string(&self.period).as_str())?; } if let Some(v) = self.rewards.as_ref() { @@ -4887,7 +4896,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -4895,20 +4904,20 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { let mut validator_address__ = None; let mut period__ = None; let mut rewards__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Period => { if period__.is_some() { return Err(serde::de::Error::duplicate_field("period")); } period__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4916,7 +4925,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { if rewards__.is_some() { return Err(serde::de::Error::duplicate_field("rewards")); } - rewards__ = map.next_value()?; + rewards__ = map_.next_value()?; } } } @@ -5009,19 +5018,19 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewards { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut rewards__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Rewards => { if rewards__.is_some() { return Err(serde::de::Error::duplicate_field("rewards")); } - rewards__ = Some(map.next_value()?); + rewards__ = Some(map_.next_value()?); } } } @@ -5130,20 +5139,20 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_address__ = None; let mut outstanding_rewards__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::OutstandingRewards => { if outstanding_rewards__.is_some() { @@ -5151,7 +5160,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { "outstandingRewards", )); } - outstanding_rewards__ = Some(map.next_value()?); + outstanding_rewards__ = Some(map_.next_value()?); } } } @@ -5185,6 +5194,7 @@ impl serde::Serialize for ValidatorSlashEvent { let mut struct_ser = serializer.serialize_struct("cosmos.distribution.v1beta1.ValidatorSlashEvent", len)?; if self.validator_period != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "validatorPeriod", ToString::to_string(&self.validator_period).as_str(), @@ -5251,20 +5261,20 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { formatter.write_str("struct cosmos.distribution.v1beta1.ValidatorSlashEvent") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_period__ = None; let mut fraction__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorPeriod => { if validator_period__.is_some() { return Err(serde::de::Error::duplicate_field("validatorPeriod")); } validator_period__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -5272,7 +5282,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { if fraction__.is_some() { return Err(serde::de::Error::duplicate_field("fraction")); } - fraction__ = Some(map.next_value()?); + fraction__ = Some(map_.next_value()?); } } } @@ -5315,9 +5325,11 @@ impl serde::Serialize for ValidatorSlashEventRecord { struct_ser.serialize_field("validatorAddress", &self.validator_address)?; } if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if self.period != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("period", ToString::to_string(&self.period).as_str())?; } if let Some(v) = self.validator_slash_event.as_ref() { @@ -5396,7 +5408,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -5405,20 +5417,20 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { let mut height__ = None; let mut period__ = None; let mut validator_slash_event__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -5427,7 +5439,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { return Err(serde::de::Error::duplicate_field("period")); } period__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -5437,7 +5449,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { "validatorSlashEvent", )); } - validator_slash_event__ = map.next_value()?; + validator_slash_event__ = map_.next_value()?; } } } @@ -5528,12 +5540,15 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvents { formatter.write_str("struct cosmos.distribution.v1beta1.ValidatorSlashEvents") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_slash_events__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorSlashEvents => { if validator_slash_events__.is_some() { @@ -5541,7 +5556,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvents { "validatorSlashEvents", )); } - validator_slash_events__ = Some(map.next_value()?); + validator_slash_events__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs index 556828eb..c65bee42 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// Equivocation implements the Evidence interface and defines evidence of double /// signing misbehavior. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Equivocation { #[prost(int64, tag = "1")] @@ -13,6 +14,7 @@ pub struct Equivocation { pub consensus_address: ::prost::alloc::string::String, } /// GenesisState defines the evidence module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// evidence defines all the evidence at genesis. @@ -20,6 +22,7 @@ pub struct GenesisState { pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>, } /// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryEvidenceRequest { /// evidence_hash defines the hash of the requested evidence. @@ -27,6 +30,7 @@ pub struct QueryEvidenceRequest { pub evidence_hash: ::prost::alloc::vec::Vec, } /// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryEvidenceResponse { /// evidence returns the requested evidence. @@ -35,6 +39,7 @@ pub struct QueryEvidenceResponse { } /// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllEvidenceRequest { /// pagination defines an optional pagination for the request. @@ -43,6 +48,7 @@ pub struct QueryAllEvidenceRequest { } /// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllEvidenceResponse { /// evidence returns all evidences. @@ -54,6 +60,7 @@ pub struct QueryAllEvidenceResponse { } /// MsgSubmitEvidence represents a message that supports submitting arbitrary /// Evidence of misbehavior such as equivocation or counterfactual signing. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitEvidence { #[prost(string, tag = "1")] @@ -62,6 +69,7 @@ pub struct MsgSubmitEvidence { pub evidence: ::core::option::Option<::prost_types::Any>, } /// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitEvidenceResponse { /// hash defines the hash of the evidence. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs index 8e8e3941..bd362eb3 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs @@ -22,12 +22,14 @@ impl serde::Serialize for Equivocation { let mut struct_ser = serializer.serialize_struct("cosmos.evidence.v1beta1.Equivocation", len)?; if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if let Some(v) = self.time.as_ref() { struct_ser.serialize_field("time", v)?; } if self.power != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("power", ToString::to_string(&self.power).as_str())?; } if !self.consensus_address.is_empty() { @@ -101,7 +103,7 @@ impl<'de> serde::Deserialize<'de> for Equivocation { formatter.write_str("struct cosmos.evidence.v1beta1.Equivocation") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -109,14 +111,14 @@ impl<'de> serde::Deserialize<'de> for Equivocation { let mut time__ = None; let mut power__ = None; let mut consensus_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -124,14 +126,14 @@ impl<'de> serde::Deserialize<'de> for Equivocation { if time__.is_some() { return Err(serde::de::Error::duplicate_field("time")); } - time__ = map.next_value()?; + time__ = map_.next_value()?; } GeneratedField::Power => { if power__.is_some() { return Err(serde::de::Error::duplicate_field("power")); } power__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -139,7 +141,7 @@ impl<'de> serde::Deserialize<'de> for Equivocation { if consensus_address__.is_some() { return Err(serde::de::Error::duplicate_field("consensusAddress")); } - consensus_address__ = Some(map.next_value()?); + consensus_address__ = Some(map_.next_value()?); } } } @@ -228,18 +230,18 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.evidence.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut evidence__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Evidence => { if evidence__.is_some() { return Err(serde::de::Error::duplicate_field("evidence")); } - evidence__ = Some(map.next_value()?); + evidence__ = Some(map_.next_value()?); } } } @@ -333,25 +335,25 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidence { formatter.write_str("struct cosmos.evidence.v1beta1.MsgSubmitEvidence") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut submitter__ = None; let mut evidence__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Submitter => { if submitter__.is_some() { return Err(serde::de::Error::duplicate_field("submitter")); } - submitter__ = Some(map.next_value()?); + submitter__ = Some(map_.next_value()?); } GeneratedField::Evidence => { if evidence__.is_some() { return Err(serde::de::Error::duplicate_field("evidence")); } - evidence__ = map.next_value()?; + evidence__ = map_.next_value()?; } } } @@ -382,6 +384,7 @@ impl serde::Serialize for MsgSubmitEvidenceResponse { let mut struct_ser = serializer .serialize_struct("cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse", len)?; if !self.hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; } @@ -441,20 +444,20 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidenceResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut hash__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Hash => { if hash__.is_some() { return Err(serde::de::Error::duplicate_field("hash")); } hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -544,19 +547,19 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -652,26 +655,26 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut evidence__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Evidence => { if evidence__.is_some() { return Err(serde::de::Error::duplicate_field("evidence")); } - evidence__ = Some(map.next_value()?); + evidence__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -702,6 +705,7 @@ impl serde::Serialize for QueryEvidenceRequest { let mut struct_ser = serializer.serialize_struct("cosmos.evidence.v1beta1.QueryEvidenceRequest", len)?; if !self.evidence_hash.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "evidenceHash", pbjson::private::base64::encode(&self.evidence_hash).as_str(), @@ -761,19 +765,22 @@ impl<'de> serde::Deserialize<'de> for QueryEvidenceRequest { formatter.write_str("struct cosmos.evidence.v1beta1.QueryEvidenceRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut evidence_hash__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::EvidenceHash => { if evidence_hash__.is_some() { return Err(serde::de::Error::duplicate_field("evidenceHash")); } evidence_hash__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -863,19 +870,19 @@ impl<'de> serde::Deserialize<'de> for QueryEvidenceResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut evidence__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Evidence => { if evidence__.is_some() { return Err(serde::de::Error::duplicate_field("evidence")); } - evidence__ = map.next_value()?; + evidence__ = map_.next_value()?; } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs index 5469e27f..998159d8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// BasicAllowance implements Allowance with a one-time grant of coins /// that optionally expires. The grantee can use up to SpendLimit to cover fees. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BasicAllowance { /// spend_limit specifies the maximum amount of coins that can be spent @@ -14,6 +15,7 @@ pub struct BasicAllowance { } /// PeriodicAllowance extends Allowance to allow for both a maximum cap, /// as well as a limit per time period. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeriodicAllowance { /// basic specifies a struct of `BasicAllowance` @@ -37,6 +39,7 @@ pub struct PeriodicAllowance { pub period_reset: ::core::option::Option<::prost_types::Timestamp>, } /// AllowedMsgAllowance creates allowance only for specified message types. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AllowedMsgAllowance { /// allowance can be any of basic and periodic fee allowance. @@ -47,6 +50,7 @@ pub struct AllowedMsgAllowance { pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Grant is stored in the KVStore to record a grant with full context +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Grant { /// granter is the address of the user granting an allowance of their funds. @@ -60,12 +64,14 @@ pub struct Grant { pub allowance: ::core::option::Option<::prost_types::Any>, } /// GenesisState contains a set of fee allowances, persisted from the store +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, repeated, tag = "1")] pub allowances: ::prost::alloc::vec::Vec, } /// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowanceRequest { /// granter is the address of the user granting an allowance of their funds. @@ -76,6 +82,7 @@ pub struct QueryAllowanceRequest { pub grantee: ::prost::alloc::string::String, } /// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowanceResponse { /// allowance is a allowance granted for grantee by granter. @@ -83,6 +90,7 @@ pub struct QueryAllowanceResponse { pub allowance: ::core::option::Option, } /// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesRequest { #[prost(string, tag = "1")] @@ -92,6 +100,7 @@ pub struct QueryAllowancesRequest { pub pagination: ::core::option::Option, } /// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesResponse { /// allowances are allowance's granted for grantee by granter. @@ -104,6 +113,7 @@ pub struct QueryAllowancesResponse { /// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesByGranterRequest { #[prost(string, tag = "1")] @@ -115,6 +125,7 @@ pub struct QueryAllowancesByGranterRequest { /// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesByGranterResponse { /// allowances that have been issued by the granter. @@ -126,6 +137,7 @@ pub struct QueryAllowancesByGranterResponse { } /// MsgGrantAllowance adds permission for Grantee to spend up to Allowance /// of fees from the account of Granter. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrantAllowance { /// granter is the address of the user granting an allowance of their funds. @@ -139,9 +151,11 @@ pub struct MsgGrantAllowance { pub allowance: ::core::option::Option<::prost_types::Any>, } /// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrantAllowanceResponse {} /// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeAllowance { /// granter is the address of the user granting an allowance of their funds. @@ -152,6 +166,7 @@ pub struct MsgRevokeAllowance { pub grantee: ::prost::alloc::string::String, } /// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeAllowanceResponse {} include!("cosmos.feegrant.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs index 1d438797..1af4b0b5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs @@ -79,25 +79,25 @@ impl<'de> serde::Deserialize<'de> for AllowedMsgAllowance { formatter.write_str("struct cosmos.feegrant.v1beta1.AllowedMsgAllowance") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut allowance__ = None; let mut allowed_messages__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Allowance => { if allowance__.is_some() { return Err(serde::de::Error::duplicate_field("allowance")); } - allowance__ = map.next_value()?; + allowance__ = map_.next_value()?; } GeneratedField::AllowedMessages => { if allowed_messages__.is_some() { return Err(serde::de::Error::duplicate_field("allowedMessages")); } - allowed_messages__ = Some(map.next_value()?); + allowed_messages__ = Some(map_.next_value()?); } } } @@ -192,25 +192,25 @@ impl<'de> serde::Deserialize<'de> for BasicAllowance { formatter.write_str("struct cosmos.feegrant.v1beta1.BasicAllowance") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut spend_limit__ = None; let mut expiration__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::SpendLimit => { if spend_limit__.is_some() { return Err(serde::de::Error::duplicate_field("spendLimit")); } - spend_limit__ = Some(map.next_value()?); + spend_limit__ = Some(map_.next_value()?); } GeneratedField::Expiration => { if expiration__.is_some() { return Err(serde::de::Error::duplicate_field("expiration")); } - expiration__ = map.next_value()?; + expiration__ = map_.next_value()?; } } } @@ -297,18 +297,18 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.feegrant.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut allowances__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Allowances => { if allowances__.is_some() { return Err(serde::de::Error::duplicate_field("allowances")); } - allowances__ = Some(map.next_value()?); + allowances__ = Some(map_.next_value()?); } } } @@ -409,32 +409,32 @@ impl<'de> serde::Deserialize<'de> for Grant { formatter.write_str("struct cosmos.feegrant.v1beta1.Grant") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut granter__ = None; let mut grantee__ = None; let mut allowance__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::Allowance => { if allowance__.is_some() { return Err(serde::de::Error::duplicate_field("allowance")); } - allowance__ = map.next_value()?; + allowance__ = map_.next_value()?; } } } @@ -534,32 +534,32 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowance { formatter.write_str("struct cosmos.feegrant.v1beta1.MsgGrantAllowance") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut granter__ = None; let mut grantee__ = None; let mut allowance__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::Allowance => { if allowance__.is_some() { return Err(serde::de::Error::duplicate_field("allowance")); } - allowance__ = map.next_value()?; + allowance__ = map_.next_value()?; } } } @@ -638,13 +638,13 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowanceResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgGrantAllowanceResponse {}) } @@ -734,25 +734,25 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowance { formatter.write_str("struct cosmos.feegrant.v1beta1.MsgRevokeAllowance") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut granter__ = None; let mut grantee__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } } } @@ -830,13 +830,13 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowanceResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgRevokeAllowanceResponse {}) } @@ -963,7 +963,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicAllowance { formatter.write_str("struct cosmos.feegrant.v1beta1.PeriodicAllowance") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -972,37 +972,37 @@ impl<'de> serde::Deserialize<'de> for PeriodicAllowance { let mut period_spend_limit__ = None; let mut period_can_spend__ = None; let mut period_reset__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Basic => { if basic__.is_some() { return Err(serde::de::Error::duplicate_field("basic")); } - basic__ = map.next_value()?; + basic__ = map_.next_value()?; } GeneratedField::Period => { if period__.is_some() { return Err(serde::de::Error::duplicate_field("period")); } - period__ = map.next_value()?; + period__ = map_.next_value()?; } GeneratedField::PeriodSpendLimit => { if period_spend_limit__.is_some() { return Err(serde::de::Error::duplicate_field("periodSpendLimit")); } - period_spend_limit__ = Some(map.next_value()?); + period_spend_limit__ = Some(map_.next_value()?); } GeneratedField::PeriodCanSpend => { if period_can_spend__.is_some() { return Err(serde::de::Error::duplicate_field("periodCanSpend")); } - period_can_spend__ = Some(map.next_value()?); + period_can_spend__ = Some(map_.next_value()?); } GeneratedField::PeriodReset => { if period_reset__.is_some() { return Err(serde::de::Error::duplicate_field("periodReset")); } - period_reset__ = map.next_value()?; + period_reset__ = map_.next_value()?; } } } @@ -1102,26 +1102,26 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut granter__ = None; let mut grantee__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } } } @@ -1210,19 +1210,19 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut allowance__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Allowance => { if allowance__.is_some() { return Err(serde::de::Error::duplicate_field("allowance")); } - allowance__ = map.next_value()?; + allowance__ = map_.next_value()?; } } } @@ -1321,26 +1321,26 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut granter__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1440,26 +1440,26 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut allowances__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Allowances => { if allowances__.is_some() { return Err(serde::de::Error::duplicate_field("allowances")); } - allowances__ = Some(map.next_value()?); + allowances__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1556,26 +1556,26 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut grantee__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Grantee => { if grantee__.is_some() { return Err(serde::de::Error::duplicate_field("grantee")); } - grantee__ = Some(map.next_value()?); + grantee__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1672,26 +1672,26 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut allowances__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Allowances => { if allowances__.is_some() { return Err(serde::de::Error::duplicate_field("allowances")); } - allowances__ = Some(map.next_value()?); + allowances__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs index acd65772..5be93326 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// GenesisState defines the raw genesis transaction in JSON. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// gen_txs defines the genesis transactions. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs index 4f5f66ea..1b3f71c8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs @@ -76,19 +76,19 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.genutil.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut gen_txs__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GenTxs => { if gen_txs__.is_some() { return Err(serde::de::Error::duplicate_field("genTxs")); } gen_txs__ = Some( - map.next_value::>>()? + map_.next_value::>>()? .into_iter() .map(|x| x.0) .collect(), diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs index 29795791..aea05b72 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs @@ -1,5 +1,6 @@ // @generated /// WeightedVoteOption defines a unit of vote for vote split. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WeightedVoteOption { #[prost(enumeration = "VoteOption", tag = "1")] @@ -9,6 +10,7 @@ pub struct WeightedVoteOption { } /// Deposit defines an amount deposited by an account address to an active /// proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Deposit { #[prost(uint64, tag = "1")] @@ -19,6 +21,7 @@ pub struct Deposit { pub amount: ::prost::alloc::vec::Vec, } /// Proposal defines the core field members of a governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Proposal { #[prost(uint64, tag = "1")] @@ -47,6 +50,7 @@ pub struct Proposal { pub metadata: ::prost::alloc::string::String, } /// TallyResult defines a standard tally for a governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyResult { #[prost(string, tag = "1")] @@ -60,6 +64,7 @@ pub struct TallyResult { } /// Vote defines a vote on a governance proposal. /// A Vote consists of a proposal ID, the voter, and the vote option. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vote { #[prost(uint64, tag = "1")] @@ -73,6 +78,7 @@ pub struct Vote { pub metadata: ::prost::alloc::string::String, } /// DepositParams defines the params for deposits on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DepositParams { /// Minimum deposit for a proposal to enter voting period. @@ -84,6 +90,7 @@ pub struct DepositParams { pub max_deposit_period: ::core::option::Option<::prost_types::Duration>, } /// VotingParams defines the params for voting on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VotingParams { /// Length of the voting period. @@ -91,6 +98,7 @@ pub struct VotingParams { pub voting_period: ::core::option::Option<::prost_types::Duration>, } /// TallyParams defines the params for tallying votes on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyParams { /// Minimum percentage of total stake needed to vote for a result to be @@ -134,6 +142,17 @@ impl VoteOption { VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), + "VOTE_OPTION_YES" => Some(Self::Yes), + "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), + "VOTE_OPTION_NO" => Some(Self::No), + "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), + _ => None, + } + } } /// ProposalStatus enumerates the valid statuses of a proposal. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -172,8 +191,21 @@ impl ProposalStatus { ProposalStatus::Failed => "PROPOSAL_STATUS_FAILED", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Some(Self::DepositPeriod), + "PROPOSAL_STATUS_VOTING_PERIOD" => Some(Self::VotingPeriod), + "PROPOSAL_STATUS_PASSED" => Some(Self::Passed), + "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), + "PROPOSAL_STATUS_FAILED" => Some(Self::Failed), + _ => None, + } + } } /// GenesisState defines the gov module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// starting_proposal_id is the ID of the starting proposal. @@ -199,6 +231,7 @@ pub struct GenesisState { pub tally_params: ::core::option::Option, } /// QueryProposalRequest is the request type for the Query/Proposal RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalRequest { /// proposal_id defines the unique id of the proposal. @@ -206,12 +239,14 @@ pub struct QueryProposalRequest { pub proposal_id: u64, } /// QueryProposalResponse is the response type for the Query/Proposal RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalResponse { #[prost(message, optional, tag = "1")] pub proposal: ::core::option::Option, } /// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsRequest { /// proposal_status defines the status of the proposals. @@ -229,6 +264,7 @@ pub struct QueryProposalsRequest { } /// QueryProposalsResponse is the response type for the Query/Proposals RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsResponse { #[prost(message, repeated, tag = "1")] @@ -238,6 +274,7 @@ pub struct QueryProposalsResponse { pub pagination: ::core::option::Option, } /// QueryVoteRequest is the request type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteRequest { /// proposal_id defines the unique id of the proposal. @@ -248,6 +285,7 @@ pub struct QueryVoteRequest { pub voter: ::prost::alloc::string::String, } /// QueryVoteResponse is the response type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteResponse { /// vote defined the queried vote. @@ -255,6 +293,7 @@ pub struct QueryVoteResponse { pub vote: ::core::option::Option, } /// QueryVotesRequest is the request type for the Query/Votes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesRequest { /// proposal_id defines the unique id of the proposal. @@ -265,6 +304,7 @@ pub struct QueryVotesRequest { pub pagination: ::core::option::Option, } /// QueryVotesResponse is the response type for the Query/Votes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesResponse { /// votes defined the queried votes. @@ -275,6 +315,7 @@ pub struct QueryVotesResponse { pub pagination: ::core::option::Option, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest { /// params_type defines which parameters to query for, can be one of "voting", @@ -283,6 +324,7 @@ pub struct QueryParamsRequest { pub params_type: ::prost::alloc::string::String, } /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// voting_params defines the parameters related to voting. @@ -296,6 +338,7 @@ pub struct QueryParamsResponse { pub tally_params: ::core::option::Option, } /// QueryDepositRequest is the request type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositRequest { /// proposal_id defines the unique id of the proposal. @@ -306,6 +349,7 @@ pub struct QueryDepositRequest { pub depositor: ::prost::alloc::string::String, } /// QueryDepositResponse is the response type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositResponse { /// deposit defines the requested deposit. @@ -313,6 +357,7 @@ pub struct QueryDepositResponse { pub deposit: ::core::option::Option, } /// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositsRequest { /// proposal_id defines the unique id of the proposal. @@ -323,6 +368,7 @@ pub struct QueryDepositsRequest { pub pagination: ::core::option::Option, } /// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositsResponse { #[prost(message, repeated, tag = "1")] @@ -332,6 +378,7 @@ pub struct QueryDepositsResponse { pub pagination: ::core::option::Option, } /// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultRequest { /// proposal_id defines the unique id of the proposal. @@ -339,6 +386,7 @@ pub struct QueryTallyResultRequest { pub proposal_id: u64, } /// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultResponse { /// tally defines the requested tally. @@ -347,6 +395,7 @@ pub struct QueryTallyResultResponse { } /// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary /// proposal Content. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { #[prost(message, repeated, tag = "1")] @@ -360,6 +409,7 @@ pub struct MsgSubmitProposal { pub metadata: ::prost::alloc::string::String, } /// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposalResponse { #[prost(uint64, tag = "1")] @@ -367,6 +417,7 @@ pub struct MsgSubmitProposalResponse { } /// MsgExecLegacyContent is used to wrap the legacy content field into a message. /// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecLegacyContent { /// content is the proposal's content. @@ -377,9 +428,11 @@ pub struct MsgExecLegacyContent { pub authority: ::prost::alloc::string::String, } /// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecLegacyContentResponse {} /// MsgVote defines a message to cast a vote. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVote { #[prost(uint64, tag = "1")] @@ -392,9 +445,11 @@ pub struct MsgVote { pub metadata: ::prost::alloc::string::String, } /// MsgVoteResponse defines the Msg/Vote response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteResponse {} /// MsgVoteWeighted defines a message to cast a vote. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteWeighted { #[prost(uint64, tag = "1")] @@ -407,9 +462,11 @@ pub struct MsgVoteWeighted { pub metadata: ::prost::alloc::string::String, } /// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteWeightedResponse {} /// MsgDeposit defines a message to submit a deposit to an existing proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDeposit { #[prost(uint64, tag = "1")] @@ -420,6 +477,7 @@ pub struct MsgDeposit { pub amount: ::prost::alloc::vec::Vec, } /// MsgDepositResponse defines the Msg/Deposit response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDepositResponse {} include!("cosmos.gov.v1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs index 781f45f2..1e35bd52 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs @@ -18,6 +18,7 @@ impl serde::Serialize for Deposit { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Deposit", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -87,21 +88,21 @@ impl<'de> serde::Deserialize<'de> for Deposit { formatter.write_str("struct cosmos.gov.v1.Deposit") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut depositor__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -109,13 +110,13 @@ impl<'de> serde::Deserialize<'de> for Deposit { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -213,25 +214,25 @@ impl<'de> serde::Deserialize<'de> for DepositParams { formatter.write_str("struct cosmos.gov.v1.DepositParams") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut min_deposit__ = None; let mut max_deposit_period__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MinDeposit => { if min_deposit__.is_some() { return Err(serde::de::Error::duplicate_field("minDeposit")); } - min_deposit__ = Some(map.next_value()?); + min_deposit__ = Some(map_.next_value()?); } GeneratedField::MaxDepositPeriod => { if max_deposit_period__.is_some() { return Err(serde::de::Error::duplicate_field("maxDepositPeriod")); } - max_deposit_period__ = map.next_value()?; + max_deposit_period__ = map_.next_value()?; } } } @@ -275,6 +276,7 @@ impl serde::Serialize for GenesisState { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.GenesisState", len)?; if self.starting_proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "startingProposalId", ToString::to_string(&self.starting_proposal_id).as_str(), @@ -378,7 +380,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.gov.v1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -389,7 +391,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { let mut deposit_params__ = None; let mut voting_params__ = None; let mut tally_params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::StartingProposalId => { if starting_proposal_id__.is_some() { @@ -398,7 +400,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { )); } starting_proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -406,37 +408,37 @@ impl<'de> serde::Deserialize<'de> for GenesisState { if deposits__.is_some() { return Err(serde::de::Error::duplicate_field("deposits")); } - deposits__ = Some(map.next_value()?); + deposits__ = Some(map_.next_value()?); } GeneratedField::Votes => { if votes__.is_some() { return Err(serde::de::Error::duplicate_field("votes")); } - votes__ = Some(map.next_value()?); + votes__ = Some(map_.next_value()?); } GeneratedField::Proposals => { if proposals__.is_some() { return Err(serde::de::Error::duplicate_field("proposals")); } - proposals__ = Some(map.next_value()?); + proposals__ = Some(map_.next_value()?); } GeneratedField::DepositParams => { if deposit_params__.is_some() { return Err(serde::de::Error::duplicate_field("depositParams")); } - deposit_params__ = map.next_value()?; + deposit_params__ = map_.next_value()?; } GeneratedField::VotingParams => { if voting_params__.is_some() { return Err(serde::de::Error::duplicate_field("votingParams")); } - voting_params__ = map.next_value()?; + voting_params__ = map_.next_value()?; } GeneratedField::TallyParams => { if tally_params__.is_some() { return Err(serde::de::Error::duplicate_field("tallyParams")); } - tally_params__ = map.next_value()?; + tally_params__ = map_.next_value()?; } } } @@ -473,6 +475,7 @@ impl serde::Serialize for MsgDeposit { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgDeposit", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -542,21 +545,21 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { formatter.write_str("struct cosmos.gov.v1.MsgDeposit") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut depositor__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -564,13 +567,13 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -642,12 +645,12 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { formatter.write_str("struct cosmos.gov.v1.MsgDepositResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgDepositResponse {}) } @@ -737,25 +740,28 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { formatter.write_str("struct cosmos.gov.v1.MsgExecLegacyContent") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut content__ = None; let mut authority__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Content => { if content__.is_some() { return Err(serde::de::Error::duplicate_field("content")); } - content__ = map.next_value()?; + content__ = map_.next_value()?; } GeneratedField::Authority => { if authority__.is_some() { return Err(serde::de::Error::duplicate_field("authority")); } - authority__ = Some(map.next_value()?); + authority__ = Some(map_.next_value()?); } } } @@ -833,13 +839,13 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgExecLegacyContentResponse {}) } @@ -952,7 +958,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { formatter.write_str("struct cosmos.gov.v1.MsgSubmitProposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -960,31 +966,31 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { let mut initial_deposit__ = None; let mut proposer__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Messages => { if messages__.is_some() { return Err(serde::de::Error::duplicate_field("messages")); } - messages__ = Some(map.next_value()?); + messages__ = Some(map_.next_value()?); } GeneratedField::InitialDeposit => { if initial_deposit__.is_some() { return Err(serde::de::Error::duplicate_field("initialDeposit")); } - initial_deposit__ = Some(map.next_value()?); + initial_deposit__ = Some(map_.next_value()?); } GeneratedField::Proposer => { if proposer__.is_some() { return Err(serde::de::Error::duplicate_field("proposer")); } - proposer__ = Some(map.next_value()?); + proposer__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -1013,6 +1019,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgSubmitProposalResponse", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1074,20 +1081,20 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1127,6 +1134,7 @@ impl serde::Serialize for MsgVote { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVote", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1136,7 +1144,7 @@ impl serde::Serialize for MsgVote { struct_ser.serialize_field("voter", &self.voter)?; } if self.option != 0 { - let v = VoteOption::from_i32(self.option).ok_or_else(|| { + let v = VoteOption::try_from(self.option).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.option)) })?; struct_ser.serialize_field("option", &v)?; @@ -1204,7 +1212,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { formatter.write_str("struct cosmos.gov.v1.MsgVote") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1212,14 +1220,14 @@ impl<'de> serde::Deserialize<'de> for MsgVote { let mut voter__ = None; let mut option__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1227,19 +1235,19 @@ impl<'de> serde::Deserialize<'de> for MsgVote { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Option => { if option__.is_some() { return Err(serde::de::Error::duplicate_field("option")); } - option__ = Some(map.next_value::()? as i32); + option__ = Some(map_.next_value::()? as i32); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -1312,12 +1320,12 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { formatter.write_str("struct cosmos.gov.v1.MsgVoteResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgVoteResponse {}) } @@ -1347,6 +1355,7 @@ impl serde::Serialize for MsgVoteWeighted { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgVoteWeighted", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1421,7 +1430,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { formatter.write_str("struct cosmos.gov.v1.MsgVoteWeighted") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1429,14 +1438,14 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { let mut voter__ = None; let mut options__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1444,19 +1453,19 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Options => { if options__.is_some() { return Err(serde::de::Error::duplicate_field("options")); } - options__ = Some(map.next_value()?); + options__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -1532,13 +1541,13 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgVoteWeightedResponse {}) } @@ -1590,13 +1599,14 @@ impl serde::Serialize for Proposal { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Proposal", len)?; if self.id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; } if !self.messages.is_empty() { struct_ser.serialize_field("messages", &self.messages)?; } if self.status != 0 { - let v = ProposalStatus::from_i32(self.status).ok_or_else(|| { + let v = ProposalStatus::try_from(self.status).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.status)) })?; struct_ser.serialize_field("status", &v)?; @@ -1719,7 +1729,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { formatter.write_str("struct cosmos.gov.v1.Proposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1733,14 +1743,14 @@ impl<'de> serde::Deserialize<'de> for Proposal { let mut voting_start_time__ = None; let mut voting_end_time__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1748,55 +1758,55 @@ impl<'de> serde::Deserialize<'de> for Proposal { if messages__.is_some() { return Err(serde::de::Error::duplicate_field("messages")); } - messages__ = Some(map.next_value()?); + messages__ = Some(map_.next_value()?); } GeneratedField::Status => { if status__.is_some() { return Err(serde::de::Error::duplicate_field("status")); } - status__ = Some(map.next_value::()? as i32); + status__ = Some(map_.next_value::()? as i32); } GeneratedField::FinalTallyResult => { if final_tally_result__.is_some() { return Err(serde::de::Error::duplicate_field("finalTallyResult")); } - final_tally_result__ = map.next_value()?; + final_tally_result__ = map_.next_value()?; } GeneratedField::SubmitTime => { if submit_time__.is_some() { return Err(serde::de::Error::duplicate_field("submitTime")); } - submit_time__ = map.next_value()?; + submit_time__ = map_.next_value()?; } GeneratedField::DepositEndTime => { if deposit_end_time__.is_some() { return Err(serde::de::Error::duplicate_field("depositEndTime")); } - deposit_end_time__ = map.next_value()?; + deposit_end_time__ = map_.next_value()?; } GeneratedField::TotalDeposit => { if total_deposit__.is_some() { return Err(serde::de::Error::duplicate_field("totalDeposit")); } - total_deposit__ = Some(map.next_value()?); + total_deposit__ = Some(map_.next_value()?); } GeneratedField::VotingStartTime => { if voting_start_time__.is_some() { return Err(serde::de::Error::duplicate_field("votingStartTime")); } - voting_start_time__ = map.next_value()?; + voting_start_time__ = map_.next_value()?; } GeneratedField::VotingEndTime => { if voting_end_time__.is_some() { return Err(serde::de::Error::duplicate_field("votingEndTime")); } - voting_end_time__ = map.next_value()?; + voting_end_time__ = map_.next_value()?; } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -1862,10 +1872,9 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ProposalStatus::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -1875,10 +1884,9 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ProposalStatus::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -1919,6 +1927,7 @@ impl serde::Serialize for QueryDepositRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryDepositRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1983,20 +1992,20 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { formatter.write_str("struct cosmos.gov.v1.QueryDepositRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut depositor__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2004,7 +2013,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } } } @@ -2091,18 +2100,21 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { formatter.write_str("struct cosmos.gov.v1.QueryDepositResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut deposit__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Deposit => { if deposit__.is_some() { return Err(serde::de::Error::duplicate_field("deposit")); } - deposit__ = map.next_value()?; + deposit__ = map_.next_value()?; } } } @@ -2133,6 +2145,7 @@ impl serde::Serialize for QueryDepositsRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryDepositsRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -2197,20 +2210,23 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { formatter.write_str("struct cosmos.gov.v1.QueryDepositsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2218,7 +2234,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2315,26 +2331,26 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut deposits__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Deposits => { if deposits__.is_some() { return Err(serde::de::Error::duplicate_field("deposits")); } - deposits__ = Some(map.next_value()?); + deposits__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2421,18 +2437,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.gov.v1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params_type__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ParamsType => { if params_type__.is_some() { return Err(serde::de::Error::duplicate_field("paramsType")); } - params_type__ = Some(map.next_value()?); + params_type__ = Some(map_.next_value()?); } } } @@ -2541,32 +2557,32 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.gov.v1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut voting_params__ = None; let mut deposit_params__ = None; let mut tally_params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::VotingParams => { if voting_params__.is_some() { return Err(serde::de::Error::duplicate_field("votingParams")); } - voting_params__ = map.next_value()?; + voting_params__ = map_.next_value()?; } GeneratedField::DepositParams => { if deposit_params__.is_some() { return Err(serde::de::Error::duplicate_field("depositParams")); } - deposit_params__ = map.next_value()?; + deposit_params__ = map_.next_value()?; } GeneratedField::TallyParams => { if tally_params__.is_some() { return Err(serde::de::Error::duplicate_field("tallyParams")); } - tally_params__ = map.next_value()?; + tally_params__ = map_.next_value()?; } } } @@ -2598,6 +2614,7 @@ impl serde::Serialize for QueryProposalRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryProposalRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -2657,19 +2674,22 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { formatter.write_str("struct cosmos.gov.v1.QueryProposalRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2759,19 +2779,19 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Proposal => { if proposal__.is_some() { return Err(serde::de::Error::duplicate_field("proposal")); } - proposal__ = map.next_value()?; + proposal__ = map_.next_value()?; } } } @@ -2810,7 +2830,7 @@ impl serde::Serialize for QueryProposalsRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryProposalsRequest", len)?; if self.proposal_status != 0 { - let v = ProposalStatus::from_i32(self.proposal_status).ok_or_else(|| { + let v = ProposalStatus::try_from(self.proposal_status).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.proposal_status)) })?; struct_ser.serialize_field("proposalStatus", &v)?; @@ -2894,7 +2914,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -2903,31 +2923,31 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { let mut voter__ = None; let mut depositor__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalStatus => { if proposal_status__.is_some() { return Err(serde::de::Error::duplicate_field("proposalStatus")); } - proposal_status__ = Some(map.next_value::()? as i32); + proposal_status__ = Some(map_.next_value::()? as i32); } GeneratedField::Voter => { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Depositor => { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3026,26 +3046,26 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposals__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Proposals => { if proposals__.is_some() { return Err(serde::de::Error::duplicate_field("proposals")); } - proposals__ = Some(map.next_value()?); + proposals__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3076,6 +3096,7 @@ impl serde::Serialize for QueryTallyResultRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryTallyResultRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -3137,20 +3158,20 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3240,19 +3261,19 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut tally__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Tally => { if tally__.is_some() { return Err(serde::de::Error::duplicate_field("tally")); } - tally__ = map.next_value()?; + tally__ = map_.next_value()?; } } } @@ -3282,6 +3303,7 @@ impl serde::Serialize for QueryVoteRequest { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVoteRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -3346,20 +3368,20 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { formatter.write_str("struct cosmos.gov.v1.QueryVoteRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut voter__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3367,7 +3389,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } } } @@ -3449,18 +3471,18 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { formatter.write_str("struct cosmos.gov.v1.QueryVoteResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut vote__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Vote => { if vote__.is_some() { return Err(serde::de::Error::duplicate_field("vote")); } - vote__ = map.next_value()?; + vote__ = map_.next_value()?; } } } @@ -3486,6 +3508,7 @@ impl serde::Serialize for QueryVotesRequest { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryVotesRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -3550,20 +3573,20 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { formatter.write_str("struct cosmos.gov.v1.QueryVotesRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3571,7 +3594,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3662,25 +3685,25 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { formatter.write_str("struct cosmos.gov.v1.QueryVotesResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut votes__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Votes => { if votes__.is_some() { return Err(serde::de::Error::duplicate_field("votes")); } - votes__ = Some(map.next_value()?); + votes__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3782,32 +3805,32 @@ impl<'de> serde::Deserialize<'de> for TallyParams { formatter.write_str("struct cosmos.gov.v1.TallyParams") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut quorum__ = None; let mut threshold__ = None; let mut veto_threshold__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Quorum => { if quorum__.is_some() { return Err(serde::de::Error::duplicate_field("quorum")); } - quorum__ = Some(map.next_value()?); + quorum__ = Some(map_.next_value()?); } GeneratedField::Threshold => { if threshold__.is_some() { return Err(serde::de::Error::duplicate_field("threshold")); } - threshold__ = Some(map.next_value()?); + threshold__ = Some(map_.next_value()?); } GeneratedField::VetoThreshold => { if veto_threshold__.is_some() { return Err(serde::de::Error::duplicate_field("vetoThreshold")); } - veto_threshold__ = Some(map.next_value()?); + veto_threshold__ = Some(map_.next_value()?); } } } @@ -3925,7 +3948,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { formatter.write_str("struct cosmos.gov.v1.TallyResult") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -3933,31 +3956,31 @@ impl<'de> serde::Deserialize<'de> for TallyResult { let mut abstain_count__ = None; let mut no_count__ = None; let mut no_with_veto_count__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::YesCount => { if yes_count__.is_some() { return Err(serde::de::Error::duplicate_field("yesCount")); } - yes_count__ = Some(map.next_value()?); + yes_count__ = Some(map_.next_value()?); } GeneratedField::AbstainCount => { if abstain_count__.is_some() { return Err(serde::de::Error::duplicate_field("abstainCount")); } - abstain_count__ = Some(map.next_value()?); + abstain_count__ = Some(map_.next_value()?); } GeneratedField::NoCount => { if no_count__.is_some() { return Err(serde::de::Error::duplicate_field("noCount")); } - no_count__ = Some(map.next_value()?); + no_count__ = Some(map_.next_value()?); } GeneratedField::NoWithVetoCount => { if no_with_veto_count__.is_some() { return Err(serde::de::Error::duplicate_field("noWithVetoCount")); } - no_with_veto_count__ = Some(map.next_value()?); + no_with_veto_count__ = Some(map_.next_value()?); } } } @@ -3994,6 +4017,7 @@ impl serde::Serialize for Vote { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Vote", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -4068,7 +4092,7 @@ impl<'de> serde::Deserialize<'de> for Vote { formatter.write_str("struct cosmos.gov.v1.Vote") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -4076,14 +4100,14 @@ impl<'de> serde::Deserialize<'de> for Vote { let mut voter__ = None; let mut options__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4091,19 +4115,19 @@ impl<'de> serde::Deserialize<'de> for Vote { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Options => { if options__.is_some() { return Err(serde::de::Error::duplicate_field("options")); } - options__ = Some(map.next_value()?); + options__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -4161,10 +4185,9 @@ impl<'de> serde::Deserialize<'de> for VoteOption { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(VoteOption::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -4174,10 +4197,9 @@ impl<'de> serde::Deserialize<'de> for VoteOption { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(VoteOption::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -4269,18 +4291,18 @@ impl<'de> serde::Deserialize<'de> for VotingParams { formatter.write_str("struct cosmos.gov.v1.VotingParams") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut voting_period__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::VotingPeriod => { if voting_period__.is_some() { return Err(serde::de::Error::duplicate_field("votingPeriod")); } - voting_period__ = map.next_value()?; + voting_period__ = map_.next_value()?; } } } @@ -4309,7 +4331,7 @@ impl serde::Serialize for WeightedVoteOption { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.WeightedVoteOption", len)?; if self.option != 0 { - let v = VoteOption::from_i32(self.option).ok_or_else(|| { + let v = VoteOption::try_from(self.option).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.option)) })?; struct_ser.serialize_field("option", &v)?; @@ -4373,25 +4395,25 @@ impl<'de> serde::Deserialize<'de> for WeightedVoteOption { formatter.write_str("struct cosmos.gov.v1.WeightedVoteOption") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut option__ = None; let mut weight__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Option => { if option__.is_some() { return Err(serde::de::Error::duplicate_field("option")); } - option__ = Some(map.next_value::()? as i32); + option__ = Some(map_.next_value::()? as i32); } GeneratedField::Weight => { if weight__.is_some() { return Err(serde::de::Error::duplicate_field("weight")); } - weight__ = Some(map.next_value()?); + weight__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs index ad0d0d48..1378fee5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs @@ -2,6 +2,7 @@ /// WeightedVoteOption defines a unit of vote for vote split. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WeightedVoteOption { #[prost(enumeration = "VoteOption", tag = "1")] @@ -11,6 +12,7 @@ pub struct WeightedVoteOption { } /// TextProposal defines a standard text proposal whose changes need to be /// manually updated in case of approval. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TextProposal { #[prost(string, tag = "1")] @@ -20,6 +22,7 @@ pub struct TextProposal { } /// Deposit defines an amount deposited by an account address to an active /// proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Deposit { #[prost(uint64, tag = "1")] @@ -30,6 +33,7 @@ pub struct Deposit { pub amount: ::prost::alloc::vec::Vec, } /// Proposal defines the core field members of a governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Proposal { #[prost(uint64, tag = "1")] @@ -55,6 +59,7 @@ pub struct Proposal { pub voting_end_time: ::core::option::Option<::prost_types::Timestamp>, } /// TallyResult defines a standard tally for a governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyResult { #[prost(string, tag = "1")] @@ -68,6 +73,7 @@ pub struct TallyResult { } /// Vote defines a vote on a governance proposal. /// A Vote consists of a proposal ID, the voter, and the vote option. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vote { #[prost(uint64, tag = "1")] @@ -85,6 +91,7 @@ pub struct Vote { pub options: ::prost::alloc::vec::Vec, } /// DepositParams defines the params for deposits on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DepositParams { /// Minimum deposit for a proposal to enter voting period. @@ -96,6 +103,7 @@ pub struct DepositParams { pub max_deposit_period: ::core::option::Option<::prost_types::Duration>, } /// VotingParams defines the params for voting on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VotingParams { /// Length of the voting period. @@ -103,6 +111,7 @@ pub struct VotingParams { pub voting_period: ::core::option::Option<::prost_types::Duration>, } /// TallyParams defines the params for tallying votes on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyParams { /// Minimum percentage of total stake needed to vote for a result to be @@ -146,6 +155,17 @@ impl VoteOption { VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), + "VOTE_OPTION_YES" => Some(Self::Yes), + "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), + "VOTE_OPTION_NO" => Some(Self::No), + "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), + _ => None, + } + } } /// ProposalStatus enumerates the valid statuses of a proposal. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -184,8 +204,21 @@ impl ProposalStatus { ProposalStatus::Failed => "PROPOSAL_STATUS_FAILED", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Some(Self::DepositPeriod), + "PROPOSAL_STATUS_VOTING_PERIOD" => Some(Self::VotingPeriod), + "PROPOSAL_STATUS_PASSED" => Some(Self::Passed), + "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), + "PROPOSAL_STATUS_FAILED" => Some(Self::Failed), + _ => None, + } + } } /// GenesisState defines the gov module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// starting_proposal_id is the ID of the starting proposal. @@ -211,6 +244,7 @@ pub struct GenesisState { pub tally_params: ::core::option::Option, } /// QueryProposalRequest is the request type for the Query/Proposal RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalRequest { /// proposal_id defines the unique id of the proposal. @@ -218,12 +252,14 @@ pub struct QueryProposalRequest { pub proposal_id: u64, } /// QueryProposalResponse is the response type for the Query/Proposal RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalResponse { #[prost(message, optional, tag = "1")] pub proposal: ::core::option::Option, } /// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsRequest { /// proposal_status defines the status of the proposals. @@ -241,6 +277,7 @@ pub struct QueryProposalsRequest { } /// QueryProposalsResponse is the response type for the Query/Proposals RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsResponse { #[prost(message, repeated, tag = "1")] @@ -250,6 +287,7 @@ pub struct QueryProposalsResponse { pub pagination: ::core::option::Option, } /// QueryVoteRequest is the request type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteRequest { /// proposal_id defines the unique id of the proposal. @@ -260,6 +298,7 @@ pub struct QueryVoteRequest { pub voter: ::prost::alloc::string::String, } /// QueryVoteResponse is the response type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteResponse { /// vote defined the queried vote. @@ -267,6 +306,7 @@ pub struct QueryVoteResponse { pub vote: ::core::option::Option, } /// QueryVotesRequest is the request type for the Query/Votes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesRequest { /// proposal_id defines the unique id of the proposal. @@ -277,6 +317,7 @@ pub struct QueryVotesRequest { pub pagination: ::core::option::Option, } /// QueryVotesResponse is the response type for the Query/Votes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesResponse { /// votes defined the queried votes. @@ -287,6 +328,7 @@ pub struct QueryVotesResponse { pub pagination: ::core::option::Option, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest { /// params_type defines which parameters to query for, can be one of "voting", @@ -295,6 +337,7 @@ pub struct QueryParamsRequest { pub params_type: ::prost::alloc::string::String, } /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// voting_params defines the parameters related to voting. @@ -308,6 +351,7 @@ pub struct QueryParamsResponse { pub tally_params: ::core::option::Option, } /// QueryDepositRequest is the request type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositRequest { /// proposal_id defines the unique id of the proposal. @@ -318,6 +362,7 @@ pub struct QueryDepositRequest { pub depositor: ::prost::alloc::string::String, } /// QueryDepositResponse is the response type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositResponse { /// deposit defines the requested deposit. @@ -325,6 +370,7 @@ pub struct QueryDepositResponse { pub deposit: ::core::option::Option, } /// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositsRequest { /// proposal_id defines the unique id of the proposal. @@ -335,6 +381,7 @@ pub struct QueryDepositsRequest { pub pagination: ::core::option::Option, } /// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositsResponse { #[prost(message, repeated, tag = "1")] @@ -344,6 +391,7 @@ pub struct QueryDepositsResponse { pub pagination: ::core::option::Option, } /// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultRequest { /// proposal_id defines the unique id of the proposal. @@ -351,6 +399,7 @@ pub struct QueryTallyResultRequest { pub proposal_id: u64, } /// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultResponse { /// tally defines the requested tally. @@ -359,6 +408,7 @@ pub struct QueryTallyResultResponse { } /// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary /// proposal Content. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { #[prost(message, optional, tag = "1")] @@ -369,12 +419,14 @@ pub struct MsgSubmitProposal { pub proposer: ::prost::alloc::string::String, } /// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposalResponse { #[prost(uint64, tag = "1")] pub proposal_id: u64, } /// MsgVote defines a message to cast a vote. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVote { #[prost(uint64, tag = "1")] @@ -385,11 +437,13 @@ pub struct MsgVote { pub option: i32, } /// MsgVoteResponse defines the Msg/Vote response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteResponse {} /// MsgVoteWeighted defines a message to cast a vote. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteWeighted { #[prost(uint64, tag = "1")] @@ -402,9 +456,11 @@ pub struct MsgVoteWeighted { /// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteWeightedResponse {} /// MsgDeposit defines a message to submit a deposit to an existing proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDeposit { #[prost(uint64, tag = "1")] @@ -415,6 +471,7 @@ pub struct MsgDeposit { pub amount: ::prost::alloc::vec::Vec, } /// MsgDepositResponse defines the Msg/Deposit response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDepositResponse {} include!("cosmos.gov.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs index 2122a35a..20407069 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs @@ -18,6 +18,7 @@ impl serde::Serialize for Deposit { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Deposit", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -87,21 +88,21 @@ impl<'de> serde::Deserialize<'de> for Deposit { formatter.write_str("struct cosmos.gov.v1beta1.Deposit") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut depositor__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -109,13 +110,13 @@ impl<'de> serde::Deserialize<'de> for Deposit { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -214,25 +215,25 @@ impl<'de> serde::Deserialize<'de> for DepositParams { formatter.write_str("struct cosmos.gov.v1beta1.DepositParams") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut min_deposit__ = None; let mut max_deposit_period__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MinDeposit => { if min_deposit__.is_some() { return Err(serde::de::Error::duplicate_field("minDeposit")); } - min_deposit__ = Some(map.next_value()?); + min_deposit__ = Some(map_.next_value()?); } GeneratedField::MaxDepositPeriod => { if max_deposit_period__.is_some() { return Err(serde::de::Error::duplicate_field("maxDepositPeriod")); } - max_deposit_period__ = map.next_value()?; + max_deposit_period__ = map_.next_value()?; } } } @@ -280,6 +281,7 @@ impl serde::Serialize for GenesisState { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.GenesisState", len)?; if self.starting_proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "startingProposalId", ToString::to_string(&self.starting_proposal_id).as_str(), @@ -383,7 +385,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.gov.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -394,7 +396,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { let mut deposit_params__ = None; let mut voting_params__ = None; let mut tally_params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::StartingProposalId => { if starting_proposal_id__.is_some() { @@ -403,7 +405,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { )); } starting_proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -411,37 +413,37 @@ impl<'de> serde::Deserialize<'de> for GenesisState { if deposits__.is_some() { return Err(serde::de::Error::duplicate_field("deposits")); } - deposits__ = Some(map.next_value()?); + deposits__ = Some(map_.next_value()?); } GeneratedField::Votes => { if votes__.is_some() { return Err(serde::de::Error::duplicate_field("votes")); } - votes__ = Some(map.next_value()?); + votes__ = Some(map_.next_value()?); } GeneratedField::Proposals => { if proposals__.is_some() { return Err(serde::de::Error::duplicate_field("proposals")); } - proposals__ = Some(map.next_value()?); + proposals__ = Some(map_.next_value()?); } GeneratedField::DepositParams => { if deposit_params__.is_some() { return Err(serde::de::Error::duplicate_field("depositParams")); } - deposit_params__ = map.next_value()?; + deposit_params__ = map_.next_value()?; } GeneratedField::VotingParams => { if voting_params__.is_some() { return Err(serde::de::Error::duplicate_field("votingParams")); } - voting_params__ = map.next_value()?; + voting_params__ = map_.next_value()?; } GeneratedField::TallyParams => { if tally_params__.is_some() { return Err(serde::de::Error::duplicate_field("tallyParams")); } - tally_params__ = map.next_value()?; + tally_params__ = map_.next_value()?; } } } @@ -478,6 +480,7 @@ impl serde::Serialize for MsgDeposit { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgDeposit", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -547,21 +550,21 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { formatter.write_str("struct cosmos.gov.v1beta1.MsgDeposit") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut depositor__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -569,13 +572,13 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -648,12 +651,12 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { formatter.write_str("struct cosmos.gov.v1beta1.MsgDepositResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgDepositResponse {}) } @@ -753,32 +756,32 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { formatter.write_str("struct cosmos.gov.v1beta1.MsgSubmitProposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut content__ = None; let mut initial_deposit__ = None; let mut proposer__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Content => { if content__.is_some() { return Err(serde::de::Error::duplicate_field("content")); } - content__ = map.next_value()?; + content__ = map_.next_value()?; } GeneratedField::InitialDeposit => { if initial_deposit__.is_some() { return Err(serde::de::Error::duplicate_field("initialDeposit")); } - initial_deposit__ = Some(map.next_value()?); + initial_deposit__ = Some(map_.next_value()?); } GeneratedField::Proposer => { if proposer__.is_some() { return Err(serde::de::Error::duplicate_field("proposer")); } - proposer__ = Some(map.next_value()?); + proposer__ = Some(map_.next_value()?); } } } @@ -810,6 +813,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgSubmitProposalResponse", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -871,20 +875,20 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -921,6 +925,7 @@ impl serde::Serialize for MsgVote { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgVote", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -930,7 +935,7 @@ impl serde::Serialize for MsgVote { struct_ser.serialize_field("voter", &self.voter)?; } if self.option != 0 { - let v = VoteOption::from_i32(self.option).ok_or_else(|| { + let v = VoteOption::try_from(self.option).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.option)) })?; struct_ser.serialize_field("option", &v)?; @@ -993,21 +998,21 @@ impl<'de> serde::Deserialize<'de> for MsgVote { formatter.write_str("struct cosmos.gov.v1beta1.MsgVote") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut voter__ = None; let mut option__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1015,13 +1020,13 @@ impl<'de> serde::Deserialize<'de> for MsgVote { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Option => { if option__.is_some() { return Err(serde::de::Error::duplicate_field("option")); } - option__ = Some(map.next_value::()? as i32); + option__ = Some(map_.next_value::()? as i32); } } } @@ -1093,12 +1098,12 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { formatter.write_str("struct cosmos.gov.v1beta1.MsgVoteResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgVoteResponse {}) } @@ -1130,6 +1135,7 @@ impl serde::Serialize for MsgVoteWeighted { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.MsgVoteWeighted", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1199,21 +1205,21 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { formatter.write_str("struct cosmos.gov.v1beta1.MsgVoteWeighted") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut voter__ = None; let mut options__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1221,13 +1227,13 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Options => { if options__.is_some() { return Err(serde::de::Error::duplicate_field("options")); } - options__ = Some(map.next_value()?); + options__ = Some(map_.next_value()?); } } } @@ -1306,13 +1312,13 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgVoteWeightedResponse {}) } @@ -1361,6 +1367,7 @@ impl serde::Serialize for Proposal { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Proposal", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1370,7 +1377,7 @@ impl serde::Serialize for Proposal { struct_ser.serialize_field("content", v)?; } if self.status != 0 { - let v = ProposalStatus::from_i32(self.status).ok_or_else(|| { + let v = ProposalStatus::try_from(self.status).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.status)) })?; struct_ser.serialize_field("status", &v)?; @@ -1488,7 +1495,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { formatter.write_str("struct cosmos.gov.v1beta1.Proposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1501,14 +1508,14 @@ impl<'de> serde::Deserialize<'de> for Proposal { let mut total_deposit__ = None; let mut voting_start_time__ = None; let mut voting_end_time__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1516,49 +1523,49 @@ impl<'de> serde::Deserialize<'de> for Proposal { if content__.is_some() { return Err(serde::de::Error::duplicate_field("content")); } - content__ = map.next_value()?; + content__ = map_.next_value()?; } GeneratedField::Status => { if status__.is_some() { return Err(serde::de::Error::duplicate_field("status")); } - status__ = Some(map.next_value::()? as i32); + status__ = Some(map_.next_value::()? as i32); } GeneratedField::FinalTallyResult => { if final_tally_result__.is_some() { return Err(serde::de::Error::duplicate_field("finalTallyResult")); } - final_tally_result__ = map.next_value()?; + final_tally_result__ = map_.next_value()?; } GeneratedField::SubmitTime => { if submit_time__.is_some() { return Err(serde::de::Error::duplicate_field("submitTime")); } - submit_time__ = map.next_value()?; + submit_time__ = map_.next_value()?; } GeneratedField::DepositEndTime => { if deposit_end_time__.is_some() { return Err(serde::de::Error::duplicate_field("depositEndTime")); } - deposit_end_time__ = map.next_value()?; + deposit_end_time__ = map_.next_value()?; } GeneratedField::TotalDeposit => { if total_deposit__.is_some() { return Err(serde::de::Error::duplicate_field("totalDeposit")); } - total_deposit__ = Some(map.next_value()?); + total_deposit__ = Some(map_.next_value()?); } GeneratedField::VotingStartTime => { if voting_start_time__.is_some() { return Err(serde::de::Error::duplicate_field("votingStartTime")); } - voting_start_time__ = map.next_value()?; + voting_start_time__ = map_.next_value()?; } GeneratedField::VotingEndTime => { if voting_end_time__.is_some() { return Err(serde::de::Error::duplicate_field("votingEndTime")); } - voting_end_time__ = map.next_value()?; + voting_end_time__ = map_.next_value()?; } } } @@ -1623,10 +1630,9 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ProposalStatus::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -1636,10 +1642,9 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ProposalStatus::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -1680,6 +1685,7 @@ impl serde::Serialize for QueryDepositRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1744,20 +1750,20 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut depositor__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1765,7 +1771,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } } } @@ -1852,18 +1858,21 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut deposit__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Deposit => { if deposit__.is_some() { return Err(serde::de::Error::duplicate_field("deposit")); } - deposit__ = map.next_value()?; + deposit__ = map_.next_value()?; } } } @@ -1894,6 +1903,7 @@ impl serde::Serialize for QueryDepositsRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryDepositsRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1958,20 +1968,23 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { formatter.write_str("struct cosmos.gov.v1beta1.QueryDepositsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1979,7 +1992,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2076,26 +2089,26 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut deposits__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Deposits => { if deposits__.is_some() { return Err(serde::de::Error::duplicate_field("deposits")); } - deposits__ = Some(map.next_value()?); + deposits__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2182,18 +2195,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.gov.v1beta1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params_type__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ParamsType => { if params_type__.is_some() { return Err(serde::de::Error::duplicate_field("paramsType")); } - params_type__ = Some(map.next_value()?); + params_type__ = Some(map_.next_value()?); } } } @@ -2302,32 +2315,32 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.gov.v1beta1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut voting_params__ = None; let mut deposit_params__ = None; let mut tally_params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::VotingParams => { if voting_params__.is_some() { return Err(serde::de::Error::duplicate_field("votingParams")); } - voting_params__ = map.next_value()?; + voting_params__ = map_.next_value()?; } GeneratedField::DepositParams => { if deposit_params__.is_some() { return Err(serde::de::Error::duplicate_field("depositParams")); } - deposit_params__ = map.next_value()?; + deposit_params__ = map_.next_value()?; } GeneratedField::TallyParams => { if tally_params__.is_some() { return Err(serde::de::Error::duplicate_field("tallyParams")); } - tally_params__ = map.next_value()?; + tally_params__ = map_.next_value()?; } } } @@ -2359,6 +2372,7 @@ impl serde::Serialize for QueryProposalRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -2418,19 +2432,22 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { formatter.write_str("struct cosmos.gov.v1beta1.QueryProposalRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2520,19 +2537,19 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Proposal => { if proposal__.is_some() { return Err(serde::de::Error::duplicate_field("proposal")); } - proposal__ = map.next_value()?; + proposal__ = map_.next_value()?; } } } @@ -2571,7 +2588,7 @@ impl serde::Serialize for QueryProposalsRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryProposalsRequest", len)?; if self.proposal_status != 0 { - let v = ProposalStatus::from_i32(self.proposal_status).ok_or_else(|| { + let v = ProposalStatus::try_from(self.proposal_status).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.proposal_status)) })?; struct_ser.serialize_field("proposalStatus", &v)?; @@ -2655,7 +2672,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -2664,31 +2681,31 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { let mut voter__ = None; let mut depositor__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalStatus => { if proposal_status__.is_some() { return Err(serde::de::Error::duplicate_field("proposalStatus")); } - proposal_status__ = Some(map.next_value::()? as i32); + proposal_status__ = Some(map_.next_value::()? as i32); } GeneratedField::Voter => { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Depositor => { if depositor__.is_some() { return Err(serde::de::Error::duplicate_field("depositor")); } - depositor__ = Some(map.next_value()?); + depositor__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2787,26 +2804,26 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposals__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Proposals => { if proposals__.is_some() { return Err(serde::de::Error::duplicate_field("proposals")); } - proposals__ = Some(map.next_value()?); + proposals__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2837,6 +2854,7 @@ impl serde::Serialize for QueryTallyResultRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryTallyResultRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -2898,20 +2916,20 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3001,19 +3019,19 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut tally__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Tally => { if tally__.is_some() { return Err(serde::de::Error::duplicate_field("tally")); } - tally__ = map.next_value()?; + tally__ = map_.next_value()?; } } } @@ -3044,6 +3062,7 @@ impl serde::Serialize for QueryVoteRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryVoteRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -3108,20 +3127,20 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { formatter.write_str("struct cosmos.gov.v1beta1.QueryVoteRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut voter__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3129,7 +3148,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } } } @@ -3216,18 +3235,18 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { formatter.write_str("struct cosmos.gov.v1beta1.QueryVoteResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut vote__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Vote => { if vote__.is_some() { return Err(serde::de::Error::duplicate_field("vote")); } - vote__ = map.next_value()?; + vote__ = map_.next_value()?; } } } @@ -3258,6 +3277,7 @@ impl serde::Serialize for QueryVotesRequest { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.QueryVotesRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -3322,20 +3342,20 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { formatter.write_str("struct cosmos.gov.v1beta1.QueryVotesRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3343,7 +3363,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3438,25 +3458,25 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { formatter.write_str("struct cosmos.gov.v1beta1.QueryVotesResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut votes__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Votes => { if votes__.is_some() { return Err(serde::de::Error::duplicate_field("votes")); } - votes__ = Some(map.next_value()?); + votes__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3492,18 +3512,21 @@ impl serde::Serialize for TallyParams { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.TallyParams", len)?; if !self.quorum.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "quorum", pbjson::private::base64::encode(&self.quorum).as_str(), )?; } if !self.threshold.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "threshold", pbjson::private::base64::encode(&self.threshold).as_str(), )?; } if !self.veto_threshold.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "vetoThreshold", pbjson::private::base64::encode(&self.veto_threshold).as_str(), @@ -3567,21 +3590,21 @@ impl<'de> serde::Deserialize<'de> for TallyParams { formatter.write_str("struct cosmos.gov.v1beta1.TallyParams") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut quorum__ = None; let mut threshold__ = None; let mut veto_threshold__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Quorum => { if quorum__.is_some() { return Err(serde::de::Error::duplicate_field("quorum")); } quorum__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -3590,7 +3613,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { return Err(serde::de::Error::duplicate_field("threshold")); } threshold__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -3599,7 +3622,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { return Err(serde::de::Error::duplicate_field("vetoThreshold")); } veto_threshold__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -3708,7 +3731,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { formatter.write_str("struct cosmos.gov.v1beta1.TallyResult") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -3716,31 +3739,31 @@ impl<'de> serde::Deserialize<'de> for TallyResult { let mut abstain__ = None; let mut no__ = None; let mut no_with_veto__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Yes => { if yes__.is_some() { return Err(serde::de::Error::duplicate_field("yes")); } - yes__ = Some(map.next_value()?); + yes__ = Some(map_.next_value()?); } GeneratedField::Abstain => { if abstain__.is_some() { return Err(serde::de::Error::duplicate_field("abstain")); } - abstain__ = Some(map.next_value()?); + abstain__ = Some(map_.next_value()?); } GeneratedField::No => { if no__.is_some() { return Err(serde::de::Error::duplicate_field("no")); } - no__ = Some(map.next_value()?); + no__ = Some(map_.next_value()?); } GeneratedField::NoWithVeto => { if no_with_veto__.is_some() { return Err(serde::de::Error::duplicate_field("noWithVeto")); } - no_with_veto__ = Some(map.next_value()?); + no_with_veto__ = Some(map_.next_value()?); } } } @@ -3832,25 +3855,25 @@ impl<'de> serde::Deserialize<'de> for TextProposal { formatter.write_str("struct cosmos.gov.v1beta1.TextProposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut title__ = None; let mut description__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Title => { if title__.is_some() { return Err(serde::de::Error::duplicate_field("title")); } - title__ = Some(map.next_value()?); + title__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } } } @@ -3885,6 +3908,7 @@ impl serde::Serialize for Vote { } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.Vote", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -3894,7 +3918,7 @@ impl serde::Serialize for Vote { struct_ser.serialize_field("voter", &self.voter)?; } if self.option != 0 { - let v = VoteOption::from_i32(self.option).ok_or_else(|| { + let v = VoteOption::try_from(self.option).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.option)) })?; struct_ser.serialize_field("option", &v)?; @@ -3962,7 +3986,7 @@ impl<'de> serde::Deserialize<'de> for Vote { formatter.write_str("struct cosmos.gov.v1beta1.Vote") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -3970,14 +3994,14 @@ impl<'de> serde::Deserialize<'de> for Vote { let mut voter__ = None; let mut option__ = None; let mut options__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3985,19 +4009,19 @@ impl<'de> serde::Deserialize<'de> for Vote { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Option => { if option__.is_some() { return Err(serde::de::Error::duplicate_field("option")); } - option__ = Some(map.next_value::()? as i32); + option__ = Some(map_.next_value::()? as i32); } GeneratedField::Options => { if options__.is_some() { return Err(serde::de::Error::duplicate_field("options")); } - options__ = Some(map.next_value()?); + options__ = Some(map_.next_value()?); } } } @@ -4055,10 +4079,9 @@ impl<'de> serde::Deserialize<'de> for VoteOption { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(VoteOption::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -4068,10 +4091,9 @@ impl<'de> serde::Deserialize<'de> for VoteOption { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(VoteOption::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -4163,18 +4185,18 @@ impl<'de> serde::Deserialize<'de> for VotingParams { formatter.write_str("struct cosmos.gov.v1beta1.VotingParams") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut voting_period__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::VotingPeriod => { if voting_period__.is_some() { return Err(serde::de::Error::duplicate_field("votingPeriod")); } - voting_period__ = map.next_value()?; + voting_period__ = map_.next_value()?; } } } @@ -4203,7 +4225,7 @@ impl serde::Serialize for WeightedVoteOption { let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1beta1.WeightedVoteOption", len)?; if self.option != 0 { - let v = VoteOption::from_i32(self.option).ok_or_else(|| { + let v = VoteOption::try_from(self.option).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.option)) })?; struct_ser.serialize_field("option", &v)?; @@ -4267,25 +4289,25 @@ impl<'de> serde::Deserialize<'de> for WeightedVoteOption { formatter.write_str("struct cosmos.gov.v1beta1.WeightedVoteOption") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut option__ = None; let mut weight__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Option => { if option__.is_some() { return Err(serde::de::Error::duplicate_field("option")); } - option__ = Some(map.next_value::()? as i32); + option__ = Some(map_.next_value::()? as i32); } GeneratedField::Weight => { if weight__.is_some() { return Err(serde::de::Error::duplicate_field("weight")); } - weight__ = Some(map.next_value()?); + weight__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs index a5e0e9e4..033229f2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs @@ -1,6 +1,7 @@ // @generated /// Member represents a group member with an account address, /// non-zero weight, metadata and added_at timestamp. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { /// address is the member's account address. @@ -19,6 +20,7 @@ pub struct Member { /// MemberRequest represents a group member to be used in Msg server requests. /// Contrary to `Member`, it doesn't have any `added_at` field /// since this field cannot be set as part of requests. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MemberRequest { /// address is the member's account address. @@ -37,6 +39,7 @@ pub struct MemberRequest { /// `threshold`. /// 2. The voting and execution periods of the proposal respect the parameters /// given by `windows`. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ThresholdDecisionPolicy { /// threshold is the minimum weighted sum of `YES` votes that must be met or @@ -53,6 +56,7 @@ pub struct ThresholdDecisionPolicy { /// is greater or equal than the given `percentage`. /// 2. The voting and execution periods of the proposal respect the parameters /// given by `windows`. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PercentageDecisionPolicy { /// percentage is the minimum percentage the weighted sum of `YES` votes must @@ -64,6 +68,7 @@ pub struct PercentageDecisionPolicy { pub windows: ::core::option::Option, } /// DecisionPolicyWindows defines the different windows for voting and execution. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecisionPolicyWindows { /// voting_period is the duration from submission of a proposal to the end of voting period @@ -73,7 +78,7 @@ pub struct DecisionPolicyWindows { /// min_execution_period is the minimum duration after the proposal submission /// where members can start sending MsgExec. This means that the window for /// sending a MsgExec transaction is: - /// `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` + /// `\[ submission + min_execution_period ; submission + voting_period + max_execution_period\]` /// where max_execution_period is a app-specific config, defined in the keeper. /// If not set, min_execution_period will default to 0. /// @@ -89,6 +94,7 @@ pub struct DecisionPolicyWindows { // /// GroupInfo represents the high-level on-chain information for a group. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupInfo { /// id is the unique ID of the group. @@ -114,6 +120,7 @@ pub struct GroupInfo { pub created_at: ::core::option::Option<::prost_types::Timestamp>, } /// GroupMember represents the relationship between a group and a member. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupMember { /// group_id is the unique ID of the group. @@ -124,6 +131,7 @@ pub struct GroupMember { pub member: ::core::option::Option, } /// GroupPolicyInfo represents the high-level on-chain information for a group policy. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupPolicyInfo { /// address is the account address of group policy. @@ -153,6 +161,7 @@ pub struct GroupPolicyInfo { /// for a group policy to decide upon. /// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal /// passes as well as some optional metadata associated with the proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Proposal { /// id is the unique id of the proposal. @@ -204,6 +213,7 @@ pub struct Proposal { pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, } /// TallyResult represents the sum of weighted votes for each vote option. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyResult { /// yes_count is the weighted sum of yes votes. @@ -220,6 +230,7 @@ pub struct TallyResult { pub no_with_veto_count: ::prost::alloc::string::String, } /// Vote represents a vote for a proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vote { /// proposal is the unique ID of the proposal. @@ -268,6 +279,17 @@ impl VoteOption { VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), + "VOTE_OPTION_YES" => Some(Self::Yes), + "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), + "VOTE_OPTION_NO" => Some(Self::No), + "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), + _ => None, + } + } } /// ProposalStatus defines proposal statuses. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -305,6 +327,18 @@ impl ProposalStatus { ProposalStatus::Withdrawn => "PROPOSAL_STATUS_WITHDRAWN", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "PROPOSAL_STATUS_SUBMITTED" => Some(Self::Submitted), + "PROPOSAL_STATUS_ACCEPTED" => Some(Self::Accepted), + "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), + "PROPOSAL_STATUS_ABORTED" => Some(Self::Aborted), + "PROPOSAL_STATUS_WITHDRAWN" => Some(Self::Withdrawn), + _ => None, + } + } } /// ProposalExecutorResult defines types of proposal executor results. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -332,8 +366,19 @@ impl ProposalExecutorResult { ProposalExecutorResult::Failure => "PROPOSAL_EXECUTOR_RESULT_FAILURE", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED" => Some(Self::Unspecified), + "PROPOSAL_EXECUTOR_RESULT_NOT_RUN" => Some(Self::NotRun), + "PROPOSAL_EXECUTOR_RESULT_SUCCESS" => Some(Self::Success), + "PROPOSAL_EXECUTOR_RESULT_FAILURE" => Some(Self::Failure), + _ => None, + } + } } /// EventCreateGroup is an event emitted when a group is created. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventCreateGroup { /// group_id is the unique ID of the group. @@ -341,6 +386,7 @@ pub struct EventCreateGroup { pub group_id: u64, } /// EventUpdateGroup is an event emitted when a group is updated. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventUpdateGroup { /// group_id is the unique ID of the group. @@ -348,6 +394,7 @@ pub struct EventUpdateGroup { pub group_id: u64, } /// EventCreateGroupPolicy is an event emitted when a group policy is created. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventCreateGroupPolicy { /// address is the account address of the group policy. @@ -355,6 +402,7 @@ pub struct EventCreateGroupPolicy { pub address: ::prost::alloc::string::String, } /// EventUpdateGroupPolicy is an event emitted when a group policy is updated. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventUpdateGroupPolicy { /// address is the account address of the group policy. @@ -362,6 +410,7 @@ pub struct EventUpdateGroupPolicy { pub address: ::prost::alloc::string::String, } /// EventSubmitProposal is an event emitted when a proposal is created. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventSubmitProposal { /// proposal_id is the unique ID of the proposal. @@ -369,6 +418,7 @@ pub struct EventSubmitProposal { pub proposal_id: u64, } /// EventWithdrawProposal is an event emitted when a proposal is withdrawn. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventWithdrawProposal { /// proposal_id is the unique ID of the proposal. @@ -376,6 +426,7 @@ pub struct EventWithdrawProposal { pub proposal_id: u64, } /// EventVote is an event emitted when a voter votes on a proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventVote { /// proposal_id is the unique ID of the proposal. @@ -383,6 +434,7 @@ pub struct EventVote { pub proposal_id: u64, } /// EventExec is an event emitted when a proposal is executed. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventExec { /// proposal_id is the unique ID of the proposal. @@ -396,6 +448,7 @@ pub struct EventExec { pub logs: ::prost::alloc::string::String, } /// EventLeaveGroup is an event emitted when group member leaves the group. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventLeaveGroup { /// group_id is the unique ID of the group. @@ -406,6 +459,7 @@ pub struct EventLeaveGroup { pub address: ::prost::alloc::string::String, } /// EventProposalPruned is an event emitted when a proposal is pruned. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventProposalPruned { /// proposal_id is the unique ID of the proposal. @@ -419,6 +473,7 @@ pub struct EventProposalPruned { pub tally_result: ::core::option::Option, } /// GenesisState defines the group module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// group_seq is the group table orm.Sequence, @@ -450,6 +505,7 @@ pub struct GenesisState { pub votes: ::prost::alloc::vec::Vec, } /// QueryGroupInfoRequest is the Query/GroupInfo request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupInfoRequest { /// group_id is the unique ID of the group. @@ -457,6 +513,7 @@ pub struct QueryGroupInfoRequest { pub group_id: u64, } /// QueryGroupInfoResponse is the Query/GroupInfo response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupInfoResponse { /// info is the GroupInfo for the group. @@ -464,6 +521,7 @@ pub struct QueryGroupInfoResponse { pub info: ::core::option::Option, } /// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPolicyInfoRequest { /// address is the account address of the group policy. @@ -471,6 +529,7 @@ pub struct QueryGroupPolicyInfoRequest { pub address: ::prost::alloc::string::String, } /// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPolicyInfoResponse { /// info is the GroupPolicyInfo for the group policy. @@ -478,6 +537,7 @@ pub struct QueryGroupPolicyInfoResponse { pub info: ::core::option::Option, } /// QueryGroupMembersRequest is the Query/GroupMembers request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupMembersRequest { /// group_id is the unique ID of the group. @@ -488,6 +548,7 @@ pub struct QueryGroupMembersRequest { pub pagination: ::core::option::Option, } /// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupMembersResponse { /// members are the members of the group with given group_id. @@ -498,6 +559,7 @@ pub struct QueryGroupMembersResponse { pub pagination: ::core::option::Option, } /// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsByAdminRequest { /// admin is the account address of a group's admin. @@ -508,6 +570,7 @@ pub struct QueryGroupsByAdminRequest { pub pagination: ::core::option::Option, } /// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsByAdminResponse { /// groups are the groups info with the provided admin. @@ -518,6 +581,7 @@ pub struct QueryGroupsByAdminResponse { pub pagination: ::core::option::Option, } /// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPoliciesByGroupRequest { /// group_id is the unique ID of the group policy's group. @@ -528,6 +592,7 @@ pub struct QueryGroupPoliciesByGroupRequest { pub pagination: ::core::option::Option, } /// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPoliciesByGroupResponse { /// group_policies are the group policies info associated with the provided group. @@ -538,6 +603,7 @@ pub struct QueryGroupPoliciesByGroupResponse { pub pagination: ::core::option::Option, } /// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPoliciesByAdminRequest { /// admin is the admin address of the group policy. @@ -548,6 +614,7 @@ pub struct QueryGroupPoliciesByAdminRequest { pub pagination: ::core::option::Option, } /// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPoliciesByAdminResponse { /// group_policies are the group policies info with provided admin. @@ -558,6 +625,7 @@ pub struct QueryGroupPoliciesByAdminResponse { pub pagination: ::core::option::Option, } /// QueryProposalRequest is the Query/Proposal request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalRequest { /// proposal_id is the unique ID of a proposal. @@ -565,6 +633,7 @@ pub struct QueryProposalRequest { pub proposal_id: u64, } /// QueryProposalResponse is the Query/Proposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalResponse { /// proposal is the proposal info. @@ -572,6 +641,7 @@ pub struct QueryProposalResponse { pub proposal: ::core::option::Option, } /// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsByGroupPolicyRequest { /// address is the account address of the group policy related to proposals. @@ -582,6 +652,7 @@ pub struct QueryProposalsByGroupPolicyRequest { pub pagination: ::core::option::Option, } /// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsByGroupPolicyResponse { /// proposals are the proposals with given group policy. @@ -592,6 +663,7 @@ pub struct QueryProposalsByGroupPolicyResponse { pub pagination: ::core::option::Option, } /// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteByProposalVoterRequest { /// proposal_id is the unique ID of a proposal. @@ -602,6 +674,7 @@ pub struct QueryVoteByProposalVoterRequest { pub voter: ::prost::alloc::string::String, } /// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteByProposalVoterResponse { /// vote is the vote with given proposal_id and voter. @@ -609,6 +682,7 @@ pub struct QueryVoteByProposalVoterResponse { pub vote: ::core::option::Option, } /// QueryVotesByProposalRequest is the Query/VotesByProposal request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesByProposalRequest { /// proposal_id is the unique ID of a proposal. @@ -619,6 +693,7 @@ pub struct QueryVotesByProposalRequest { pub pagination: ::core::option::Option, } /// QueryVotesByProposalResponse is the Query/VotesByProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesByProposalResponse { /// votes are the list of votes for given proposal_id. @@ -629,6 +704,7 @@ pub struct QueryVotesByProposalResponse { pub pagination: ::core::option::Option, } /// QueryVotesByVoterRequest is the Query/VotesByVoter request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesByVoterRequest { /// voter is a proposal voter account address. @@ -639,6 +715,7 @@ pub struct QueryVotesByVoterRequest { pub pagination: ::core::option::Option, } /// QueryVotesByVoterResponse is the Query/VotesByVoter response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesByVoterResponse { /// votes are the list of votes by given voter. @@ -649,6 +726,7 @@ pub struct QueryVotesByVoterResponse { pub pagination: ::core::option::Option, } /// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsByMemberRequest { /// address is the group member address. @@ -659,6 +737,7 @@ pub struct QueryGroupsByMemberRequest { pub pagination: ::core::option::Option, } /// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsByMemberResponse { /// groups are the groups info with the provided group member. @@ -669,6 +748,7 @@ pub struct QueryGroupsByMemberResponse { pub pagination: ::core::option::Option, } /// QueryTallyResultRequest is the Query/TallyResult request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultRequest { /// proposal_id is the unique id of a proposal. @@ -676,6 +756,7 @@ pub struct QueryTallyResultRequest { pub proposal_id: u64, } /// QueryTallyResultResponse is the Query/TallyResult response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultResponse { /// tally defines the requested tally. @@ -685,6 +766,7 @@ pub struct QueryTallyResultResponse { /// QueryGroupsRequest is the Query/Groups request type. /// /// Since: cosmos-sdk 0.47.1 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsRequest { /// pagination defines an optional pagination for the request. @@ -694,6 +776,7 @@ pub struct QueryGroupsRequest { /// QueryGroupsResponse is the Query/Groups response type. /// /// Since: cosmos-sdk 0.47.1 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsResponse { /// `groups` is all the groups present in state. @@ -708,6 +791,7 @@ pub struct QueryGroupsResponse { // /// MsgCreateGroup is the Msg/CreateGroup request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroup { /// admin is the account address of the group admin. @@ -721,6 +805,7 @@ pub struct MsgCreateGroup { pub metadata: ::prost::alloc::string::String, } /// MsgCreateGroupResponse is the Msg/CreateGroup response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupResponse { /// group_id is the unique ID of the newly created group. @@ -728,6 +813,7 @@ pub struct MsgCreateGroupResponse { pub group_id: u64, } /// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupMembers { /// admin is the account address of the group admin. @@ -742,9 +828,11 @@ pub struct MsgUpdateGroupMembers { pub member_updates: ::prost::alloc::vec::Vec, } /// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupMembersResponse {} /// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupAdmin { /// admin is the current account address of the group admin. @@ -758,9 +846,11 @@ pub struct MsgUpdateGroupAdmin { pub new_admin: ::prost::alloc::string::String, } /// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupAdminResponse {} /// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupMetadata { /// admin is the account address of the group admin. @@ -774,6 +864,7 @@ pub struct MsgUpdateGroupMetadata { pub metadata: ::prost::alloc::string::String, } /// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupMetadataResponse {} // @@ -781,6 +872,7 @@ pub struct MsgUpdateGroupMetadataResponse {} // /// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupPolicy { /// admin is the account address of the group admin. @@ -797,6 +889,7 @@ pub struct MsgCreateGroupPolicy { pub decision_policy: ::core::option::Option<::prost_types::Any>, } /// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupPolicyResponse { /// address is the account address of the newly created group policy. @@ -804,6 +897,7 @@ pub struct MsgCreateGroupPolicyResponse { pub address: ::prost::alloc::string::String, } /// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyAdmin { /// admin is the account address of the group admin. @@ -817,6 +911,7 @@ pub struct MsgUpdateGroupPolicyAdmin { pub new_admin: ::prost::alloc::string::String, } /// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupWithPolicy { /// admin is the account address of the group and group policy admin. @@ -840,6 +935,7 @@ pub struct MsgCreateGroupWithPolicy { pub decision_policy: ::core::option::Option<::prost_types::Any>, } /// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupWithPolicyResponse { /// group_id is the unique ID of the newly created group with policy. @@ -850,9 +946,11 @@ pub struct MsgCreateGroupWithPolicyResponse { pub group_policy_address: ::prost::alloc::string::String, } /// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyAdminResponse {} /// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyDecisionPolicy { /// admin is the account address of the group admin. @@ -866,9 +964,11 @@ pub struct MsgUpdateGroupPolicyDecisionPolicy { pub decision_policy: ::core::option::Option<::prost_types::Any>, } /// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyDecisionPolicyResponse {} /// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyMetadata { /// admin is the account address of the group admin. @@ -882,9 +982,11 @@ pub struct MsgUpdateGroupPolicyMetadata { pub metadata: ::prost::alloc::string::String, } /// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyMetadataResponse {} /// MsgSubmitProposal is the Msg/SubmitProposal request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { /// group_policy_address is the account address of group policy. @@ -907,6 +1009,7 @@ pub struct MsgSubmitProposal { pub exec: i32, } /// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposalResponse { /// proposal is the unique ID of the proposal. @@ -914,6 +1017,7 @@ pub struct MsgSubmitProposalResponse { pub proposal_id: u64, } /// MsgWithdrawProposal is the Msg/WithdrawProposal request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawProposal { /// proposal is the unique ID of the proposal. @@ -924,9 +1028,11 @@ pub struct MsgWithdrawProposal { pub address: ::prost::alloc::string::String, } /// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawProposalResponse {} /// MsgVote is the Msg/Vote request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVote { /// proposal is the unique ID of the proposal. @@ -947,9 +1053,11 @@ pub struct MsgVote { pub exec: i32, } /// MsgVoteResponse is the Msg/Vote response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteResponse {} /// MsgExec is the Msg/Exec request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExec { /// proposal is the unique ID of the proposal. @@ -960,6 +1068,7 @@ pub struct MsgExec { pub executor: ::prost::alloc::string::String, } /// MsgExecResponse is the Msg/Exec request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecResponse { /// result is the final result of the proposal execution. @@ -967,6 +1076,7 @@ pub struct MsgExecResponse { pub result: i32, } /// MsgLeaveGroup is the Msg/LeaveGroup request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgLeaveGroup { /// address is the account address of the group member. @@ -977,6 +1087,7 @@ pub struct MsgLeaveGroup { pub group_id: u64, } /// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgLeaveGroupResponse {} // @@ -1007,6 +1118,14 @@ impl Exec { Exec::Try => "EXEC_TRY", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXEC_UNSPECIFIED" => Some(Self::Unspecified), + "EXEC_TRY" => Some(Self::Try), + _ => None, + } + } } include!("cosmos.group.v1.serde.rs"); include!("cosmos.group.v1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs index 2d66d91e..993df610 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs @@ -86,20 +86,20 @@ impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut voting_period__ = None; let mut min_execution_period__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::VotingPeriod => { if voting_period__.is_some() { return Err(serde::de::Error::duplicate_field("votingPeriod")); } - voting_period__ = map.next_value()?; + voting_period__ = map_.next_value()?; } GeneratedField::MinExecutionPeriod => { if min_execution_period__.is_some() { @@ -107,7 +107,7 @@ impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { "minExecutionPeriod", )); } - min_execution_period__ = map.next_value()?; + min_execution_period__ = map_.next_value()?; } } } @@ -138,6 +138,7 @@ impl serde::Serialize for EventCreateGroup { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventCreateGroup", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } struct_ser.end() @@ -194,19 +195,19 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroup { formatter.write_str("struct cosmos.group.v1.EventCreateGroup") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -296,19 +297,19 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroupPolicy { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -343,13 +344,14 @@ impl serde::Serialize for EventExec { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventExec", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), )?; } if self.result != 0 { - let v = ProposalExecutorResult::from_i32(self.result).ok_or_else(|| { + let v = ProposalExecutorResult::try_from(self.result).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.result)) })?; struct_ser.serialize_field("result", &v)?; @@ -415,21 +417,21 @@ impl<'de> serde::Deserialize<'de> for EventExec { formatter.write_str("struct cosmos.group.v1.EventExec") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut result__ = None; let mut logs__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -437,13 +439,13 @@ impl<'de> serde::Deserialize<'de> for EventExec { if result__.is_some() { return Err(serde::de::Error::duplicate_field("result")); } - result__ = Some(map.next_value::()? as i32); + result__ = Some(map_.next_value::()? as i32); } GeneratedField::Logs => { if logs__.is_some() { return Err(serde::de::Error::duplicate_field("logs")); } - logs__ = Some(map.next_value()?); + logs__ = Some(map_.next_value()?); } } } @@ -473,6 +475,7 @@ impl serde::Serialize for EventLeaveGroup { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventLeaveGroup", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if !self.address.is_empty() { @@ -534,20 +537,20 @@ impl<'de> serde::Deserialize<'de> for EventLeaveGroup { formatter.write_str("struct cosmos.group.v1.EventLeaveGroup") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -555,7 +558,7 @@ impl<'de> serde::Deserialize<'de> for EventLeaveGroup { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -588,13 +591,14 @@ impl serde::Serialize for EventProposalPruned { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventProposalPruned", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), )?; } if self.status != 0 { - let v = ProposalStatus::from_i32(self.status).ok_or_else(|| { + let v = ProposalStatus::try_from(self.status).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.status)) })?; struct_ser.serialize_field("status", &v)?; @@ -666,21 +670,21 @@ impl<'de> serde::Deserialize<'de> for EventProposalPruned { formatter.write_str("struct cosmos.group.v1.EventProposalPruned") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut status__ = None; let mut tally_result__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -688,13 +692,13 @@ impl<'de> serde::Deserialize<'de> for EventProposalPruned { if status__.is_some() { return Err(serde::de::Error::duplicate_field("status")); } - status__ = Some(map.next_value::()? as i32); + status__ = Some(map_.next_value::()? as i32); } GeneratedField::TallyResult => { if tally_result__.is_some() { return Err(serde::de::Error::duplicate_field("tallyResult")); } - tally_result__ = map.next_value()?; + tally_result__ = map_.next_value()?; } } } @@ -726,6 +730,7 @@ impl serde::Serialize for EventSubmitProposal { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventSubmitProposal", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -785,19 +790,19 @@ impl<'de> serde::Deserialize<'de> for EventSubmitProposal { formatter.write_str("struct cosmos.group.v1.EventSubmitProposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -829,6 +834,7 @@ impl serde::Serialize for EventUpdateGroup { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventUpdateGroup", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } struct_ser.end() @@ -885,19 +891,19 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroup { formatter.write_str("struct cosmos.group.v1.EventUpdateGroup") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -987,19 +993,19 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroupPolicy { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -1028,6 +1034,7 @@ impl serde::Serialize for EventVote { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventVote", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1087,19 +1094,19 @@ impl<'de> serde::Deserialize<'de> for EventVote { formatter.write_str("struct cosmos.group.v1.EventVote") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1127,6 +1134,7 @@ impl serde::Serialize for EventWithdrawProposal { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.EventWithdrawProposal", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -1188,20 +1196,20 @@ impl<'de> serde::Deserialize<'de> for EventWithdrawProposal { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1253,10 +1261,9 @@ impl<'de> serde::Deserialize<'de> for Exec { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(Exec::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -1266,10 +1273,9 @@ impl<'de> serde::Deserialize<'de> for Exec { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(Exec::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -1323,6 +1329,7 @@ impl serde::Serialize for GenesisState { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.GenesisState", len)?; if self.group_seq != 0 { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("groupSeq", ToString::to_string(&self.group_seq).as_str())?; } @@ -1333,6 +1340,7 @@ impl serde::Serialize for GenesisState { struct_ser.serialize_field("groupMembers", &self.group_members)?; } if self.group_policy_seq != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "groupPolicySeq", ToString::to_string(&self.group_policy_seq).as_str(), @@ -1342,6 +1350,7 @@ impl serde::Serialize for GenesisState { struct_ser.serialize_field("groupPolicies", &self.group_policies)?; } if self.proposal_seq != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalSeq", ToString::to_string(&self.proposal_seq).as_str(), @@ -1437,7 +1446,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.group.v1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1449,14 +1458,14 @@ impl<'de> serde::Deserialize<'de> for GenesisState { let mut proposal_seq__ = None; let mut proposals__ = None; let mut votes__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupSeq => { if group_seq__.is_some() { return Err(serde::de::Error::duplicate_field("groupSeq")); } group_seq__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1464,20 +1473,20 @@ impl<'de> serde::Deserialize<'de> for GenesisState { if groups__.is_some() { return Err(serde::de::Error::duplicate_field("groups")); } - groups__ = Some(map.next_value()?); + groups__ = Some(map_.next_value()?); } GeneratedField::GroupMembers => { if group_members__.is_some() { return Err(serde::de::Error::duplicate_field("groupMembers")); } - group_members__ = Some(map.next_value()?); + group_members__ = Some(map_.next_value()?); } GeneratedField::GroupPolicySeq => { if group_policy_seq__.is_some() { return Err(serde::de::Error::duplicate_field("groupPolicySeq")); } group_policy_seq__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1485,14 +1494,14 @@ impl<'de> serde::Deserialize<'de> for GenesisState { if group_policies__.is_some() { return Err(serde::de::Error::duplicate_field("groupPolicies")); } - group_policies__ = Some(map.next_value()?); + group_policies__ = Some(map_.next_value()?); } GeneratedField::ProposalSeq => { if proposal_seq__.is_some() { return Err(serde::de::Error::duplicate_field("proposalSeq")); } proposal_seq__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1500,13 +1509,13 @@ impl<'de> serde::Deserialize<'de> for GenesisState { if proposals__.is_some() { return Err(serde::de::Error::duplicate_field("proposals")); } - proposals__ = Some(map.next_value()?); + proposals__ = Some(map_.next_value()?); } GeneratedField::Votes => { if votes__.is_some() { return Err(serde::de::Error::duplicate_field("votes")); } - votes__ = Some(map.next_value()?); + votes__ = Some(map_.next_value()?); } } } @@ -1553,6 +1562,7 @@ impl serde::Serialize for GroupInfo { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.GroupInfo", len)?; if self.id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; } if !self.admin.is_empty() { @@ -1562,6 +1572,7 @@ impl serde::Serialize for GroupInfo { struct_ser.serialize_field("metadata", &self.metadata)?; } if self.version != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; } if !self.total_weight.is_empty() { @@ -1643,7 +1654,7 @@ impl<'de> serde::Deserialize<'de> for GroupInfo { formatter.write_str("struct cosmos.group.v1.GroupInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1653,14 +1664,14 @@ impl<'de> serde::Deserialize<'de> for GroupInfo { let mut version__ = None; let mut total_weight__ = None; let mut created_at__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1668,20 +1679,20 @@ impl<'de> serde::Deserialize<'de> for GroupInfo { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } GeneratedField::Version => { if version__.is_some() { return Err(serde::de::Error::duplicate_field("version")); } version__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1689,13 +1700,13 @@ impl<'de> serde::Deserialize<'de> for GroupInfo { if total_weight__.is_some() { return Err(serde::de::Error::duplicate_field("totalWeight")); } - total_weight__ = Some(map.next_value()?); + total_weight__ = Some(map_.next_value()?); } GeneratedField::CreatedAt => { if created_at__.is_some() { return Err(serde::de::Error::duplicate_field("createdAt")); } - created_at__ = map.next_value()?; + created_at__ = map_.next_value()?; } } } @@ -1728,6 +1739,7 @@ impl serde::Serialize for GroupMember { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.GroupMember", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if let Some(v) = self.member.as_ref() { @@ -1789,20 +1801,20 @@ impl<'de> serde::Deserialize<'de> for GroupMember { formatter.write_str("struct cosmos.group.v1.GroupMember") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; let mut member__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1810,7 +1822,7 @@ impl<'de> serde::Deserialize<'de> for GroupMember { if member__.is_some() { return Err(serde::de::Error::duplicate_field("member")); } - member__ = map.next_value()?; + member__ = map_.next_value()?; } } } @@ -1857,6 +1869,7 @@ impl serde::Serialize for GroupPolicyInfo { struct_ser.serialize_field("address", &self.address)?; } if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if !self.admin.is_empty() { @@ -1866,6 +1879,7 @@ impl serde::Serialize for GroupPolicyInfo { struct_ser.serialize_field("metadata", &self.metadata)?; } if self.version != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; } if let Some(v) = self.decision_policy.as_ref() { @@ -1953,7 +1967,7 @@ impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { formatter.write_str("struct cosmos.group.v1.GroupPolicyInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1964,20 +1978,20 @@ impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { let mut version__ = None; let mut decision_policy__ = None; let mut created_at__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1985,20 +1999,20 @@ impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } GeneratedField::Version => { if version__.is_some() { return Err(serde::de::Error::duplicate_field("version")); } version__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2006,13 +2020,13 @@ impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { if decision_policy__.is_some() { return Err(serde::de::Error::duplicate_field("decisionPolicy")); } - decision_policy__ = map.next_value()?; + decision_policy__ = map_.next_value()?; } GeneratedField::CreatedAt => { if created_at__.is_some() { return Err(serde::de::Error::duplicate_field("createdAt")); } - created_at__ = map.next_value()?; + created_at__ = map_.next_value()?; } } } @@ -2123,7 +2137,7 @@ impl<'de> serde::Deserialize<'de> for Member { formatter.write_str("struct cosmos.group.v1.Member") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2131,31 +2145,31 @@ impl<'de> serde::Deserialize<'de> for Member { let mut weight__ = None; let mut metadata__ = None; let mut added_at__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Weight => { if weight__.is_some() { return Err(serde::de::Error::duplicate_field("weight")); } - weight__ = Some(map.next_value()?); + weight__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } GeneratedField::AddedAt => { if added_at__.is_some() { return Err(serde::de::Error::duplicate_field("addedAt")); } - added_at__ = map.next_value()?; + added_at__ = map_.next_value()?; } } } @@ -2255,32 +2269,32 @@ impl<'de> serde::Deserialize<'de> for MemberRequest { formatter.write_str("struct cosmos.group.v1.MemberRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut weight__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Weight => { if weight__.is_some() { return Err(serde::de::Error::duplicate_field("weight")); } - weight__ = Some(map.next_value()?); + weight__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -2379,32 +2393,32 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroup { formatter.write_str("struct cosmos.group.v1.MsgCreateGroup") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut admin__ = None; let mut members__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::Members => { if members__.is_some() { return Err(serde::de::Error::duplicate_field("members")); } - members__ = Some(map.next_value()?); + members__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -2444,6 +2458,7 @@ impl serde::Serialize for MsgCreateGroupPolicy { struct_ser.serialize_field("admin", &self.admin)?; } if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if !self.metadata.is_empty() { @@ -2521,7 +2536,10 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { formatter.write_str("struct cosmos.group.v1.MsgCreateGroupPolicy") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2529,20 +2547,20 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { let mut group_id__ = None; let mut metadata__ = None; let mut decision_policy__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2550,13 +2568,13 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } GeneratedField::DecisionPolicy => { if decision_policy__.is_some() { return Err(serde::de::Error::duplicate_field("decisionPolicy")); } - decision_policy__ = map.next_value()?; + decision_policy__ = map_.next_value()?; } } } @@ -2647,19 +2665,19 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicyResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -2689,6 +2707,7 @@ impl serde::Serialize for MsgCreateGroupResponse { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgCreateGroupResponse", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } struct_ser.end() @@ -2747,20 +2766,20 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2907,7 +2926,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -2918,25 +2937,25 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { let mut group_policy_metadata__ = None; let mut group_policy_as_admin__ = None; let mut decision_policy__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::Members => { if members__.is_some() { return Err(serde::de::Error::duplicate_field("members")); } - members__ = Some(map.next_value()?); + members__ = Some(map_.next_value()?); } GeneratedField::GroupMetadata => { if group_metadata__.is_some() { return Err(serde::de::Error::duplicate_field("groupMetadata")); } - group_metadata__ = Some(map.next_value()?); + group_metadata__ = Some(map_.next_value()?); } GeneratedField::GroupPolicyMetadata => { if group_policy_metadata__.is_some() { @@ -2944,7 +2963,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { "groupPolicyMetadata", )); } - group_policy_metadata__ = Some(map.next_value()?); + group_policy_metadata__ = Some(map_.next_value()?); } GeneratedField::GroupPolicyAsAdmin => { if group_policy_as_admin__.is_some() { @@ -2952,13 +2971,13 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { "groupPolicyAsAdmin", )); } - group_policy_as_admin__ = Some(map.next_value()?); + group_policy_as_admin__ = Some(map_.next_value()?); } GeneratedField::DecisionPolicy => { if decision_policy__.is_some() { return Err(serde::de::Error::duplicate_field("decisionPolicy")); } - decision_policy__ = map.next_value()?; + decision_policy__ = map_.next_value()?; } } } @@ -2996,6 +3015,7 @@ impl serde::Serialize for MsgCreateGroupWithPolicyResponse { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgCreateGroupWithPolicyResponse", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if !self.group_policy_address.is_empty() { @@ -3066,21 +3086,21 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; let mut group_policy_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3090,7 +3110,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { "groupPolicyAddress", )); } - group_policy_address__ = Some(map.next_value()?); + group_policy_address__ = Some(map_.next_value()?); } } } @@ -3123,6 +3143,7 @@ impl serde::Serialize for MsgExec { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgExec", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -3187,20 +3208,20 @@ impl<'de> serde::Deserialize<'de> for MsgExec { formatter.write_str("struct cosmos.group.v1.MsgExec") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut executor__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3208,7 +3229,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { if executor__.is_some() { return Err(serde::de::Error::duplicate_field("executor")); } - executor__ = Some(map.next_value()?); + executor__ = Some(map_.next_value()?); } } } @@ -3234,7 +3255,7 @@ impl serde::Serialize for MsgExecResponse { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgExecResponse", len)?; if self.result != 0 { - let v = ProposalExecutorResult::from_i32(self.result).ok_or_else(|| { + let v = ProposalExecutorResult::try_from(self.result).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.result)) })?; struct_ser.serialize_field("result", &v)?; @@ -3293,18 +3314,18 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { formatter.write_str("struct cosmos.group.v1.MsgExecResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut result__ = None; - while let Some(k) = map.next_key()? { + 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); + result__ = Some(map_.next_value::()? as i32); } } } @@ -3335,6 +3356,7 @@ impl serde::Serialize for MsgLeaveGroup { struct_ser.serialize_field("address", &self.address)?; } if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } struct_ser.end() @@ -3393,26 +3415,26 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroup { formatter.write_str("struct cosmos.group.v1.MsgLeaveGroup") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut group_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3488,13 +3510,13 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroupResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgLeaveGroupResponse {}) } @@ -3544,9 +3566,8 @@ impl serde::Serialize for MsgSubmitProposal { struct_ser.serialize_field("messages", &self.messages)?; } if self.exec != 0 { - let v = Exec::from_i32(self.exec).ok_or_else(|| { - serde::ser::Error::custom(format!("Invalid variant {}", self.exec)) - })?; + let v = Exec::try_from(self.exec) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.exec)))?; struct_ser.serialize_field("exec", &v)?; } struct_ser.end() @@ -3620,7 +3641,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { formatter.write_str("struct cosmos.group.v1.MsgSubmitProposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -3629,7 +3650,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { let mut metadata__ = None; let mut messages__ = None; let mut exec__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupPolicyAddress => { if group_policy_address__.is_some() { @@ -3637,31 +3658,31 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { "groupPolicyAddress", )); } - group_policy_address__ = Some(map.next_value()?); + group_policy_address__ = Some(map_.next_value()?); } GeneratedField::Proposers => { if proposers__.is_some() { return Err(serde::de::Error::duplicate_field("proposers")); } - proposers__ = Some(map.next_value()?); + proposers__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } GeneratedField::Messages => { if messages__.is_some() { return Err(serde::de::Error::duplicate_field("messages")); } - messages__ = Some(map.next_value()?); + messages__ = Some(map_.next_value()?); } GeneratedField::Exec => { if exec__.is_some() { return Err(serde::de::Error::duplicate_field("exec")); } - exec__ = Some(map.next_value::()? as i32); + exec__ = Some(map_.next_value::()? as i32); } } } @@ -3695,6 +3716,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgSubmitProposalResponse", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -3756,20 +3778,20 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3810,6 +3832,7 @@ impl serde::Serialize for MsgUpdateGroupAdmin { struct_ser.serialize_field("admin", &self.admin)?; } if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if !self.new_admin.is_empty() { @@ -3873,27 +3896,27 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { formatter.write_str("struct cosmos.group.v1.MsgUpdateGroupAdmin") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut admin__ = None; let mut group_id__ = None; let mut new_admin__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3901,7 +3924,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { if new_admin__.is_some() { return Err(serde::de::Error::duplicate_field("newAdmin")); } - new_admin__ = Some(map.next_value()?); + new_admin__ = Some(map_.next_value()?); } } } @@ -3980,13 +4003,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdminResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgUpdateGroupAdminResponse {}) } @@ -4021,6 +4044,7 @@ impl serde::Serialize for MsgUpdateGroupMembers { struct_ser.serialize_field("admin", &self.admin)?; } if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if !self.member_updates.is_empty() { @@ -4092,7 +4116,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -4100,20 +4124,20 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { let mut admin__ = None; let mut group_id__ = None; let mut member_updates__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4121,7 +4145,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { if member_updates__.is_some() { return Err(serde::de::Error::duplicate_field("memberUpdates")); } - member_updates__ = Some(map.next_value()?); + member_updates__ = Some(map_.next_value()?); } } } @@ -4200,13 +4224,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembersResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgUpdateGroupMembersResponse {}) } @@ -4241,6 +4265,7 @@ impl serde::Serialize for MsgUpdateGroupMetadata { struct_ser.serialize_field("admin", &self.admin)?; } if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if !self.metadata.is_empty() { @@ -4306,7 +4331,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -4314,20 +4339,20 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { let mut admin__ = None; let mut group_id__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4335,7 +4360,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -4414,13 +4439,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadataResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgUpdateGroupMetadataResponse {}) } @@ -4528,7 +4553,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -4536,13 +4561,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { let mut admin__ = None; let mut group_policy_address__ = None; let mut new_admin__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::GroupPolicyAddress => { if group_policy_address__.is_some() { @@ -4550,13 +4575,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { "groupPolicyAddress", )); } - group_policy_address__ = Some(map.next_value()?); + group_policy_address__ = Some(map_.next_value()?); } GeneratedField::NewAdmin => { if new_admin__.is_some() { return Err(serde::de::Error::duplicate_field("newAdmin")); } - new_admin__ = Some(map.next_value()?); + new_admin__ = Some(map_.next_value()?); } } } @@ -4635,13 +4660,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdminResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgUpdateGroupPolicyAdminResponse {}) } @@ -4751,7 +4776,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -4759,13 +4784,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { let mut admin__ = None; let mut group_policy_address__ = None; let mut decision_policy__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::GroupPolicyAddress => { if group_policy_address__.is_some() { @@ -4773,13 +4798,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { "groupPolicyAddress", )); } - group_policy_address__ = Some(map.next_value()?); + group_policy_address__ = Some(map_.next_value()?); } GeneratedField::DecisionPolicy => { if decision_policy__.is_some() { return Err(serde::de::Error::duplicate_field("decisionPolicy")); } - decision_policy__ = map.next_value()?; + decision_policy__ = map_.next_value()?; } } } @@ -4861,13 +4886,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicyResponse fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgUpdateGroupPolicyDecisionPolicyResponse {}) } @@ -4974,7 +4999,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -4982,13 +5007,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { let mut admin__ = None; let mut group_policy_address__ = None; let mut metadata__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::GroupPolicyAddress => { if group_policy_address__.is_some() { @@ -4996,13 +5021,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { "groupPolicyAddress", )); } - group_policy_address__ = Some(map.next_value()?); + group_policy_address__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } } } @@ -5081,13 +5106,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadataResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgUpdateGroupPolicyMetadataResponse {}) } @@ -5124,6 +5149,7 @@ impl serde::Serialize for MsgVote { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgVote", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -5133,7 +5159,7 @@ impl serde::Serialize for MsgVote { struct_ser.serialize_field("voter", &self.voter)?; } if self.option != 0 { - let v = VoteOption::from_i32(self.option).ok_or_else(|| { + let v = VoteOption::try_from(self.option).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.option)) })?; struct_ser.serialize_field("option", &v)?; @@ -5142,9 +5168,8 @@ impl serde::Serialize for MsgVote { struct_ser.serialize_field("metadata", &self.metadata)?; } if self.exec != 0 { - let v = Exec::from_i32(self.exec).ok_or_else(|| { - serde::ser::Error::custom(format!("Invalid variant {}", self.exec)) - })?; + let v = Exec::try_from(self.exec) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.exec)))?; struct_ser.serialize_field("exec", &v)?; } struct_ser.end() @@ -5216,7 +5241,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { formatter.write_str("struct cosmos.group.v1.MsgVote") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -5225,14 +5250,14 @@ impl<'de> serde::Deserialize<'de> for MsgVote { let mut option__ = None; let mut metadata__ = None; let mut exec__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -5240,25 +5265,25 @@ impl<'de> serde::Deserialize<'de> for MsgVote { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Option => { if option__.is_some() { return Err(serde::de::Error::duplicate_field("option")); } - option__ = Some(map.next_value::()? as i32); + option__ = Some(map_.next_value::()? as i32); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } GeneratedField::Exec => { if exec__.is_some() { return Err(serde::de::Error::duplicate_field("exec")); } - exec__ = Some(map.next_value::()? as i32); + exec__ = Some(map_.next_value::()? as i32); } } } @@ -5332,12 +5357,12 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { formatter.write_str("struct cosmos.group.v1.MsgVoteResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgVoteResponse {}) } @@ -5362,6 +5387,7 @@ impl serde::Serialize for MsgWithdrawProposal { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.MsgWithdrawProposal", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -5426,20 +5452,20 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { formatter.write_str("struct cosmos.group.v1.MsgWithdrawProposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -5447,7 +5473,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -5525,13 +5551,13 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposalResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgWithdrawProposalResponse {}) } @@ -5623,26 +5649,26 @@ impl<'de> serde::Deserialize<'de> for PercentageDecisionPolicy { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut percentage__ = None; let mut windows__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Percentage => { if percentage__.is_some() { return Err(serde::de::Error::duplicate_field("percentage")); } - percentage__ = Some(map.next_value()?); + percentage__ = Some(map_.next_value()?); } GeneratedField::Windows => { if windows__.is_some() { return Err(serde::de::Error::duplicate_field("windows")); } - windows__ = map.next_value()?; + windows__ = map_.next_value()?; } } } @@ -5705,6 +5731,7 @@ impl serde::Serialize for Proposal { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.Proposal", len)?; if self.id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; } if !self.group_policy_address.is_empty() { @@ -5720,19 +5747,21 @@ impl serde::Serialize for Proposal { struct_ser.serialize_field("submitTime", v)?; } if self.group_version != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "groupVersion", ToString::to_string(&self.group_version).as_str(), )?; } if self.group_policy_version != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "groupPolicyVersion", ToString::to_string(&self.group_policy_version).as_str(), )?; } if self.status != 0 { - let v = ProposalStatus::from_i32(self.status).ok_or_else(|| { + let v = ProposalStatus::try_from(self.status).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.status)) })?; struct_ser.serialize_field("status", &v)?; @@ -5744,7 +5773,7 @@ impl serde::Serialize for Proposal { struct_ser.serialize_field("votingPeriodEnd", v)?; } if self.executor_result != 0 { - let v = ProposalExecutorResult::from_i32(self.executor_result).ok_or_else(|| { + let v = ProposalExecutorResult::try_from(self.executor_result).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.executor_result)) })?; struct_ser.serialize_field("executorResult", &v)?; @@ -5858,7 +5887,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { formatter.write_str("struct cosmos.group.v1.Proposal") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -5874,14 +5903,14 @@ impl<'de> serde::Deserialize<'de> for Proposal { let mut voting_period_end__ = None; let mut executor_result__ = None; let mut messages__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -5891,32 +5920,32 @@ impl<'de> serde::Deserialize<'de> for Proposal { "groupPolicyAddress", )); } - group_policy_address__ = Some(map.next_value()?); + group_policy_address__ = Some(map_.next_value()?); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } GeneratedField::Proposers => { if proposers__.is_some() { return Err(serde::de::Error::duplicate_field("proposers")); } - proposers__ = Some(map.next_value()?); + proposers__ = Some(map_.next_value()?); } GeneratedField::SubmitTime => { if submit_time__.is_some() { return Err(serde::de::Error::duplicate_field("submitTime")); } - submit_time__ = map.next_value()?; + submit_time__ = map_.next_value()?; } GeneratedField::GroupVersion => { if group_version__.is_some() { return Err(serde::de::Error::duplicate_field("groupVersion")); } group_version__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -5927,7 +5956,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { )); } group_policy_version__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -5935,32 +5964,32 @@ impl<'de> serde::Deserialize<'de> for Proposal { if status__.is_some() { return Err(serde::de::Error::duplicate_field("status")); } - status__ = Some(map.next_value::()? as i32); + status__ = Some(map_.next_value::()? as i32); } GeneratedField::FinalTallyResult => { if final_tally_result__.is_some() { return Err(serde::de::Error::duplicate_field("finalTallyResult")); } - final_tally_result__ = map.next_value()?; + final_tally_result__ = map_.next_value()?; } GeneratedField::VotingPeriodEnd => { if voting_period_end__.is_some() { return Err(serde::de::Error::duplicate_field("votingPeriodEnd")); } - voting_period_end__ = map.next_value()?; + voting_period_end__ = map_.next_value()?; } GeneratedField::ExecutorResult => { if executor_result__.is_some() { return Err(serde::de::Error::duplicate_field("executorResult")); } executor_result__ = - Some(map.next_value::()? as i32); + Some(map_.next_value::()? as i32); } GeneratedField::Messages => { if messages__.is_some() { return Err(serde::de::Error::duplicate_field("messages")); } - messages__ = Some(map.next_value()?); + messages__ = Some(map_.next_value()?); } } } @@ -6024,10 +6053,9 @@ impl<'de> serde::Deserialize<'de> for ProposalExecutorResult { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ProposalExecutorResult::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -6037,10 +6065,9 @@ impl<'de> serde::Deserialize<'de> for ProposalExecutorResult { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ProposalExecutorResult::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -6109,10 +6136,9 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ProposalStatus::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -6122,10 +6148,9 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ProposalStatus::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -6163,6 +6188,7 @@ impl serde::Serialize for QueryGroupInfoRequest { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.QueryGroupInfoRequest", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } struct_ser.end() @@ -6221,20 +6247,20 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -6324,19 +6350,19 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut info__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Info => { if info__.is_some() { return Err(serde::de::Error::duplicate_field("info")); } - info__ = map.next_value()?; + info__ = map_.next_value()?; } } } @@ -6367,6 +6393,7 @@ impl serde::Serialize for QueryGroupMembersRequest { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.QueryGroupMembersRequest", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if let Some(v) = self.pagination.as_ref() { @@ -6430,21 +6457,21 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -6452,7 +6479,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6549,26 +6576,26 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut members__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Members => { if members__.is_some() { return Err(serde::de::Error::duplicate_field("members")); } - members__ = Some(map.next_value()?); + members__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6665,26 +6692,26 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut admin__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6781,26 +6808,26 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_policies__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupPolicies => { if group_policies__.is_some() { return Err(serde::de::Error::duplicate_field("groupPolicies")); } - group_policies__ = Some(map.next_value()?); + group_policies__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6834,6 +6861,7 @@ impl serde::Serialize for QueryGroupPoliciesByGroupRequest { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.QueryGroupPoliciesByGroupRequest", len)?; if self.group_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?; } if let Some(v) = self.pagination.as_ref() { @@ -6897,21 +6925,21 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_id__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupId => { if group_id__.is_some() { return Err(serde::de::Error::duplicate_field("groupId")); } group_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -6919,7 +6947,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -7016,26 +7044,26 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut group_policies__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GroupPolicies => { if group_policies__.is_some() { return Err(serde::de::Error::duplicate_field("groupPolicies")); } - group_policies__ = Some(map.next_value()?); + group_policies__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -7124,19 +7152,19 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -7224,19 +7252,19 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut info__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Info => { if info__.is_some() { return Err(serde::de::Error::duplicate_field("info")); } - info__ = map.next_value()?; + info__ = map_.next_value()?; } } } @@ -7330,26 +7358,26 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut admin__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Admin => { if admin__.is_some() { return Err(serde::de::Error::duplicate_field("admin")); } - admin__ = Some(map.next_value()?); + admin__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -7446,26 +7474,26 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut groups__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Groups => { if groups__.is_some() { return Err(serde::de::Error::duplicate_field("groups")); } - groups__ = Some(map.next_value()?); + groups__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -7562,26 +7590,26 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -7678,26 +7706,26 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut groups__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Groups => { if groups__.is_some() { return Err(serde::de::Error::duplicate_field("groups")); } - groups__ = Some(map.next_value()?); + groups__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -7784,18 +7812,18 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsRequest { formatter.write_str("struct cosmos.group.v1.QueryGroupsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -7889,25 +7917,25 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsResponse { formatter.write_str("struct cosmos.group.v1.QueryGroupsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut groups__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Groups => { if groups__.is_some() { return Err(serde::de::Error::duplicate_field("groups")); } - groups__ = Some(map.next_value()?); + groups__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -7938,6 +7966,7 @@ impl serde::Serialize for QueryProposalRequest { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.QueryProposalRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -7997,19 +8026,22 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { formatter.write_str("struct cosmos.group.v1.QueryProposalRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -8099,19 +8131,19 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Proposal => { if proposal__.is_some() { return Err(serde::de::Error::duplicate_field("proposal")); } - proposal__ = map.next_value()?; + proposal__ = map_.next_value()?; } } } @@ -8207,26 +8239,26 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -8323,26 +8355,26 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposals__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Proposals => { if proposals__.is_some() { return Err(serde::de::Error::duplicate_field("proposals")); } - proposals__ = Some(map.next_value()?); + proposals__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -8373,6 +8405,7 @@ impl serde::Serialize for QueryTallyResultRequest { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.QueryTallyResultRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -8434,20 +8467,20 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -8537,19 +8570,19 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut tally__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Tally => { if tally__.is_some() { return Err(serde::de::Error::duplicate_field("tally")); } - tally__ = map.next_value()?; + tally__ = map_.next_value()?; } } } @@ -8580,6 +8613,7 @@ impl serde::Serialize for QueryVoteByProposalVoterRequest { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.QueryVoteByProposalVoterRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -8646,21 +8680,21 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut voter__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -8668,7 +8702,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } } } @@ -8757,19 +8791,19 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut vote__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Vote => { if vote__.is_some() { return Err(serde::de::Error::duplicate_field("vote")); } - vote__ = map.next_value()?; + vote__ = map_.next_value()?; } } } @@ -8800,6 +8834,7 @@ impl serde::Serialize for QueryVotesByProposalRequest { let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.QueryVotesByProposalRequest", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -8866,21 +8901,21 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut proposal_id__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -8888,7 +8923,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -8985,26 +9020,26 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut votes__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Votes => { if votes__.is_some() { return Err(serde::de::Error::duplicate_field("votes")); } - votes__ = Some(map.next_value()?); + votes__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -9101,26 +9136,26 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut voter__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Voter => { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -9217,26 +9252,26 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut votes__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Votes => { if votes__.is_some() { return Err(serde::de::Error::duplicate_field("votes")); } - votes__ = Some(map.next_value()?); + votes__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -9357,7 +9392,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { formatter.write_str("struct cosmos.group.v1.TallyResult") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -9365,31 +9400,31 @@ impl<'de> serde::Deserialize<'de> for TallyResult { let mut abstain_count__ = None; let mut no_count__ = None; let mut no_with_veto_count__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::YesCount => { if yes_count__.is_some() { return Err(serde::de::Error::duplicate_field("yesCount")); } - yes_count__ = Some(map.next_value()?); + yes_count__ = Some(map_.next_value()?); } GeneratedField::AbstainCount => { if abstain_count__.is_some() { return Err(serde::de::Error::duplicate_field("abstainCount")); } - abstain_count__ = Some(map.next_value()?); + abstain_count__ = Some(map_.next_value()?); } GeneratedField::NoCount => { if no_count__.is_some() { return Err(serde::de::Error::duplicate_field("noCount")); } - no_count__ = Some(map.next_value()?); + no_count__ = Some(map_.next_value()?); } GeneratedField::NoWithVetoCount => { if no_with_veto_count__.is_some() { return Err(serde::de::Error::duplicate_field("noWithVetoCount")); } - no_with_veto_count__ = Some(map.next_value()?); + no_with_veto_count__ = Some(map_.next_value()?); } } } @@ -9484,26 +9519,26 @@ impl<'de> serde::Deserialize<'de> for ThresholdDecisionPolicy { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut threshold__ = None; let mut windows__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Threshold => { if threshold__.is_some() { return Err(serde::de::Error::duplicate_field("threshold")); } - threshold__ = Some(map.next_value()?); + threshold__ = Some(map_.next_value()?); } GeneratedField::Windows => { if windows__.is_some() { return Err(serde::de::Error::duplicate_field("windows")); } - windows__ = map.next_value()?; + windows__ = map_.next_value()?; } } } @@ -9545,6 +9580,7 @@ impl serde::Serialize for Vote { } let mut struct_ser = serializer.serialize_struct("cosmos.group.v1.Vote", len)?; if self.proposal_id != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "proposalId", ToString::to_string(&self.proposal_id).as_str(), @@ -9554,7 +9590,7 @@ impl serde::Serialize for Vote { struct_ser.serialize_field("voter", &self.voter)?; } if self.option != 0 { - let v = VoteOption::from_i32(self.option).ok_or_else(|| { + let v = VoteOption::try_from(self.option).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.option)) })?; struct_ser.serialize_field("option", &v)?; @@ -9635,7 +9671,7 @@ impl<'de> serde::Deserialize<'de> for Vote { formatter.write_str("struct cosmos.group.v1.Vote") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -9644,14 +9680,14 @@ impl<'de> serde::Deserialize<'de> for Vote { let mut option__ = None; let mut metadata__ = None; let mut submit_time__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ProposalId => { if proposal_id__.is_some() { return Err(serde::de::Error::duplicate_field("proposalId")); } proposal_id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -9659,25 +9695,25 @@ impl<'de> serde::Deserialize<'de> for Vote { if voter__.is_some() { return Err(serde::de::Error::duplicate_field("voter")); } - voter__ = Some(map.next_value()?); + voter__ = Some(map_.next_value()?); } GeneratedField::Option => { if option__.is_some() { return Err(serde::de::Error::duplicate_field("option")); } - option__ = Some(map.next_value::()? as i32); + option__ = Some(map_.next_value::()? as i32); } GeneratedField::Metadata => { if metadata__.is_some() { return Err(serde::de::Error::duplicate_field("metadata")); } - metadata__ = Some(map.next_value()?); + metadata__ = Some(map_.next_value()?); } GeneratedField::SubmitTime => { if submit_time__.is_some() { return Err(serde::de::Error::duplicate_field("submitTime")); } - submit_time__ = map.next_value()?; + submit_time__ = map_.next_value()?; } } } @@ -9736,10 +9772,9 @@ impl<'de> serde::Deserialize<'de> for VoteOption { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(VoteOption::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -9749,10 +9784,9 @@ impl<'de> serde::Deserialize<'de> for VoteOption { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(VoteOption::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs index 4c327086..9fbb0398 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Minter represents the minting state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Minter { /// current annual inflation rate @@ -10,6 +11,7 @@ pub struct Minter { pub annual_provisions: ::prost::alloc::string::String, } /// Params holds parameters for the mint module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { /// type of coin to mint @@ -32,6 +34,7 @@ pub struct Params { pub blocks_per_year: u64, } /// GenesisState defines the mint module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// minter is a space for holding current inflation information. @@ -42,9 +45,11 @@ pub struct GenesisState { pub params: ::core::option::Option, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. @@ -52,10 +57,12 @@ pub struct QueryParamsResponse { pub params: ::core::option::Option, } /// QueryInflationRequest is the request type for the Query/Inflation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryInflationRequest {} /// QueryInflationResponse is the response type for the Query/Inflation RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryInflationResponse { /// inflation is the current minting inflation value. @@ -64,10 +71,12 @@ pub struct QueryInflationResponse { } /// QueryAnnualProvisionsRequest is the request type for the /// Query/AnnualProvisions RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAnnualProvisionsRequest {} /// QueryAnnualProvisionsResponse is the response type for the /// Query/AnnualProvisions RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAnnualProvisionsResponse { /// annual_provisions is the current minting annual provisions value. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs index b921ac6e..fa9198f9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs @@ -77,25 +77,25 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.mint.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut minter__ = None; let mut params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Minter => { if minter__.is_some() { return Err(serde::de::Error::duplicate_field("minter")); } - minter__ = map.next_value()?; + minter__ = map_.next_value()?; } GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } } } @@ -191,25 +191,25 @@ impl<'de> serde::Deserialize<'de> for Minter { formatter.write_str("struct cosmos.mint.v1beta1.Minter") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut inflation__ = None; let mut annual_provisions__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Inflation => { if inflation__.is_some() { return Err(serde::de::Error::duplicate_field("inflation")); } - inflation__ = Some(map.next_value()?); + inflation__ = Some(map_.next_value()?); } GeneratedField::AnnualProvisions => { if annual_provisions__.is_some() { return Err(serde::de::Error::duplicate_field("annualProvisions")); } - annual_provisions__ = Some(map.next_value()?); + annual_provisions__ = Some(map_.next_value()?); } } } @@ -265,6 +265,7 @@ impl serde::Serialize for Params { struct_ser.serialize_field("goalBonded", &self.goal_bonded)?; } if self.blocks_per_year != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "blocksPerYear", ToString::to_string(&self.blocks_per_year).as_str(), @@ -351,7 +352,7 @@ impl<'de> serde::Deserialize<'de> for Params { formatter.write_str("struct cosmos.mint.v1beta1.Params") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -361,13 +362,13 @@ impl<'de> serde::Deserialize<'de> for Params { let mut inflation_min__ = None; let mut goal_bonded__ = None; let mut blocks_per_year__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MintDenom => { if mint_denom__.is_some() { return Err(serde::de::Error::duplicate_field("mintDenom")); } - mint_denom__ = Some(map.next_value()?); + mint_denom__ = Some(map_.next_value()?); } GeneratedField::InflationRateChange => { if inflation_rate_change__.is_some() { @@ -375,32 +376,32 @@ impl<'de> serde::Deserialize<'de> for Params { "inflationRateChange", )); } - inflation_rate_change__ = Some(map.next_value()?); + inflation_rate_change__ = Some(map_.next_value()?); } GeneratedField::InflationMax => { if inflation_max__.is_some() { return Err(serde::de::Error::duplicate_field("inflationMax")); } - inflation_max__ = Some(map.next_value()?); + inflation_max__ = Some(map_.next_value()?); } GeneratedField::InflationMin => { if inflation_min__.is_some() { return Err(serde::de::Error::duplicate_field("inflationMin")); } - inflation_min__ = Some(map.next_value()?); + inflation_min__ = Some(map_.next_value()?); } GeneratedField::GoalBonded => { if goal_bonded__.is_some() { return Err(serde::de::Error::duplicate_field("goalBonded")); } - goal_bonded__ = Some(map.next_value()?); + goal_bonded__ = Some(map_.next_value()?); } GeneratedField::BlocksPerYear => { if blocks_per_year__.is_some() { return Err(serde::de::Error::duplicate_field("blocksPerYear")); } blocks_per_year__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -480,13 +481,13 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryAnnualProvisionsRequest {}) } @@ -512,6 +513,7 @@ impl serde::Serialize for QueryAnnualProvisionsResponse { let mut struct_ser = serializer .serialize_struct("cosmos.mint.v1beta1.QueryAnnualProvisionsResponse", len)?; if !self.annual_provisions.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "annualProvisions", pbjson::private::base64::encode(&self.annual_provisions).as_str(), @@ -575,20 +577,20 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut annual_provisions__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::AnnualProvisions => { if annual_provisions__.is_some() { return Err(serde::de::Error::duplicate_field("annualProvisions")); } annual_provisions__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -667,13 +669,13 @@ impl<'de> serde::Deserialize<'de> for QueryInflationRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryInflationRequest {}) } @@ -699,6 +701,7 @@ impl serde::Serialize for QueryInflationResponse { let mut struct_ser = serializer.serialize_struct("cosmos.mint.v1beta1.QueryInflationResponse", len)?; if !self.inflation.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "inflation", pbjson::private::base64::encode(&self.inflation).as_str(), @@ -760,20 +763,20 @@ impl<'de> serde::Deserialize<'de> for QueryInflationResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut inflation__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Inflation => { if inflation__.is_some() { return Err(serde::de::Error::duplicate_field("inflation")); } inflation__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -850,12 +853,12 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.mint.v1beta1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryParamsRequest {}) } @@ -937,18 +940,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.mint.v1beta1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs index 1b39aafe..3508f997 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// EventSend is emitted on Msg/Send +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventSend { #[prost(string, tag = "1")] @@ -12,6 +13,7 @@ pub struct EventSend { pub receiver: ::prost::alloc::string::String, } /// EventMint is emitted on Mint +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventMint { #[prost(string, tag = "1")] @@ -22,6 +24,7 @@ pub struct EventMint { pub owner: ::prost::alloc::string::String, } /// EventBurn is emitted on Burn +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventBurn { #[prost(string, tag = "1")] @@ -32,6 +35,7 @@ pub struct EventBurn { pub owner: ::prost::alloc::string::String, } /// Class defines the class of the nft type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Class { /// id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 @@ -57,6 +61,7 @@ pub struct Class { pub data: ::core::option::Option<::prost_types::Any>, } /// NFT defines the NFT. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Nft { /// class_id associated with the NFT, similar to the contract address of ERC721 @@ -76,6 +81,7 @@ pub struct Nft { pub data: ::core::option::Option<::prost_types::Any>, } /// GenesisState defines the nft module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// class defines the class of the nft type. @@ -85,6 +91,7 @@ pub struct GenesisState { pub entries: ::prost::alloc::vec::Vec, } /// Entry Defines all nft owned by a person +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entry { /// owner is the owner address of the following nft @@ -95,6 +102,7 @@ pub struct Entry { pub nfts: ::prost::alloc::vec::Vec, } /// QueryBalanceRequest is the request type for the Query/Balance RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBalanceRequest { #[prost(string, tag = "1")] @@ -103,12 +111,14 @@ pub struct QueryBalanceRequest { pub owner: ::prost::alloc::string::String, } /// QueryBalanceResponse is the response type for the Query/Balance RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBalanceResponse { #[prost(uint64, tag = "1")] pub amount: u64, } /// QueryOwnerRequest is the request type for the Query/Owner RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryOwnerRequest { #[prost(string, tag = "1")] @@ -117,24 +127,28 @@ pub struct QueryOwnerRequest { pub id: ::prost::alloc::string::String, } /// QueryOwnerResponse is the response type for the Query/Owner RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryOwnerResponse { #[prost(string, tag = "1")] pub owner: ::prost::alloc::string::String, } /// QuerySupplyRequest is the request type for the Query/Supply RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySupplyRequest { #[prost(string, tag = "1")] pub class_id: ::prost::alloc::string::String, } /// QuerySupplyResponse is the response type for the Query/Supply RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySupplyResponse { #[prost(uint64, tag = "1")] pub amount: u64, } /// QueryNFTstRequest is the request type for the Query/NFTs RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryNfTsRequest { #[prost(string, tag = "1")] @@ -145,6 +159,7 @@ pub struct QueryNfTsRequest { pub pagination: ::core::option::Option, } /// QueryNFTsResponse is the response type for the Query/NFTs RPC methods +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryNfTsResponse { #[prost(message, repeated, tag = "1")] @@ -153,6 +168,7 @@ pub struct QueryNfTsResponse { pub pagination: ::core::option::Option, } /// QueryNFTRequest is the request type for the Query/NFT RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryNftRequest { #[prost(string, tag = "1")] @@ -161,24 +177,28 @@ pub struct QueryNftRequest { pub id: ::prost::alloc::string::String, } /// QueryNFTResponse is the response type for the Query/NFT RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryNftResponse { #[prost(message, optional, tag = "1")] pub nft: ::core::option::Option, } /// QueryClassRequest is the request type for the Query/Class RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryClassRequest { #[prost(string, tag = "1")] pub class_id: ::prost::alloc::string::String, } /// QueryClassResponse is the response type for the Query/Class RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryClassResponse { #[prost(message, optional, tag = "1")] pub class: ::core::option::Option, } /// QueryClassesRequest is the request type for the Query/Classes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryClassesRequest { /// pagination defines an optional pagination for the request. @@ -186,6 +206,7 @@ pub struct QueryClassesRequest { pub pagination: ::core::option::Option, } /// QueryClassesResponse is the response type for the Query/Classes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryClassesResponse { #[prost(message, repeated, tag = "1")] @@ -194,6 +215,7 @@ pub struct QueryClassesResponse { pub pagination: ::core::option::Option, } /// MsgSend represents a message to send a nft from one account to another account. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSend { /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 @@ -210,6 +232,7 @@ pub struct MsgSend { pub receiver: ::prost::alloc::string::String, } /// MsgSendResponse defines the Msg/Send response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSendResponse {} include!("cosmos.nft.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs index 6d1970c8..bb0acab3 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs @@ -125,7 +125,7 @@ impl<'de> serde::Deserialize<'de> for Class { formatter.write_str("struct cosmos.nft.v1beta1.Class") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -136,49 +136,49 @@ impl<'de> serde::Deserialize<'de> for Class { let mut uri__ = None; let mut uri_hash__ = None; let mut data__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Symbol => { if symbol__.is_some() { return Err(serde::de::Error::duplicate_field("symbol")); } - symbol__ = Some(map.next_value()?); + symbol__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } GeneratedField::Uri => { if uri__.is_some() { return Err(serde::de::Error::duplicate_field("uri")); } - uri__ = Some(map.next_value()?); + uri__ = Some(map_.next_value()?); } GeneratedField::UriHash => { if uri_hash__.is_some() { return Err(serde::de::Error::duplicate_field("uriHash")); } - uri_hash__ = Some(map.next_value()?); + uri_hash__ = Some(map_.next_value()?); } GeneratedField::Data => { if data__.is_some() { return Err(serde::de::Error::duplicate_field("data")); } - data__ = map.next_value()?; + data__ = map_.next_value()?; } } } @@ -273,25 +273,25 @@ impl<'de> serde::Deserialize<'de> for Entry { formatter.write_str("struct cosmos.nft.v1beta1.Entry") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut owner__ = None; let mut nfts__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Owner => { if owner__.is_some() { return Err(serde::de::Error::duplicate_field("owner")); } - owner__ = Some(map.next_value()?); + owner__ = Some(map_.next_value()?); } GeneratedField::Nfts => { if nfts__.is_some() { return Err(serde::de::Error::duplicate_field("nfts")); } - nfts__ = Some(map.next_value()?); + nfts__ = Some(map_.next_value()?); } } } @@ -389,32 +389,32 @@ impl<'de> serde::Deserialize<'de> for EventBurn { formatter.write_str("struct cosmos.nft.v1beta1.EventBurn") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class_id__ = None; let mut id__ = None; let mut owner__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } GeneratedField::Owner => { if owner__.is_some() { return Err(serde::de::Error::duplicate_field("owner")); } - owner__ = Some(map.next_value()?); + owner__ = Some(map_.next_value()?); } } } @@ -513,32 +513,32 @@ impl<'de> serde::Deserialize<'de> for EventMint { formatter.write_str("struct cosmos.nft.v1beta1.EventMint") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class_id__ = None; let mut id__ = None; let mut owner__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } GeneratedField::Owner => { if owner__.is_some() { return Err(serde::de::Error::duplicate_field("owner")); } - owner__ = Some(map.next_value()?); + owner__ = Some(map_.next_value()?); } } } @@ -645,7 +645,7 @@ impl<'de> serde::Deserialize<'de> for EventSend { formatter.write_str("struct cosmos.nft.v1beta1.EventSend") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -653,31 +653,31 @@ impl<'de> serde::Deserialize<'de> for EventSend { let mut id__ = None; let mut sender__ = None; let mut receiver__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } GeneratedField::Sender => { if sender__.is_some() { return Err(serde::de::Error::duplicate_field("sender")); } - sender__ = Some(map.next_value()?); + sender__ = Some(map_.next_value()?); } GeneratedField::Receiver => { if receiver__.is_some() { return Err(serde::de::Error::duplicate_field("receiver")); } - receiver__ = Some(map.next_value()?); + receiver__ = Some(map_.next_value()?); } } } @@ -769,25 +769,25 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.nft.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut classes__ = None; let mut entries__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Classes => { if classes__.is_some() { return Err(serde::de::Error::duplicate_field("classes")); } - classes__ = Some(map.next_value()?); + classes__ = Some(map_.next_value()?); } GeneratedField::Entries => { if entries__.is_some() { return Err(serde::de::Error::duplicate_field("entries")); } - entries__ = Some(map.next_value()?); + entries__ = Some(map_.next_value()?); } } } @@ -893,7 +893,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { formatter.write_str("struct cosmos.nft.v1beta1.MsgSend") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -901,31 +901,31 @@ impl<'de> serde::Deserialize<'de> for MsgSend { let mut id__ = None; let mut sender__ = None; let mut receiver__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } GeneratedField::Sender => { if sender__.is_some() { return Err(serde::de::Error::duplicate_field("sender")); } - sender__ = Some(map.next_value()?); + sender__ = Some(map_.next_value()?); } GeneratedField::Receiver => { if receiver__.is_some() { return Err(serde::de::Error::duplicate_field("receiver")); } - receiver__ = Some(map.next_value()?); + receiver__ = Some(map_.next_value()?); } } } @@ -998,12 +998,12 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { formatter.write_str("struct cosmos.nft.v1beta1.MsgSendResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgSendResponse {}) } @@ -1118,7 +1118,7 @@ impl<'de> serde::Deserialize<'de> for Nft { formatter.write_str("struct cosmos.nft.v1beta1.NFT") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1127,37 +1127,37 @@ impl<'de> serde::Deserialize<'de> for Nft { let mut uri__ = None; let mut uri_hash__ = None; let mut data__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } GeneratedField::Uri => { if uri__.is_some() { return Err(serde::de::Error::duplicate_field("uri")); } - uri__ = Some(map.next_value()?); + uri__ = Some(map_.next_value()?); } GeneratedField::UriHash => { if uri_hash__.is_some() { return Err(serde::de::Error::duplicate_field("uriHash")); } - uri_hash__ = Some(map.next_value()?); + uri_hash__ = Some(map_.next_value()?); } GeneratedField::Data => { if data__.is_some() { return Err(serde::de::Error::duplicate_field("data")); } - data__ = map.next_value()?; + data__ = map_.next_value()?; } } } @@ -1251,25 +1251,25 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { formatter.write_str("struct cosmos.nft.v1beta1.QueryBalanceRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class_id__ = None; let mut owner__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Owner => { if owner__.is_some() { return Err(serde::de::Error::duplicate_field("owner")); } - owner__ = Some(map.next_value()?); + owner__ = Some(map_.next_value()?); } } } @@ -1300,6 +1300,7 @@ impl serde::Serialize for QueryBalanceResponse { let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.QueryBalanceResponse", len)?; if self.amount != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; } struct_ser.end() @@ -1356,19 +1357,22 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { formatter.write_str("struct cosmos.nft.v1beta1.QueryBalanceResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } amount__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1456,18 +1460,18 @@ impl<'de> serde::Deserialize<'de> for QueryClassRequest { formatter.write_str("struct cosmos.nft.v1beta1.QueryClassRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } } } @@ -1553,18 +1557,18 @@ impl<'de> serde::Deserialize<'de> for QueryClassResponse { formatter.write_str("struct cosmos.nft.v1beta1.QueryClassResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Class => { if class__.is_some() { return Err(serde::de::Error::duplicate_field("class")); } - class__ = map.next_value()?; + class__ = map_.next_value()?; } } } @@ -1648,18 +1652,18 @@ impl<'de> serde::Deserialize<'de> for QueryClassesRequest { formatter.write_str("struct cosmos.nft.v1beta1.QueryClassesRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1753,25 +1757,28 @@ impl<'de> serde::Deserialize<'de> for QueryClassesResponse { formatter.write_str("struct cosmos.nft.v1beta1.QueryClassesResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut classes__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Classes => { if classes__.is_some() { return Err(serde::de::Error::duplicate_field("classes")); } - classes__ = Some(map.next_value()?); + classes__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1866,25 +1873,25 @@ impl<'de> serde::Deserialize<'de> for QueryNftRequest { formatter.write_str("struct cosmos.nft.v1beta1.QueryNFTRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class_id__ = None; let mut id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } } } @@ -1971,18 +1978,18 @@ impl<'de> serde::Deserialize<'de> for QueryNftResponse { formatter.write_str("struct cosmos.nft.v1beta1.QueryNFTResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut nft__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Nft => { if nft__.is_some() { return Err(serde::de::Error::duplicate_field("nft")); } - nft__ = map.next_value()?; + nft__ = map_.next_value()?; } } } @@ -2082,32 +2089,32 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsRequest { formatter.write_str("struct cosmos.nft.v1beta1.QueryNFTsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class_id__ = None; let mut owner__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Owner => { if owner__.is_some() { return Err(serde::de::Error::duplicate_field("owner")); } - owner__ = Some(map.next_value()?); + owner__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2203,25 +2210,25 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsResponse { formatter.write_str("struct cosmos.nft.v1beta1.QueryNFTsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut nfts__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Nfts => { if nfts__.is_some() { return Err(serde::de::Error::duplicate_field("nfts")); } - nfts__ = Some(map.next_value()?); + nfts__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -2316,25 +2323,25 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerRequest { formatter.write_str("struct cosmos.nft.v1beta1.QueryOwnerRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class_id__ = None; let mut id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } - id__ = Some(map.next_value()?); + id__ = Some(map_.next_value()?); } } } @@ -2421,18 +2428,18 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerResponse { formatter.write_str("struct cosmos.nft.v1beta1.QueryOwnerResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut owner__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Owner => { if owner__.is_some() { return Err(serde::de::Error::duplicate_field("owner")); } - owner__ = Some(map.next_value()?); + owner__ = Some(map_.next_value()?); } } } @@ -2518,18 +2525,18 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyRequest { formatter.write_str("struct cosmos.nft.v1beta1.QuerySupplyRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut class_id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ClassId => { if class_id__.is_some() { return Err(serde::de::Error::duplicate_field("classId")); } - class_id__ = Some(map.next_value()?); + class_id__ = Some(map_.next_value()?); } } } @@ -2559,6 +2566,7 @@ impl serde::Serialize for QuerySupplyResponse { let mut struct_ser = serializer.serialize_struct("cosmos.nft.v1beta1.QuerySupplyResponse", len)?; if self.amount != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; } struct_ser.end() @@ -2615,19 +2623,19 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyResponse { formatter.write_str("struct cosmos.nft.v1beta1.QuerySupplyResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } amount__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs index 48dc2d1f..0301a2cb 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs @@ -2,6 +2,7 @@ /// Module defines the ORM module which adds providers to the app container for /// module-scoped DB's. In the future it may provide gRPC services for interacting /// with ORM data. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module {} include!("cosmos.orm.module.v1alpha1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs index ff0688b0..2bfe3bc2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs @@ -57,12 +57,12 @@ impl<'de> serde::Deserialize<'de> for Module { formatter.write_str("struct cosmos.orm.module.v1alpha1.Module") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(Module {}) } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs index 350a9c31..f444af15 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs @@ -1,5 +1,6 @@ // @generated /// TableDescriptor describes an ORM table. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TableDescriptor { /// primary_key defines the primary key for the table. @@ -15,6 +16,7 @@ pub struct TableDescriptor { pub id: u32, } /// PrimaryKeyDescriptor describes a table primary key. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrimaryKeyDescriptor { /// fields is a comma-separated list of fields in the primary key. Spaces are @@ -56,6 +58,7 @@ pub struct PrimaryKeyDescriptor { pub auto_increment: bool, } /// PrimaryKeyDescriptor describes a table secondary index. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SecondaryIndexDescriptor { /// fields is a comma-separated list of fields in the index. The supported @@ -79,6 +82,7 @@ pub struct SecondaryIndexDescriptor { pub unique: bool, } /// TableDescriptor describes an ORM singleton table which has at most one instance. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SingletonDescriptor { /// id is a non-zero integer ID that must be unique within the diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs index 293b88db..c81d8cce 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs @@ -77,25 +77,28 @@ impl<'de> serde::Deserialize<'de> for PrimaryKeyDescriptor { formatter.write_str("struct cosmos.orm.v1.PrimaryKeyDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut fields__ = None; let mut auto_increment__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Fields => { if fields__.is_some() { return Err(serde::de::Error::duplicate_field("fields")); } - fields__ = Some(map.next_value()?); + fields__ = Some(map_.next_value()?); } GeneratedField::AutoIncrement => { if auto_increment__.is_some() { return Err(serde::de::Error::duplicate_field("autoIncrement")); } - auto_increment__ = Some(map.next_value()?); + auto_increment__ = Some(map_.next_value()?); } } } @@ -200,7 +203,7 @@ impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -208,20 +211,20 @@ impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { let mut fields__ = None; let mut id__ = None; let mut unique__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Fields => { if fields__.is_some() { return Err(serde::de::Error::duplicate_field("fields")); } - fields__ = Some(map.next_value()?); + fields__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -229,7 +232,7 @@ impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { if unique__.is_some() { return Err(serde::de::Error::duplicate_field("unique")); } - unique__ = Some(map.next_value()?); + unique__ = Some(map_.next_value()?); } } } @@ -317,19 +320,19 @@ impl<'de> serde::Deserialize<'de> for SingletonDescriptor { formatter.write_str("struct cosmos.orm.v1.SingletonDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -432,33 +435,33 @@ impl<'de> serde::Deserialize<'de> for TableDescriptor { formatter.write_str("struct cosmos.orm.v1.TableDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut primary_key__ = None; let mut index__ = None; let mut id__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::PrimaryKey => { if primary_key__.is_some() { return Err(serde::de::Error::duplicate_field("primaryKey")); } - primary_key__ = map.next_value()?; + primary_key__ = map_.next_value()?; } GeneratedField::Index => { if index__.is_some() { return Err(serde::de::Error::duplicate_field("index")); } - index__ = Some(map.next_value()?); + index__ = Some(map_.next_value()?); } GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs index 26ab9c2f..8753b2ec 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs @@ -1,5 +1,6 @@ // @generated /// ModuleSchemaDescriptor describe's a module's ORM schema. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleSchemaDescriptor { #[prost(message, repeated, tag = "1")] @@ -12,6 +13,7 @@ pub struct ModuleSchemaDescriptor { /// Nested message and enum types in `ModuleSchemaDescriptor`. pub mod module_schema_descriptor { /// FileEntry describes an ORM file used in a module. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FileEntry { /// id is a prefix that will be varint encoded and prepended to all the @@ -78,6 +80,17 @@ impl StorageType { StorageType::Commitment => "STORAGE_TYPE_COMMITMENT", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STORAGE_TYPE_DEFAULT_UNSPECIFIED" => Some(Self::DefaultUnspecified), + "STORAGE_TYPE_MEMORY" => Some(Self::Memory), + "STORAGE_TYPE_TRANSIENT" => Some(Self::Transient), + "STORAGE_TYPE_INDEX" => Some(Self::Index), + "STORAGE_TYPE_COMMITMENT" => Some(Self::Commitment), + _ => None, + } + } } include!("cosmos.orm.v1alpha1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs index 5c090e15..69276d89 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs @@ -19,6 +19,7 @@ impl serde::Serialize for ModuleSchemaDescriptor { struct_ser.serialize_field("schemaFile", &self.schema_file)?; } if !self.prefix.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "prefix", pbjson::private::base64::encode(&self.prefix).as_str(), @@ -82,27 +83,27 @@ impl<'de> serde::Deserialize<'de> for ModuleSchemaDescriptor { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut schema_file__ = None; let mut prefix__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::SchemaFile => { if schema_file__.is_some() { return Err(serde::de::Error::duplicate_field("schemaFile")); } - schema_file__ = Some(map.next_value()?); + schema_file__ = Some(map_.next_value()?); } GeneratedField::Prefix => { if prefix__.is_some() { return Err(serde::de::Error::duplicate_field("prefix")); } prefix__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -147,7 +148,7 @@ impl serde::Serialize for module_schema_descriptor::FileEntry { struct_ser.serialize_field("protoFileName", &self.proto_file_name)?; } if self.storage_type != 0 { - let v = StorageType::from_i32(self.storage_type).ok_or_else(|| { + let v = StorageType::try_from(self.storage_type).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.storage_type)) })?; struct_ser.serialize_field("storageType", &v)?; @@ -220,7 +221,7 @@ impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -228,14 +229,14 @@ impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { let mut id__ = None; let mut proto_file_name__ = None; let mut storage_type__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { if id__.is_some() { return Err(serde::de::Error::duplicate_field("id")); } id__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -243,13 +244,13 @@ impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { if proto_file_name__.is_some() { return Err(serde::de::Error::duplicate_field("protoFileName")); } - proto_file_name__ = Some(map.next_value()?); + proto_file_name__ = Some(map_.next_value()?); } GeneratedField::StorageType => { if storage_type__.is_some() { return Err(serde::de::Error::duplicate_field("storageType")); } - storage_type__ = Some(map.next_value::()? as i32); + storage_type__ = Some(map_.next_value::()? as i32); } } } @@ -310,10 +311,9 @@ impl<'de> serde::Deserialize<'de> for StorageType { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(StorageType::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -323,10 +323,9 @@ impl<'de> serde::Deserialize<'de> for StorageType { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(StorageType::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs index 4c0d6eaa..de96b78e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// ParameterChangeProposal defines a proposal to change one or more parameters. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParameterChangeProposal { #[prost(string, tag = "1")] @@ -11,6 +12,7 @@ pub struct ParameterChangeProposal { } /// ParamChange defines an individual parameter change, for use in /// ParameterChangeProposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParamChange { #[prost(string, tag = "1")] @@ -21,6 +23,7 @@ pub struct ParamChange { pub value: ::prost::alloc::string::String, } /// QueryParamsRequest is request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest { /// subspace defines the module to query the parameter for. @@ -31,6 +34,7 @@ pub struct QueryParamsRequest { pub key: ::prost::alloc::string::String, } /// QueryParamsResponse is response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// param defines the queried parameter. @@ -41,12 +45,14 @@ pub struct QueryParamsResponse { /// subspaces and all keys for a subspace. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySubspacesRequest {} /// QuerySubspacesResponse defines the response types for querying for all /// registered subspaces and all keys for a subspace. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySubspacesResponse { #[prost(message, repeated, tag = "1")] @@ -56,6 +62,7 @@ pub struct QuerySubspacesResponse { /// the subspace. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Subspace { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs index b39d0995..52aaff35 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs @@ -85,32 +85,32 @@ impl<'de> serde::Deserialize<'de> for ParamChange { formatter.write_str("struct cosmos.params.v1beta1.ParamChange") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut subspace__ = None; let mut key__ = None; let mut value__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Subspace => { if subspace__.is_some() { return Err(serde::de::Error::duplicate_field("subspace")); } - subspace__ = Some(map.next_value()?); + subspace__ = Some(map_.next_value()?); } GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } - key__ = Some(map.next_value()?); + key__ = Some(map_.next_value()?); } GeneratedField::Value => { if value__.is_some() { return Err(serde::de::Error::duplicate_field("value")); } - value__ = Some(map.next_value()?); + value__ = Some(map_.next_value()?); } } } @@ -216,7 +216,7 @@ impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -224,25 +224,25 @@ impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { let mut title__ = None; let mut description__ = None; let mut changes__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Title => { if title__.is_some() { return Err(serde::de::Error::duplicate_field("title")); } - title__ = Some(map.next_value()?); + title__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } GeneratedField::Changes => { if changes__.is_some() { return Err(serde::de::Error::duplicate_field("changes")); } - changes__ = Some(map.next_value()?); + changes__ = Some(map_.next_value()?); } } } @@ -338,25 +338,25 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.params.v1beta1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut subspace__ = None; let mut key__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Subspace => { if subspace__.is_some() { return Err(serde::de::Error::duplicate_field("subspace")); } - subspace__ = Some(map.next_value()?); + subspace__ = Some(map_.next_value()?); } GeneratedField::Key => { if key__.is_some() { return Err(serde::de::Error::duplicate_field("key")); } - key__ = Some(map.next_value()?); + key__ = Some(map_.next_value()?); } } } @@ -443,18 +443,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.params.v1beta1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut param__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Param => { if param__.is_some() { return Err(serde::de::Error::duplicate_field("param")); } - param__ = map.next_value()?; + param__ = map_.next_value()?; } } } @@ -529,13 +529,13 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QuerySubspacesRequest {}) } @@ -619,19 +619,19 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut subspaces__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Subspaces => { if subspaces__.is_some() { return Err(serde::de::Error::duplicate_field("subspaces")); } - subspaces__ = Some(map.next_value()?); + subspaces__ = Some(map_.next_value()?); } } } @@ -724,25 +724,25 @@ impl<'de> serde::Deserialize<'de> for Subspace { formatter.write_str("struct cosmos.params.v1beta1.Subspace") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut subspace__ = None; let mut keys__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Subspace => { if subspace__.is_some() { return Err(serde::de::Error::duplicate_field("subspace")); } - subspace__ = Some(map.next_value()?); + subspace__ = Some(map_.next_value()?); } GeneratedField::Keys => { if keys__.is_some() { return Err(serde::de::Error::duplicate_field("keys")); } - keys__ = Some(map.next_value()?); + keys__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs index cc651fbf..75ff2bfd 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// ValidatorSigningInfo defines a validator's signing info for monitoring their /// liveness activity. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorSigningInfo { #[prost(string, tag = "1")] @@ -26,6 +27,7 @@ pub struct ValidatorSigningInfo { pub missed_blocks_counter: i64, } /// Params represents the parameters used for by the slashing module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(int64, tag = "1")] @@ -40,6 +42,7 @@ pub struct Params { pub slash_fraction_downtime: ::prost::alloc::vec::Vec, } /// GenesisState defines the slashing module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of related to deposit. @@ -55,6 +58,7 @@ pub struct GenesisState { pub missed_blocks: ::prost::alloc::vec::Vec, } /// SigningInfo stores validator signing info of corresponding address. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SigningInfo { /// address is the validator address. @@ -66,6 +70,7 @@ pub struct SigningInfo { } /// ValidatorMissedBlocks contains array of missed blocks of corresponding /// address. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorMissedBlocks { /// address is the validator address. @@ -76,6 +81,7 @@ pub struct ValidatorMissedBlocks { pub missed_blocks: ::prost::alloc::vec::Vec, } /// MissedBlock contains height and missed status as boolean. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MissedBlock { /// index is the height at which the block was missed. @@ -86,9 +92,11 @@ pub struct MissedBlock { pub missed: bool, } /// QueryParamsRequest is the request type for the Query/Params RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { #[prost(message, optional, tag = "1")] @@ -96,6 +104,7 @@ pub struct QueryParamsResponse { } /// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySigningInfoRequest { /// cons_address is the address to query signing info of @@ -104,6 +113,7 @@ pub struct QuerySigningInfoRequest { } /// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySigningInfoResponse { /// val_signing_info is the signing info of requested val cons address @@ -112,6 +122,7 @@ pub struct QuerySigningInfoResponse { } /// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySigningInfosRequest { #[prost(message, optional, tag = "1")] @@ -119,6 +130,7 @@ pub struct QuerySigningInfosRequest { } /// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySigningInfosResponse { /// info is the signing info of all validators @@ -128,12 +140,14 @@ pub struct QuerySigningInfosResponse { pub pagination: ::core::option::Option, } /// MsgUnjail defines the Msg/Unjail request type +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUnjail { #[prost(string, tag = "1")] pub validator_addr: ::prost::alloc::string::String, } /// MsgUnjailResponse defines the Msg/Unjail response type +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUnjailResponse {} include!("cosmos.slashing.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs index 82ecb0f0..20e33e28 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs @@ -91,32 +91,32 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.slashing.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params__ = None; let mut signing_infos__ = None; let mut missed_blocks__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } GeneratedField::SigningInfos => { if signing_infos__.is_some() { return Err(serde::de::Error::duplicate_field("signingInfos")); } - signing_infos__ = Some(map.next_value()?); + signing_infos__ = Some(map_.next_value()?); } GeneratedField::MissedBlocks => { if missed_blocks__.is_some() { return Err(serde::de::Error::duplicate_field("missedBlocks")); } - missed_blocks__ = Some(map.next_value()?); + missed_blocks__ = Some(map_.next_value()?); } } } @@ -151,6 +151,7 @@ impl serde::Serialize for MissedBlock { let mut struct_ser = serializer.serialize_struct("cosmos.slashing.v1beta1.MissedBlock", len)?; if self.index != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("index", ToString::to_string(&self.index).as_str())?; } if self.missed { @@ -212,20 +213,20 @@ impl<'de> serde::Deserialize<'de> for MissedBlock { formatter.write_str("struct cosmos.slashing.v1beta1.MissedBlock") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut index__ = None; let mut missed__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Index => { if index__.is_some() { return Err(serde::de::Error::duplicate_field("index")); } index__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -233,7 +234,7 @@ impl<'de> serde::Deserialize<'de> for MissedBlock { if missed__.is_some() { return Err(serde::de::Error::duplicate_field("missed")); } - missed__ = Some(map.next_value()?); + missed__ = Some(map_.next_value()?); } } } @@ -320,18 +321,18 @@ impl<'de> serde::Deserialize<'de> for MsgUnjail { formatter.write_str("struct cosmos.slashing.v1beta1.MsgUnjail") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_addr__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddr => { if validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddr")); } - validator_addr__ = Some(map.next_value()?); + validator_addr__ = Some(map_.next_value()?); } } } @@ -406,12 +407,12 @@ impl<'de> serde::Deserialize<'de> for MsgUnjailResponse { formatter.write_str("struct cosmos.slashing.v1beta1.MsgUnjailResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgUnjailResponse {}) } @@ -448,12 +449,14 @@ impl serde::Serialize for Params { } let mut struct_ser = serializer.serialize_struct("cosmos.slashing.v1beta1.Params", len)?; if self.signed_blocks_window != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "signedBlocksWindow", ToString::to_string(&self.signed_blocks_window).as_str(), )?; } if !self.min_signed_per_window.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "minSignedPerWindow", pbjson::private::base64::encode(&self.min_signed_per_window).as_str(), @@ -463,12 +466,14 @@ impl serde::Serialize for Params { struct_ser.serialize_field("downtimeJailDuration", v)?; } if !self.slash_fraction_double_sign.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "slashFractionDoubleSign", pbjson::private::base64::encode(&self.slash_fraction_double_sign).as_str(), )?; } if !self.slash_fraction_downtime.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "slashFractionDowntime", pbjson::private::base64::encode(&self.slash_fraction_downtime).as_str(), @@ -557,7 +562,7 @@ impl<'de> serde::Deserialize<'de> for Params { formatter.write_str("struct cosmos.slashing.v1beta1.Params") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -566,7 +571,7 @@ impl<'de> serde::Deserialize<'de> for Params { let mut downtime_jail_duration__ = None; let mut slash_fraction_double_sign__ = None; let mut slash_fraction_downtime__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::SignedBlocksWindow => { if signed_blocks_window__.is_some() { @@ -575,7 +580,7 @@ impl<'de> serde::Deserialize<'de> for Params { )); } signed_blocks_window__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -586,7 +591,7 @@ impl<'de> serde::Deserialize<'de> for Params { )); } min_signed_per_window__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -596,7 +601,7 @@ impl<'de> serde::Deserialize<'de> for Params { "downtimeJailDuration", )); } - downtime_jail_duration__ = map.next_value()?; + downtime_jail_duration__ = map_.next_value()?; } GeneratedField::SlashFractionDoubleSign => { if slash_fraction_double_sign__.is_some() { @@ -605,7 +610,7 @@ impl<'de> serde::Deserialize<'de> for Params { )); } slash_fraction_double_sign__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -616,7 +621,7 @@ impl<'de> serde::Deserialize<'de> for Params { )); } slash_fraction_downtime__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -693,12 +698,12 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.slashing.v1beta1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryParamsRequest {}) } @@ -780,18 +785,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.slashing.v1beta1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } } } @@ -877,19 +882,19 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut cons_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ConsAddress => { if cons_address__.is_some() { return Err(serde::de::Error::duplicate_field("consAddress")); } - cons_address__ = Some(map.next_value()?); + cons_address__ = Some(map_.next_value()?); } } } @@ -979,19 +984,19 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut val_signing_info__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValSigningInfo => { if val_signing_info__.is_some() { return Err(serde::de::Error::duplicate_field("valSigningInfo")); } - val_signing_info__ = map.next_value()?; + val_signing_info__ = map_.next_value()?; } } } @@ -1079,19 +1084,19 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1187,26 +1192,26 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut info__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Info => { if info__.is_some() { return Err(serde::de::Error::duplicate_field("info")); } - info__ = Some(map.next_value()?); + info__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1303,19 +1308,19 @@ impl<'de> serde::Deserialize<'de> for SigningInfo { formatter.write_str("struct cosmos.slashing.v1beta1.SigningInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut validator_signing_info__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::ValidatorSigningInfo => { if validator_signing_info__.is_some() { @@ -1323,7 +1328,7 @@ impl<'de> serde::Deserialize<'de> for SigningInfo { "validatorSigningInfo", )); } - validator_signing_info__ = map.next_value()?; + validator_signing_info__ = map_.next_value()?; } } } @@ -1420,26 +1425,26 @@ impl<'de> serde::Deserialize<'de> for ValidatorMissedBlocks { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut missed_blocks__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::MissedBlocks => { if missed_blocks__.is_some() { return Err(serde::de::Error::duplicate_field("missedBlocks")); } - missed_blocks__ = Some(map.next_value()?); + missed_blocks__ = Some(map_.next_value()?); } } } @@ -1488,12 +1493,14 @@ impl serde::Serialize for ValidatorSigningInfo { struct_ser.serialize_field("address", &self.address)?; } if self.start_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "startHeight", ToString::to_string(&self.start_height).as_str(), )?; } if self.index_offset != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "indexOffset", ToString::to_string(&self.index_offset).as_str(), @@ -1506,6 +1513,7 @@ impl serde::Serialize for ValidatorSigningInfo { struct_ser.serialize_field("tombstoned", &self.tombstoned)?; } if self.missed_blocks_counter != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "missedBlocksCounter", ToString::to_string(&self.missed_blocks_counter).as_str(), @@ -1588,7 +1596,10 @@ impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { formatter.write_str("struct cosmos.slashing.v1beta1.ValidatorSigningInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1598,20 +1609,20 @@ impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { let mut jailed_until__ = None; let mut tombstoned__ = None; let mut missed_blocks_counter__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::StartHeight => { if start_height__.is_some() { return Err(serde::de::Error::duplicate_field("startHeight")); } start_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1620,7 +1631,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { return Err(serde::de::Error::duplicate_field("indexOffset")); } index_offset__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1628,13 +1639,13 @@ impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { if jailed_until__.is_some() { return Err(serde::de::Error::duplicate_field("jailedUntil")); } - jailed_until__ = map.next_value()?; + jailed_until__ = map_.next_value()?; } GeneratedField::Tombstoned => { if tombstoned__.is_some() { return Err(serde::de::Error::duplicate_field("tombstoned")); } - tombstoned__ = Some(map.next_value()?); + tombstoned__ = Some(map_.next_value()?); } GeneratedField::MissedBlocksCounter => { if missed_blocks_counter__.is_some() { @@ -1643,7 +1654,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { )); } missed_blocks_counter__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs index 2d7d9d5a..98a8bd4f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs @@ -2,6 +2,7 @@ /// StakeAuthorization defines authorization for delegate/undelegate/redelegate. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StakeAuthorization { /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is @@ -18,12 +19,14 @@ pub struct StakeAuthorization { /// Nested message and enum types in `StakeAuthorization`. pub mod stake_authorization { /// Validators defines list of validator addresses. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Validators { #[prost(string, repeated, tag = "1")] pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// validators is the oneof that represents either allow_list or deny_list + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Policy { /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's @@ -63,11 +66,22 @@ impl AuthorizationType { AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), + "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), + "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), + _ => None, + } + } } /// HistoricalInfo contains header and validator information for a given block. /// It is stored as part of staking module's state, which persists the `n` most /// recent HistoricalInfo /// (`n` is set by the staking module's `historical_entries` parameter). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HistoricalInfo { #[prost(message, optional, tag = "1")] @@ -77,6 +91,7 @@ pub struct HistoricalInfo { } /// CommissionRates defines the initial commission rates to be used for creating /// a validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommissionRates { /// rate is the commission rate charged to delegators, as a fraction. @@ -90,6 +105,7 @@ pub struct CommissionRates { pub max_change_rate: ::prost::alloc::string::String, } /// Commission defines commission parameters for a given validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Commission { /// commission_rates defines the initial commission rates to be used for creating a validator. @@ -100,6 +116,7 @@ pub struct Commission { pub update_time: ::core::option::Option<::prost_types::Timestamp>, } /// Description defines a validator description. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Description { /// moniker defines a human-readable name for the validator. @@ -126,6 +143,7 @@ pub struct Description { /// bond shares is based on the amount of coins delegated divided by the current /// exchange rate. Voting power can be calculated as total bonded shares /// multiplied by exchange rate. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Validator { /// operator_address defines the address of the validator's operator; bech encoded in JSON. @@ -165,6 +183,7 @@ pub struct Validator { pub min_self_delegation: ::prost::alloc::string::String, } /// ValAddresses defines a repeated set of validator addresses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValAddresses { #[prost(string, repeated, tag = "1")] @@ -173,6 +192,7 @@ pub struct ValAddresses { /// DVPair is struct that just has a delegator-validator pair with no other data. /// It is intended to be used as a marshalable pointer. For example, a DVPair can /// be used to construct the key to getting an UnbondingDelegation from state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DvPair { #[prost(string, tag = "1")] @@ -181,6 +201,7 @@ pub struct DvPair { pub validator_address: ::prost::alloc::string::String, } /// DVPairs defines an array of DVPair objects. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DvPairs { #[prost(message, repeated, tag = "1")] @@ -190,6 +211,7 @@ pub struct DvPairs { /// with no other data. It is intended to be used as a marshalable pointer. For /// example, a DVVTriplet can be used to construct the key to getting a /// Redelegation from state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DvvTriplet { #[prost(string, tag = "1")] @@ -200,6 +222,7 @@ pub struct DvvTriplet { pub validator_dst_address: ::prost::alloc::string::String, } /// DVVTriplets defines an array of DVVTriplet objects. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DvvTriplets { #[prost(message, repeated, tag = "1")] @@ -208,6 +231,7 @@ pub struct DvvTriplets { /// Delegation represents the bond with tokens held by an account. It is /// owned by one delegator, and is associated with the voting power of one /// validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Delegation { /// delegator_address is the bech32-encoded address of the delegator. @@ -222,6 +246,7 @@ pub struct Delegation { } /// UnbondingDelegation stores all of a single delegator's unbonding bonds /// for a single validator in an time-ordered list. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnbondingDelegation { /// delegator_address is the bech32-encoded address of the delegator. @@ -237,6 +262,7 @@ pub struct UnbondingDelegation { pub entries: ::prost::alloc::vec::Vec, } /// UnbondingDelegationEntry defines an unbonding object with relevant metadata. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnbondingDelegationEntry { /// creation_height is the height which the unbonding took place. @@ -253,6 +279,7 @@ pub struct UnbondingDelegationEntry { pub balance: ::prost::alloc::string::String, } /// RedelegationEntry defines a redelegation object with relevant metadata. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegationEntry { /// creation_height defines the height which the redelegation took place. @@ -270,6 +297,7 @@ pub struct RedelegationEntry { } /// Redelegation contains the list of a particular delegator's redelegating bonds /// from a particular source validator to a particular destination validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Redelegation { /// delegator_address is the bech32-encoded address of the delegator. @@ -288,6 +316,7 @@ pub struct Redelegation { pub entries: ::prost::alloc::vec::Vec, } /// Params defines the parameters for the staking module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { /// unbonding_time is the time duration of unbonding. @@ -311,6 +340,7 @@ pub struct Params { } /// DelegationResponse is equivalent to Delegation except that it contains a /// balance in addition to shares which is more suitable for client responses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegationResponse { #[prost(message, optional, tag = "1")] @@ -321,6 +351,7 @@ pub struct DelegationResponse { /// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it /// contains a balance in addition to shares which is more suitable for client /// responses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegationEntryResponse { #[prost(message, optional, tag = "1")] @@ -331,6 +362,7 @@ pub struct RedelegationEntryResponse { /// RedelegationResponse is equivalent to a Redelegation except that its entries /// contain a balance in addition to shares which is more suitable for client /// responses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegationResponse { #[prost(message, optional, tag = "1")] @@ -340,6 +372,7 @@ pub struct RedelegationResponse { } /// Pool is used for tracking bonded and not-bonded token supply of the bond /// denomination. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pool { #[prost(string, tag = "1")] @@ -373,8 +406,19 @@ impl BondStatus { BondStatus::Bonded => "BOND_STATUS_BONDED", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BOND_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "BOND_STATUS_UNBONDED" => Some(Self::Unbonded), + "BOND_STATUS_UNBONDING" => Some(Self::Unbonding), + "BOND_STATUS_BONDED" => Some(Self::Bonded), + _ => None, + } + } } /// GenesisState defines the staking module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of related to deposit. @@ -404,6 +448,7 @@ pub struct GenesisState { pub exported: bool, } /// LastValidatorPower required for validator set update logic. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LastValidatorPower { /// address is the address of the validator. @@ -414,6 +459,7 @@ pub struct LastValidatorPower { pub power: i64, } /// QueryValidatorsRequest is request type for Query/Validators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorsRequest { /// status enables to query for validators matching a given status. @@ -424,6 +470,7 @@ pub struct QueryValidatorsRequest { pub pagination: ::core::option::Option, } /// QueryValidatorsResponse is response type for the Query/Validators RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorsResponse { /// validators contains all the queried validators. @@ -434,6 +481,7 @@ pub struct QueryValidatorsResponse { pub pagination: ::core::option::Option, } /// QueryValidatorRequest is response type for the Query/Validator RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorRequest { /// validator_addr defines the validator address to query for. @@ -441,6 +489,7 @@ pub struct QueryValidatorRequest { pub validator_addr: ::prost::alloc::string::String, } /// QueryValidatorResponse is response type for the Query/Validator RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorResponse { /// validator defines the validator info. @@ -449,6 +498,7 @@ pub struct QueryValidatorResponse { } /// QueryValidatorDelegationsRequest is request type for the /// Query/ValidatorDelegations RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorDelegationsRequest { /// validator_addr defines the validator address to query for. @@ -460,6 +510,7 @@ pub struct QueryValidatorDelegationsRequest { } /// QueryValidatorDelegationsResponse is response type for the /// Query/ValidatorDelegations RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorDelegationsResponse { #[prost(message, repeated, tag = "1")] @@ -470,6 +521,7 @@ pub struct QueryValidatorDelegationsResponse { } /// QueryValidatorUnbondingDelegationsRequest is required type for the /// Query/ValidatorUnbondingDelegations RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorUnbondingDelegationsRequest { /// validator_addr defines the validator address to query for. @@ -481,6 +533,7 @@ pub struct QueryValidatorUnbondingDelegationsRequest { } /// QueryValidatorUnbondingDelegationsResponse is response type for the /// Query/ValidatorUnbondingDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorUnbondingDelegationsResponse { #[prost(message, repeated, tag = "1")] @@ -490,6 +543,7 @@ pub struct QueryValidatorUnbondingDelegationsResponse { pub pagination: ::core::option::Option, } /// QueryDelegationRequest is request type for the Query/Delegation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationRequest { /// delegator_addr defines the delegator address to query for. @@ -500,6 +554,7 @@ pub struct QueryDelegationRequest { pub validator_addr: ::prost::alloc::string::String, } /// QueryDelegationResponse is response type for the Query/Delegation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationResponse { /// delegation_responses defines the delegation info of a delegation. @@ -508,6 +563,7 @@ pub struct QueryDelegationResponse { } /// QueryUnbondingDelegationRequest is request type for the /// Query/UnbondingDelegation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryUnbondingDelegationRequest { /// delegator_addr defines the delegator address to query for. @@ -519,6 +575,7 @@ pub struct QueryUnbondingDelegationRequest { } /// QueryDelegationResponse is response type for the Query/UnbondingDelegation /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryUnbondingDelegationResponse { /// unbond defines the unbonding information of a delegation. @@ -527,6 +584,7 @@ pub struct QueryUnbondingDelegationResponse { } /// QueryDelegatorDelegationsRequest is request type for the /// Query/DelegatorDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorDelegationsRequest { /// delegator_addr defines the delegator address to query for. @@ -538,6 +596,7 @@ pub struct QueryDelegatorDelegationsRequest { } /// QueryDelegatorDelegationsResponse is response type for the /// Query/DelegatorDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorDelegationsResponse { /// delegation_responses defines all the delegations' info of a delegator. @@ -549,6 +608,7 @@ pub struct QueryDelegatorDelegationsResponse { } /// QueryDelegatorUnbondingDelegationsRequest is request type for the /// Query/DelegatorUnbondingDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorUnbondingDelegationsRequest { /// delegator_addr defines the delegator address to query for. @@ -560,6 +620,7 @@ pub struct QueryDelegatorUnbondingDelegationsRequest { } /// QueryUnbondingDelegatorDelegationsResponse is response type for the /// Query/UnbondingDelegatorDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorUnbondingDelegationsResponse { #[prost(message, repeated, tag = "1")] @@ -570,6 +631,7 @@ pub struct QueryDelegatorUnbondingDelegationsResponse { } /// QueryRedelegationsRequest is request type for the Query/Redelegations RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRedelegationsRequest { /// delegator_addr defines the delegator address to query for. @@ -587,6 +649,7 @@ pub struct QueryRedelegationsRequest { } /// QueryRedelegationsResponse is response type for the Query/Redelegations RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRedelegationsResponse { #[prost(message, repeated, tag = "1")] @@ -597,6 +660,7 @@ pub struct QueryRedelegationsResponse { } /// QueryDelegatorValidatorsRequest is request type for the /// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorsRequest { /// delegator_addr defines the delegator address to query for. @@ -608,6 +672,7 @@ pub struct QueryDelegatorValidatorsRequest { } /// QueryDelegatorValidatorsResponse is response type for the /// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorsResponse { /// validators defines the validators' info of a delegator. @@ -619,6 +684,7 @@ pub struct QueryDelegatorValidatorsResponse { } /// QueryDelegatorValidatorRequest is request type for the /// Query/DelegatorValidator RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorRequest { /// delegator_addr defines the delegator address to query for. @@ -630,6 +696,7 @@ pub struct QueryDelegatorValidatorRequest { } /// QueryDelegatorValidatorResponse response type for the /// Query/DelegatorValidator RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorResponse { /// validator defines the validator info. @@ -638,6 +705,7 @@ pub struct QueryDelegatorValidatorResponse { } /// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryHistoricalInfoRequest { /// height defines at which height to query the historical info. @@ -646,6 +714,7 @@ pub struct QueryHistoricalInfoRequest { } /// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryHistoricalInfoResponse { /// hist defines the historical info at the given height. @@ -653,9 +722,11 @@ pub struct QueryHistoricalInfoResponse { pub hist: ::core::option::Option, } /// QueryPoolRequest is request type for the Query/Pool RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPoolRequest {} /// QueryPoolResponse is response type for the Query/Pool RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPoolResponse { /// pool defines the pool info. @@ -663,9 +734,11 @@ pub struct QueryPoolResponse { pub pool: ::core::option::Option, } /// QueryParamsRequest is request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params holds all the parameters of this module. @@ -673,6 +746,7 @@ pub struct QueryParamsResponse { pub params: ::core::option::Option, } /// MsgCreateValidator defines a SDK message for creating a new validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateValidator { #[prost(message, optional, tag = "1")] @@ -691,9 +765,11 @@ pub struct MsgCreateValidator { pub value: ::core::option::Option, } /// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateValidatorResponse {} /// MsgEditValidator defines a SDK message for editing an existing validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgEditValidator { #[prost(message, optional, tag = "1")] @@ -710,10 +786,12 @@ pub struct MsgEditValidator { pub min_self_delegation: ::prost::alloc::string::String, } /// MsgEditValidatorResponse defines the Msg/EditValidator response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgEditValidatorResponse {} /// MsgDelegate defines a SDK message for performing a delegation of coins /// from a delegator to a validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDelegate { #[prost(string, tag = "1")] @@ -724,10 +802,12 @@ pub struct MsgDelegate { pub amount: ::core::option::Option, } /// MsgDelegateResponse defines the Msg/Delegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDelegateResponse {} /// MsgBeginRedelegate defines a SDK message for performing a redelegation /// of coins from a delegator and source validator to a destination validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgBeginRedelegate { #[prost(string, tag = "1")] @@ -740,6 +820,7 @@ pub struct MsgBeginRedelegate { pub amount: ::core::option::Option, } /// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgBeginRedelegateResponse { #[prost(message, optional, tag = "1")] @@ -747,6 +828,7 @@ pub struct MsgBeginRedelegateResponse { } /// MsgUndelegate defines a SDK message for performing an undelegation from a /// delegate and a validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUndelegate { #[prost(string, tag = "1")] @@ -757,6 +839,7 @@ pub struct MsgUndelegate { pub amount: ::core::option::Option, } /// MsgUndelegateResponse defines the Msg/Undelegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUndelegateResponse { #[prost(message, optional, tag = "1")] @@ -765,6 +848,7 @@ pub struct MsgUndelegateResponse { /// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUnbondingDelegation { #[prost(string, tag = "1")] @@ -781,6 +865,7 @@ pub struct MsgCancelUnbondingDelegation { /// MsgCancelUnbondingDelegationResponse /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUnbondingDelegationResponse {} include!("cosmos.staking.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs index d628fbef..5cc2941d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs @@ -40,10 +40,9 @@ impl<'de> serde::Deserialize<'de> for AuthorizationType { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(AuthorizationType::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -53,10 +52,9 @@ impl<'de> serde::Deserialize<'de> for AuthorizationType { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(AuthorizationType::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -119,10 +117,9 @@ impl<'de> serde::Deserialize<'de> for BondStatus { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(BondStatus::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -132,10 +129,9 @@ impl<'de> serde::Deserialize<'de> for BondStatus { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(BondStatus::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -242,25 +238,25 @@ impl<'de> serde::Deserialize<'de> for Commission { formatter.write_str("struct cosmos.staking.v1beta1.Commission") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut commission_rates__ = None; let mut update_time__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::CommissionRates => { if commission_rates__.is_some() { return Err(serde::de::Error::duplicate_field("commissionRates")); } - commission_rates__ = map.next_value()?; + commission_rates__ = map_.next_value()?; } GeneratedField::UpdateTime => { if update_time__.is_some() { return Err(serde::de::Error::duplicate_field("updateTime")); } - update_time__ = map.next_value()?; + update_time__ = map_.next_value()?; } } } @@ -371,32 +367,32 @@ impl<'de> serde::Deserialize<'de> for CommissionRates { formatter.write_str("struct cosmos.staking.v1beta1.CommissionRates") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut rate__ = None; let mut max_rate__ = None; let mut max_change_rate__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Rate => { if rate__.is_some() { return Err(serde::de::Error::duplicate_field("rate")); } - rate__ = Some(map.next_value()?); + rate__ = Some(map_.next_value()?); } GeneratedField::MaxRate => { if max_rate__.is_some() { return Err(serde::de::Error::duplicate_field("maxRate")); } - max_rate__ = Some(map.next_value()?); + max_rate__ = Some(map_.next_value()?); } GeneratedField::MaxChangeRate => { if max_change_rate__.is_some() { return Err(serde::de::Error::duplicate_field("maxChangeRate")); } - max_change_rate__ = Some(map.next_value()?); + max_change_rate__ = Some(map_.next_value()?); } } } @@ -500,25 +496,25 @@ impl<'de> serde::Deserialize<'de> for DvPair { formatter.write_str("struct cosmos.staking.v1beta1.DVPair") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut validator_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } } } @@ -600,18 +596,18 @@ impl<'de> serde::Deserialize<'de> for DvPairs { formatter.write_str("struct cosmos.staking.v1beta1.DVPairs") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pairs__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pairs => { if pairs__.is_some() { return Err(serde::de::Error::duplicate_field("pairs")); } - pairs__ = Some(map.next_value()?); + pairs__ = Some(map_.next_value()?); } } } @@ -722,20 +718,20 @@ impl<'de> serde::Deserialize<'de> for DvvTriplet { formatter.write_str("struct cosmos.staking.v1beta1.DVVTriplet") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut validator_src_address__ = None; let mut validator_dst_address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorSrcAddress => { if validator_src_address__.is_some() { @@ -743,7 +739,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplet { "validatorSrcAddress", )); } - validator_src_address__ = Some(map.next_value()?); + validator_src_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorDstAddress => { if validator_dst_address__.is_some() { @@ -751,7 +747,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplet { "validatorDstAddress", )); } - validator_dst_address__ = Some(map.next_value()?); + validator_dst_address__ = Some(map_.next_value()?); } } } @@ -839,18 +835,18 @@ impl<'de> serde::Deserialize<'de> for DvvTriplets { formatter.write_str("struct cosmos.staking.v1beta1.DVVTriplets") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut triplets__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Triplets => { if triplets__.is_some() { return Err(serde::de::Error::duplicate_field("triplets")); } - triplets__ = Some(map.next_value()?); + triplets__ = Some(map_.next_value()?); } } } @@ -962,32 +958,32 @@ impl<'de> serde::Deserialize<'de> for Delegation { formatter.write_str("struct cosmos.staking.v1beta1.Delegation") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut validator_address__ = None; let mut shares__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Shares => { if shares__.is_some() { return Err(serde::de::Error::duplicate_field("shares")); } - shares__ = Some(map.next_value()?); + shares__ = Some(map_.next_value()?); } } } @@ -1083,25 +1079,25 @@ impl<'de> serde::Deserialize<'de> for DelegationResponse { formatter.write_str("struct cosmos.staking.v1beta1.DelegationResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegation__ = None; let mut balance__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Delegation => { if delegation__.is_some() { return Err(serde::de::Error::duplicate_field("delegation")); } - delegation__ = map.next_value()?; + delegation__ = map_.next_value()?; } GeneratedField::Balance => { if balance__.is_some() { return Err(serde::de::Error::duplicate_field("balance")); } - balance__ = map.next_value()?; + balance__ = map_.next_value()?; } } } @@ -1229,7 +1225,7 @@ impl<'de> serde::Deserialize<'de> for Description { formatter.write_str("struct cosmos.staking.v1beta1.Description") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1238,37 +1234,37 @@ impl<'de> serde::Deserialize<'de> for Description { let mut website__ = None; let mut security_contact__ = None; let mut details__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Moniker => { if moniker__.is_some() { return Err(serde::de::Error::duplicate_field("moniker")); } - moniker__ = Some(map.next_value()?); + moniker__ = Some(map_.next_value()?); } GeneratedField::Identity => { if identity__.is_some() { return Err(serde::de::Error::duplicate_field("identity")); } - identity__ = Some(map.next_value()?); + identity__ = Some(map_.next_value()?); } GeneratedField::Website => { if website__.is_some() { return Err(serde::de::Error::duplicate_field("website")); } - website__ = Some(map.next_value()?); + website__ = Some(map_.next_value()?); } GeneratedField::SecurityContact => { if security_contact__.is_some() { return Err(serde::de::Error::duplicate_field("securityContact")); } - security_contact__ = Some(map.next_value()?); + security_contact__ = Some(map_.next_value()?); } GeneratedField::Details => { if details__.is_some() { return Err(serde::de::Error::duplicate_field("details")); } - details__ = Some(map.next_value()?); + details__ = Some(map_.next_value()?); } } } @@ -1326,6 +1322,7 @@ impl serde::Serialize for GenesisState { struct_ser.serialize_field("params", v)?; } if !self.last_total_power.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "lastTotalPower", pbjson::private::base64::encode(&self.last_total_power).as_str(), @@ -1435,7 +1432,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { formatter.write_str("struct cosmos.staking.v1beta1.GenesisState") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1447,20 +1444,20 @@ impl<'de> serde::Deserialize<'de> for GenesisState { let mut unbonding_delegations__ = None; let mut redelegations__ = None; let mut exported__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } GeneratedField::LastTotalPower => { if last_total_power__.is_some() { return Err(serde::de::Error::duplicate_field("lastTotalPower")); } last_total_power__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -1470,19 +1467,19 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "lastValidatorPowers", )); } - last_validator_powers__ = Some(map.next_value()?); + last_validator_powers__ = Some(map_.next_value()?); } GeneratedField::Validators => { if validators__.is_some() { return Err(serde::de::Error::duplicate_field("validators")); } - validators__ = Some(map.next_value()?); + validators__ = Some(map_.next_value()?); } GeneratedField::Delegations => { if delegations__.is_some() { return Err(serde::de::Error::duplicate_field("delegations")); } - delegations__ = Some(map.next_value()?); + delegations__ = Some(map_.next_value()?); } GeneratedField::UnbondingDelegations => { if unbonding_delegations__.is_some() { @@ -1490,19 +1487,19 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "unbondingDelegations", )); } - unbonding_delegations__ = Some(map.next_value()?); + unbonding_delegations__ = Some(map_.next_value()?); } GeneratedField::Redelegations => { if redelegations__.is_some() { return Err(serde::de::Error::duplicate_field("redelegations")); } - redelegations__ = Some(map.next_value()?); + redelegations__ = Some(map_.next_value()?); } GeneratedField::Exported => { if exported__.is_some() { return Err(serde::de::Error::duplicate_field("exported")); } - exported__ = Some(map.next_value()?); + exported__ = Some(map_.next_value()?); } } } @@ -1603,25 +1600,25 @@ impl<'de> serde::Deserialize<'de> for HistoricalInfo { formatter.write_str("struct cosmos.staking.v1beta1.HistoricalInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut header__ = None; let mut valset__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Header => { if header__.is_some() { return Err(serde::de::Error::duplicate_field("header")); } - header__ = map.next_value()?; + header__ = map_.next_value()?; } GeneratedField::Valset => { if valset__.is_some() { return Err(serde::de::Error::duplicate_field("valset")); } - valset__ = Some(map.next_value()?); + valset__ = Some(map_.next_value()?); } } } @@ -1658,6 +1655,7 @@ impl serde::Serialize for LastValidatorPower { struct_ser.serialize_field("address", &self.address)?; } if self.power != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("power", ToString::to_string(&self.power).as_str())?; } struct_ser.end() @@ -1716,26 +1714,26 @@ impl<'de> serde::Deserialize<'de> for LastValidatorPower { formatter.write_str("struct cosmos.staking.v1beta1.LastValidatorPower") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut power__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::Power => { if power__.is_some() { return Err(serde::de::Error::duplicate_field("power")); } power__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1862,7 +1860,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { formatter.write_str("struct cosmos.staking.v1beta1.MsgBeginRedelegate") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1870,13 +1868,13 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { let mut validator_src_address__ = None; let mut validator_dst_address__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorSrcAddress => { if validator_src_address__.is_some() { @@ -1884,7 +1882,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { "validatorSrcAddress", )); } - validator_src_address__ = Some(map.next_value()?); + validator_src_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorDstAddress => { if validator_dst_address__.is_some() { @@ -1892,13 +1890,13 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { "validatorDstAddress", )); } - validator_dst_address__ = Some(map.next_value()?); + validator_dst_address__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = map.next_value()?; + amount__ = map_.next_value()?; } } } @@ -1991,19 +1989,19 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut completion_time__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::CompletionTime => { if completion_time__.is_some() { return Err(serde::de::Error::duplicate_field("completionTime")); } - completion_time__ = map.next_value()?; + completion_time__ = map_.next_value()?; } } } @@ -2051,6 +2049,7 @@ impl serde::Serialize for MsgCancelUnbondingDelegation { struct_ser.serialize_field("amount", v)?; } if self.creation_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "creationHeight", ToString::to_string(&self.creation_height).as_str(), @@ -2132,7 +2131,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -2141,32 +2140,32 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { let mut validator_address__ = None; let mut amount__ = None; let mut creation_height__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = map.next_value()?; + amount__ = map_.next_value()?; } GeneratedField::CreationHeight => { if creation_height__.is_some() { return Err(serde::de::Error::duplicate_field("creationHeight")); } creation_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2251,13 +2250,13 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgCancelUnbondingDelegationResponse {}) } @@ -2404,7 +2403,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidator { formatter.write_str("struct cosmos.staking.v1beta1.MsgCreateValidator") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2415,49 +2414,49 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidator { let mut validator_address__ = None; let mut pubkey__ = None; let mut value__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = map.next_value()?; + description__ = map_.next_value()?; } GeneratedField::Commission => { if commission__.is_some() { return Err(serde::de::Error::duplicate_field("commission")); } - commission__ = map.next_value()?; + commission__ = map_.next_value()?; } GeneratedField::MinSelfDelegation => { if min_self_delegation__.is_some() { return Err(serde::de::Error::duplicate_field("minSelfDelegation")); } - min_self_delegation__ = Some(map.next_value()?); + min_self_delegation__ = Some(map_.next_value()?); } GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Pubkey => { if pubkey__.is_some() { return Err(serde::de::Error::duplicate_field("pubkey")); } - pubkey__ = map.next_value()?; + pubkey__ = map_.next_value()?; } GeneratedField::Value => { if value__.is_some() { return Err(serde::de::Error::duplicate_field("value")); } - value__ = map.next_value()?; + value__ = map_.next_value()?; } } } @@ -2540,13 +2539,13 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgCreateValidatorResponse {}) } @@ -2654,32 +2653,32 @@ impl<'de> serde::Deserialize<'de> for MsgDelegate { formatter.write_str("struct cosmos.staking.v1beta1.MsgDelegate") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut validator_address__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = map.next_value()?; + amount__ = map_.next_value()?; } } } @@ -2756,12 +2755,12 @@ impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { formatter.write_str("struct cosmos.staking.v1beta1.MsgDelegateResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgDelegateResponse {}) } @@ -2881,7 +2880,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidator { formatter.write_str("struct cosmos.staking.v1beta1.MsgEditValidator") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2889,31 +2888,31 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidator { let mut validator_address__ = None; let mut commission_rate__ = None; let mut min_self_delegation__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = map.next_value()?; + description__ = map_.next_value()?; } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::CommissionRate => { if commission_rate__.is_some() { return Err(serde::de::Error::duplicate_field("commissionRate")); } - commission_rate__ = Some(map.next_value()?); + commission_rate__ = Some(map_.next_value()?); } GeneratedField::MinSelfDelegation => { if min_self_delegation__.is_some() { return Err(serde::de::Error::duplicate_field("minSelfDelegation")); } - min_self_delegation__ = Some(map.next_value()?); + min_self_delegation__ = Some(map_.next_value()?); } } } @@ -2993,13 +2992,13 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgEditValidatorResponse {}) } @@ -3107,32 +3106,32 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegate { formatter.write_str("struct cosmos.staking.v1beta1.MsgUndelegate") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut validator_address__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = map.next_value()?; + amount__ = map_.next_value()?; } } } @@ -3224,19 +3223,19 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut completion_time__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::CompletionTime => { if completion_time__.is_some() { return Err(serde::de::Error::duplicate_field("completionTime")); } - completion_time__ = map.next_value()?; + completion_time__ = map_.next_value()?; } } } @@ -3378,7 +3377,7 @@ impl<'de> serde::Deserialize<'de> for Params { formatter.write_str("struct cosmos.staking.v1beta1.Params") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -3388,20 +3387,20 @@ impl<'de> serde::Deserialize<'de> for Params { let mut historical_entries__ = None; let mut bond_denom__ = None; let mut min_commission_rate__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::UnbondingTime => { if unbonding_time__.is_some() { return Err(serde::de::Error::duplicate_field("unbondingTime")); } - unbonding_time__ = map.next_value()?; + unbonding_time__ = map_.next_value()?; } GeneratedField::MaxValidators => { if max_validators__.is_some() { return Err(serde::de::Error::duplicate_field("maxValidators")); } max_validators__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3410,7 +3409,7 @@ impl<'de> serde::Deserialize<'de> for Params { return Err(serde::de::Error::duplicate_field("maxEntries")); } max_entries__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3419,7 +3418,7 @@ impl<'de> serde::Deserialize<'de> for Params { return Err(serde::de::Error::duplicate_field("historicalEntries")); } historical_entries__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3427,13 +3426,13 @@ impl<'de> serde::Deserialize<'de> for Params { if bond_denom__.is_some() { return Err(serde::de::Error::duplicate_field("bondDenom")); } - bond_denom__ = Some(map.next_value()?); + bond_denom__ = Some(map_.next_value()?); } GeneratedField::MinCommissionRate => { if min_commission_rate__.is_some() { return Err(serde::de::Error::duplicate_field("minCommissionRate")); } - min_commission_rate__ = Some(map.next_value()?); + min_commission_rate__ = Some(map_.next_value()?); } } } @@ -3534,25 +3533,25 @@ impl<'de> serde::Deserialize<'de> for Pool { formatter.write_str("struct cosmos.staking.v1beta1.Pool") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut not_bonded_tokens__ = None; let mut bonded_tokens__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::NotBondedTokens => { if not_bonded_tokens__.is_some() { return Err(serde::de::Error::duplicate_field("notBondedTokens")); } - not_bonded_tokens__ = Some(map.next_value()?); + not_bonded_tokens__ = Some(map_.next_value()?); } GeneratedField::BondedTokens => { if bonded_tokens__.is_some() { return Err(serde::de::Error::duplicate_field("bondedTokens")); } - bonded_tokens__ = Some(map.next_value()?); + bonded_tokens__ = Some(map_.next_value()?); } } } @@ -3650,26 +3649,26 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_addr__ = None; let mut validator_addr__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddr => { if delegator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddr")); } - delegator_addr__ = Some(map.next_value()?); + delegator_addr__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddr => { if validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddr")); } - validator_addr__ = Some(map.next_value()?); + validator_addr__ = Some(map_.next_value()?); } } } @@ -3760,13 +3759,13 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegation_response__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegationResponse => { if delegation_response__.is_some() { @@ -3774,7 +3773,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { "delegationResponse", )); } - delegation_response__ = map.next_value()?; + delegation_response__ = map_.next_value()?; } } } @@ -3873,26 +3872,26 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_addr__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddr => { if delegator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddr")); } - delegator_addr__ = Some(map.next_value()?); + delegator_addr__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -3994,14 +3993,14 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegation_responses__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegationResponses => { if delegation_responses__.is_some() { @@ -4009,13 +4008,13 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { "delegationResponses", )); } - delegation_responses__ = Some(map.next_value()?); + delegation_responses__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -4116,26 +4115,26 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_addr__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddr => { if delegator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddr")); } - delegator_addr__ = Some(map.next_value()?); + delegator_addr__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -4238,14 +4237,14 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut unbonding_responses__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::UnbondingResponses => { if unbonding_responses__.is_some() { @@ -4253,13 +4252,13 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse "unbondingResponses", )); } - unbonding_responses__ = Some(map.next_value()?); + unbonding_responses__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -4361,26 +4360,26 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_addr__ = None; let mut validator_addr__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddr => { if delegator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddr")); } - delegator_addr__ = Some(map.next_value()?); + delegator_addr__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddr => { if validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddr")); } - validator_addr__ = Some(map.next_value()?); + validator_addr__ = Some(map_.next_value()?); } } } @@ -4471,19 +4470,19 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Validator => { if validator__.is_some() { return Err(serde::de::Error::duplicate_field("validator")); } - validator__ = map.next_value()?; + validator__ = map_.next_value()?; } } } @@ -4581,26 +4580,26 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_addr__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddr => { if delegator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddr")); } - delegator_addr__ = Some(map.next_value()?); + delegator_addr__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -4700,26 +4699,26 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validators__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Validators => { if validators__.is_some() { return Err(serde::de::Error::duplicate_field("validators")); } - validators__ = Some(map.next_value()?); + validators__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -4750,6 +4749,7 @@ impl serde::Serialize for QueryHistoricalInfoRequest { let mut struct_ser = serializer .serialize_struct("cosmos.staking.v1beta1.QueryHistoricalInfoRequest", len)?; if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } struct_ser.end() @@ -4808,20 +4808,20 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut height__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -4911,19 +4911,19 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut hist__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Hist => { if hist__.is_some() { return Err(serde::de::Error::duplicate_field("hist")); } - hist__ = map.next_value()?; + hist__ = map_.next_value()?; } } } @@ -4996,12 +4996,12 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { formatter.write_str("struct cosmos.staking.v1beta1.QueryParamsRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryParamsRequest {}) } @@ -5083,18 +5083,18 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { formatter.write_str("struct cosmos.staking.v1beta1.QueryParamsResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut params__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Params => { if params__.is_some() { return Err(serde::de::Error::duplicate_field("params")); } - params__ = map.next_value()?; + params__ = map_.next_value()?; } } } @@ -5167,12 +5167,12 @@ impl<'de> serde::Deserialize<'de> for QueryPoolRequest { formatter.write_str("struct cosmos.staking.v1beta1.QueryPoolRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryPoolRequest {}) } @@ -5254,18 +5254,18 @@ impl<'de> serde::Deserialize<'de> for QueryPoolResponse { formatter.write_str("struct cosmos.staking.v1beta1.QueryPoolResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut pool__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Pool => { if pool__.is_some() { return Err(serde::de::Error::duplicate_field("pool")); } - pool__ = map.next_value()?; + pool__ = map_.next_value()?; } } } @@ -5387,7 +5387,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -5396,31 +5396,31 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { let mut src_validator_addr__ = None; let mut dst_validator_addr__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddr => { if delegator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddr")); } - delegator_addr__ = Some(map.next_value()?); + delegator_addr__ = Some(map_.next_value()?); } GeneratedField::SrcValidatorAddr => { if src_validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("srcValidatorAddr")); } - src_validator_addr__ = Some(map.next_value()?); + src_validator_addr__ = Some(map_.next_value()?); } GeneratedField::DstValidatorAddr => { if dst_validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("dstValidatorAddr")); } - dst_validator_addr__ = Some(map.next_value()?); + dst_validator_addr__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -5525,14 +5525,14 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut redelegation_responses__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::RedelegationResponses => { if redelegation_responses__.is_some() { @@ -5540,13 +5540,13 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { "redelegationResponses", )); } - redelegation_responses__ = Some(map.next_value()?); + redelegation_responses__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -5650,26 +5650,26 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_addr__ = None; let mut validator_addr__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddr => { if delegator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddr")); } - delegator_addr__ = Some(map.next_value()?); + delegator_addr__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddr => { if validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddr")); } - validator_addr__ = Some(map.next_value()?); + validator_addr__ = Some(map_.next_value()?); } } } @@ -5761,19 +5761,19 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut unbond__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Unbond => { if unbond__.is_some() { return Err(serde::de::Error::duplicate_field("unbond")); } - unbond__ = map.next_value()?; + unbond__ = map_.next_value()?; } } } @@ -5870,26 +5870,26 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_addr__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddr => { if validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddr")); } - validator_addr__ = Some(map.next_value()?); + validator_addr__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -5991,14 +5991,14 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegation_responses__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegationResponses => { if delegation_responses__.is_some() { @@ -6006,13 +6006,13 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { "delegationResponses", )); } - delegation_responses__ = Some(map.next_value()?); + delegation_responses__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6101,19 +6101,19 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_addr__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddr => { if validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddr")); } - validator_addr__ = Some(map.next_value()?); + validator_addr__ = Some(map_.next_value()?); } } } @@ -6201,19 +6201,19 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Validator => { if validator__.is_some() { return Err(serde::de::Error::duplicate_field("validator")); } - validator__ = map.next_value()?; + validator__ = map_.next_value()?; } } } @@ -6313,26 +6313,26 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validator_addr__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ValidatorAddr => { if validator_addr__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddr")); } - validator_addr__ = Some(map.next_value()?); + validator_addr__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6435,14 +6435,14 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut unbonding_responses__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::UnbondingResponses => { if unbonding_responses__.is_some() { @@ -6450,13 +6450,13 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse "unbondingResponses", )); } - unbonding_responses__ = Some(map.next_value()?); + unbonding_responses__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6553,26 +6553,26 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut status__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Status => { if status__.is_some() { return Err(serde::de::Error::duplicate_field("status")); } - status__ = Some(map.next_value()?); + status__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6669,26 +6669,26 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut validators__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Validators => { if validators__.is_some() { return Err(serde::de::Error::duplicate_field("validators")); } - validators__ = Some(map.next_value()?); + validators__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -6813,7 +6813,7 @@ impl<'de> serde::Deserialize<'de> for Redelegation { formatter.write_str("struct cosmos.staking.v1beta1.Redelegation") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -6821,13 +6821,13 @@ impl<'de> serde::Deserialize<'de> for Redelegation { let mut validator_src_address__ = None; let mut validator_dst_address__ = None; let mut entries__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorSrcAddress => { if validator_src_address__.is_some() { @@ -6835,7 +6835,7 @@ impl<'de> serde::Deserialize<'de> for Redelegation { "validatorSrcAddress", )); } - validator_src_address__ = Some(map.next_value()?); + validator_src_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorDstAddress => { if validator_dst_address__.is_some() { @@ -6843,13 +6843,13 @@ impl<'de> serde::Deserialize<'de> for Redelegation { "validatorDstAddress", )); } - validator_dst_address__ = Some(map.next_value()?); + validator_dst_address__ = Some(map_.next_value()?); } GeneratedField::Entries => { if entries__.is_some() { return Err(serde::de::Error::duplicate_field("entries")); } - entries__ = Some(map.next_value()?); + entries__ = Some(map_.next_value()?); } } } @@ -6891,6 +6891,7 @@ impl serde::Serialize for RedelegationEntry { let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.RedelegationEntry", len)?; if self.creation_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "creationHeight", ToString::to_string(&self.creation_height).as_str(), @@ -6980,7 +6981,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntry { formatter.write_str("struct cosmos.staking.v1beta1.RedelegationEntry") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -6988,14 +6989,14 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntry { let mut completion_time__ = None; let mut initial_balance__ = None; let mut shares_dst__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::CreationHeight => { if creation_height__.is_some() { return Err(serde::de::Error::duplicate_field("creationHeight")); } creation_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -7003,19 +7004,19 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntry { if completion_time__.is_some() { return Err(serde::de::Error::duplicate_field("completionTime")); } - completion_time__ = map.next_value()?; + completion_time__ = map_.next_value()?; } GeneratedField::InitialBalance => { if initial_balance__.is_some() { return Err(serde::de::Error::duplicate_field("initialBalance")); } - initial_balance__ = Some(map.next_value()?); + initial_balance__ = Some(map_.next_value()?); } GeneratedField::SharesDst => { if shares_dst__.is_some() { return Err(serde::de::Error::duplicate_field("sharesDst")); } - shares_dst__ = Some(map.next_value()?); + shares_dst__ = Some(map_.next_value()?); } } } @@ -7116,26 +7117,26 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut redelegation_entry__ = None; let mut balance__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::RedelegationEntry => { if redelegation_entry__.is_some() { return Err(serde::de::Error::duplicate_field("redelegationEntry")); } - redelegation_entry__ = map.next_value()?; + redelegation_entry__ = map_.next_value()?; } GeneratedField::Balance => { if balance__.is_some() { return Err(serde::de::Error::duplicate_field("balance")); } - balance__ = Some(map.next_value()?); + balance__ = Some(map_.next_value()?); } } } @@ -7230,25 +7231,28 @@ impl<'de> serde::Deserialize<'de> for RedelegationResponse { formatter.write_str("struct cosmos.staking.v1beta1.RedelegationResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut redelegation__ = None; let mut entries__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Redelegation => { if redelegation__.is_some() { return Err(serde::de::Error::duplicate_field("redelegation")); } - redelegation__ = map.next_value()?; + redelegation__ = map_.next_value()?; } GeneratedField::Entries => { if entries__.is_some() { return Err(serde::de::Error::duplicate_field("entries")); } - entries__ = Some(map.next_value()?); + entries__ = Some(map_.next_value()?); } } } @@ -7288,7 +7292,7 @@ impl serde::Serialize for StakeAuthorization { struct_ser.serialize_field("maxTokens", v)?; } if self.authorization_type != 0 { - let v = AuthorizationType::from_i32(self.authorization_type).ok_or_else(|| { + let v = AuthorizationType::try_from(self.authorization_type).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.authorization_type)) })?; struct_ser.serialize_field("authorizationType", &v)?; @@ -7374,33 +7378,33 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { formatter.write_str("struct cosmos.staking.v1beta1.StakeAuthorization") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut max_tokens__ = None; let mut authorization_type__ = None; let mut validators__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::MaxTokens => { if max_tokens__.is_some() { return Err(serde::de::Error::duplicate_field("maxTokens")); } - max_tokens__ = map.next_value()?; + max_tokens__ = map_.next_value()?; } GeneratedField::AuthorizationType => { if authorization_type__.is_some() { return Err(serde::de::Error::duplicate_field("authorizationType")); } authorization_type__ = - Some(map.next_value::()? as i32); + Some(map_.next_value::()? as i32); } GeneratedField::AllowList => { if validators__.is_some() { return Err(serde::de::Error::duplicate_field("allowList")); } - validators__ = map + validators__ = map_ .next_value::<::std::option::Option<_>>()? .map(stake_authorization::Validators::AllowList); } @@ -7408,7 +7412,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { if validators__.is_some() { return Err(serde::de::Error::duplicate_field("denyList")); } - validators__ = map + validators__ = map_ .next_value::<::std::option::Option<_>>()? .map(stake_authorization::Validators::DenyList); } @@ -7500,19 +7504,19 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -7624,32 +7628,32 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegation { formatter.write_str("struct cosmos.staking.v1beta1.UnbondingDelegation") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut delegator_address__ = None; let mut validator_address__ = None; let mut entries__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::DelegatorAddress => { if delegator_address__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorAddress")); } - delegator_address__ = Some(map.next_value()?); + delegator_address__ = Some(map_.next_value()?); } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } - validator_address__ = Some(map.next_value()?); + validator_address__ = Some(map_.next_value()?); } GeneratedField::Entries => { if entries__.is_some() { return Err(serde::de::Error::duplicate_field("entries")); } - entries__ = Some(map.next_value()?); + entries__ = Some(map_.next_value()?); } } } @@ -7690,6 +7694,7 @@ impl serde::Serialize for UnbondingDelegationEntry { let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.UnbondingDelegationEntry", len)?; if self.creation_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "creationHeight", ToString::to_string(&self.creation_height).as_str(), @@ -7780,7 +7785,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -7789,14 +7794,14 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { let mut completion_time__ = None; let mut initial_balance__ = None; let mut balance__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::CreationHeight => { if creation_height__.is_some() { return Err(serde::de::Error::duplicate_field("creationHeight")); } creation_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -7804,19 +7809,19 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { if completion_time__.is_some() { return Err(serde::de::Error::duplicate_field("completionTime")); } - completion_time__ = map.next_value()?; + completion_time__ = map_.next_value()?; } GeneratedField::InitialBalance => { if initial_balance__.is_some() { return Err(serde::de::Error::duplicate_field("initialBalance")); } - initial_balance__ = Some(map.next_value()?); + initial_balance__ = Some(map_.next_value()?); } GeneratedField::Balance => { if balance__.is_some() { return Err(serde::de::Error::duplicate_field("balance")); } - balance__ = Some(map.next_value()?); + balance__ = Some(map_.next_value()?); } } } @@ -7905,18 +7910,18 @@ impl<'de> serde::Deserialize<'de> for ValAddresses { formatter.write_str("struct cosmos.staking.v1beta1.ValAddresses") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut addresses__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Addresses => { if addresses__.is_some() { return Err(serde::de::Error::duplicate_field("addresses")); } - addresses__ = Some(map.next_value()?); + addresses__ = Some(map_.next_value()?); } } } @@ -7985,7 +7990,7 @@ impl serde::Serialize for Validator { struct_ser.serialize_field("jailed", &self.jailed)?; } if self.status != 0 { - let v = BondStatus::from_i32(self.status).ok_or_else(|| { + let v = BondStatus::try_from(self.status).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.status)) })?; struct_ser.serialize_field("status", &v)?; @@ -8000,6 +8005,7 @@ impl serde::Serialize for Validator { struct_ser.serialize_field("description", v)?; } if self.unbonding_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "unbondingHeight", ToString::to_string(&self.unbonding_height).as_str(), @@ -8116,7 +8122,7 @@ impl<'de> serde::Deserialize<'de> for Validator { formatter.write_str("struct cosmos.staking.v1beta1.Validator") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -8131,56 +8137,56 @@ impl<'de> serde::Deserialize<'de> for Validator { let mut unbonding_time__ = None; let mut commission__ = None; let mut min_self_delegation__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::OperatorAddress => { if operator_address__.is_some() { return Err(serde::de::Error::duplicate_field("operatorAddress")); } - operator_address__ = Some(map.next_value()?); + operator_address__ = Some(map_.next_value()?); } GeneratedField::ConsensusPubkey => { if consensus_pubkey__.is_some() { return Err(serde::de::Error::duplicate_field("consensusPubkey")); } - consensus_pubkey__ = map.next_value()?; + consensus_pubkey__ = map_.next_value()?; } GeneratedField::Jailed => { if jailed__.is_some() { return Err(serde::de::Error::duplicate_field("jailed")); } - jailed__ = Some(map.next_value()?); + jailed__ = Some(map_.next_value()?); } GeneratedField::Status => { if status__.is_some() { return Err(serde::de::Error::duplicate_field("status")); } - status__ = Some(map.next_value::()? as i32); + status__ = Some(map_.next_value::()? as i32); } GeneratedField::Tokens => { if tokens__.is_some() { return Err(serde::de::Error::duplicate_field("tokens")); } - tokens__ = Some(map.next_value()?); + tokens__ = Some(map_.next_value()?); } GeneratedField::DelegatorShares => { if delegator_shares__.is_some() { return Err(serde::de::Error::duplicate_field("delegatorShares")); } - delegator_shares__ = Some(map.next_value()?); + delegator_shares__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = map.next_value()?; + description__ = map_.next_value()?; } GeneratedField::UnbondingHeight => { if unbonding_height__.is_some() { return Err(serde::de::Error::duplicate_field("unbondingHeight")); } unbonding_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -8188,19 +8194,19 @@ impl<'de> serde::Deserialize<'de> for Validator { if unbonding_time__.is_some() { return Err(serde::de::Error::duplicate_field("unbondingTime")); } - unbonding_time__ = map.next_value()?; + unbonding_time__ = map_.next_value()?; } GeneratedField::Commission => { if commission__.is_some() { return Err(serde::de::Error::duplicate_field("commission")); } - commission__ = map.next_value()?; + commission__ = map_.next_value()?; } GeneratedField::MinSelfDelegation => { if min_self_delegation__.is_some() { return Err(serde::de::Error::duplicate_field("minSelfDelegation")); } - min_self_delegation__ = Some(map.next_value()?); + min_self_delegation__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs index 1493cf16..b3a7a525 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// SignatureDescriptors wraps multiple SignatureDescriptor's. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignatureDescriptors { /// signatures are the signature descriptors @@ -10,6 +11,7 @@ pub struct SignatureDescriptors { /// a signature including the public key of the signer, signing modes and the /// signature itself. It is primarily used for coordinating signatures between /// clients. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignatureDescriptor { /// public_key is the public key of the signer @@ -26,6 +28,7 @@ pub struct SignatureDescriptor { /// Nested message and enum types in `SignatureDescriptor`. pub mod signature_descriptor { /// Data represents signature data + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Data { /// sum is the oneof that specifies whether this represents single or multi-signature data @@ -35,6 +38,7 @@ pub mod signature_descriptor { /// Nested message and enum types in `Data`. pub mod data { /// Single is the signature data for a single signer + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Single { /// mode is the signing mode of the single signer @@ -45,6 +49,7 @@ pub mod signature_descriptor { pub signature: ::prost::alloc::vec::Vec, } /// Multi is the signature data for a multisig public key + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Multi { /// bitarray specifies which keys within the multisig are signing @@ -57,6 +62,7 @@ pub mod signature_descriptor { pub signatures: ::prost::alloc::vec::Vec, } /// sum is the oneof that specifies whether this represents single or multi-signature data + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Sum { /// single represents a single signer @@ -126,6 +132,18 @@ impl SignMode { SignMode::Eip191 => "SIGN_MODE_EIP_191", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SIGN_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "SIGN_MODE_DIRECT" => Some(Self::Direct), + "SIGN_MODE_TEXTUAL" => Some(Self::Textual), + "SIGN_MODE_DIRECT_AUX" => Some(Self::DirectAux), + "SIGN_MODE_LEGACY_AMINO_JSON" => Some(Self::LegacyAminoJson), + "SIGN_MODE_EIP_191" => Some(Self::Eip191), + _ => None, + } + } } include!("cosmos.tx.signing.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs index ea3d0f45..a4319c36 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs @@ -44,10 +44,9 @@ impl<'de> serde::Deserialize<'de> for SignMode { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(SignMode::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -57,10 +56,9 @@ impl<'de> serde::Deserialize<'de> for SignMode { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(SignMode::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -110,6 +108,7 @@ impl serde::Serialize for SignatureDescriptor { struct_ser.serialize_field("data", v)?; } if self.sequence != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; } struct_ser.end() @@ -170,33 +169,33 @@ impl<'de> serde::Deserialize<'de> for SignatureDescriptor { formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut public_key__ = None; let mut data__ = None; let mut sequence__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::PublicKey => { if public_key__.is_some() { return Err(serde::de::Error::duplicate_field("publicKey")); } - public_key__ = map.next_value()?; + public_key__ = map_.next_value()?; } GeneratedField::Data => { if data__.is_some() { return Err(serde::de::Error::duplicate_field("data")); } - data__ = map.next_value()?; + data__ = 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<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -297,19 +296,19 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut sum__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Single => { if sum__.is_some() { return Err(serde::de::Error::duplicate_field("single")); } - sum__ = map + sum__ = map_ .next_value::<::std::option::Option<_>>()? .map(signature_descriptor::data::Sum::Single); } @@ -317,7 +316,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { if sum__.is_some() { return Err(serde::de::Error::duplicate_field("multi")); } - sum__ = map + sum__ = map_ .next_value::<::std::option::Option<_>>()? .map(signature_descriptor::data::Sum::Multi); } @@ -416,26 +415,26 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut bitarray__ = None; let mut signatures__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Bitarray => { if bitarray__.is_some() { return Err(serde::de::Error::duplicate_field("bitarray")); } - bitarray__ = map.next_value()?; + bitarray__ = map_.next_value()?; } GeneratedField::Signatures => { if signatures__.is_some() { return Err(serde::de::Error::duplicate_field("signatures")); } - signatures__ = Some(map.next_value()?); + signatures__ = Some(map_.next_value()?); } } } @@ -471,12 +470,12 @@ impl serde::Serialize for signature_descriptor::data::Single { len, )?; if self.mode != 0 { - let v = SignMode::from_i32(self.mode).ok_or_else(|| { - serde::ser::Error::custom(format!("Invalid variant {}", self.mode)) - })?; + let v = SignMode::try_from(self.mode) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.mode)))?; struct_ser.serialize_field("mode", &v)?; } if !self.signature.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "signature", pbjson::private::base64::encode(&self.signature).as_str(), @@ -541,27 +540,27 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut mode__ = None; let mut signature__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Mode => { if mode__.is_some() { return Err(serde::de::Error::duplicate_field("mode")); } - mode__ = Some(map.next_value::()? as i32); + mode__ = Some(map_.next_value::()? as i32); } GeneratedField::Signature => { if signature__.is_some() { return Err(serde::de::Error::duplicate_field("signature")); } signature__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -650,18 +649,21 @@ impl<'de> serde::Deserialize<'de> for SignatureDescriptors { formatter.write_str("struct cosmos.tx.signing.v1beta1.SignatureDescriptors") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut signatures__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Signatures => { if signatures__.is_some() { return Err(serde::de::Error::duplicate_field("signatures")); } - signatures__ = Some(map.next_value()?); + signatures__ = Some(map_.next_value()?); } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs index 99871069..efa1dd4d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Tx is the standard type used for broadcasting transactions. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Tx { /// body is the processable content of the transaction @@ -20,6 +21,7 @@ pub struct Tx { /// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and /// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used /// as the transaction ID. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxRaw { /// body_bytes is a protobuf serialization of a TxBody that matches the @@ -37,6 +39,7 @@ pub struct TxRaw { pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } /// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignDoc { /// body_bytes is protobuf serialization of a TxBody that matches the @@ -60,6 +63,7 @@ pub struct SignDoc { /// SIGN_MODE_DIRECT_AUX. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignDocDirectAux { /// body_bytes is protobuf serialization of a TxBody that matches the @@ -90,6 +94,7 @@ pub struct SignDocDirectAux { pub tip: ::core::option::Option, } /// TxBody is the body of a transaction that all signers sign over. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxBody { /// messages is a list of messages to be executed. The required signers of @@ -123,6 +128,7 @@ pub struct TxBody { } /// AuthInfo describes the fee and signer modes that are used to sign a /// transaction. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuthInfo { /// signer_infos defines the signing modes for the required signers. The number @@ -148,6 +154,7 @@ pub struct AuthInfo { } /// SignerInfo describes the public key and signing mode of a single top-level /// signer. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignerInfo { /// public_key is the public key of the signer. It is optional for accounts @@ -166,6 +173,7 @@ pub struct SignerInfo { pub sequence: u64, } /// ModeInfo describes the signing mode of a single or nested multisig signer. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModeInfo { /// sum is the oneof that specifies whether this represents a single or nested @@ -178,6 +186,7 @@ pub mod mode_info { /// Single is the mode info for a single signer. It is structured as a message /// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the /// future + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Single { /// mode is the signing mode of the single signer @@ -185,6 +194,7 @@ pub mod mode_info { pub mode: i32, } /// Multi is the mode info for a multisig public key + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Multi { /// bitarray specifies which keys within the multisig are signing @@ -198,6 +208,7 @@ pub mod mode_info { } /// sum is the oneof that specifies whether this represents a single or nested /// multisig signer + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Sum { /// single represents a single signer @@ -211,6 +222,7 @@ pub mod mode_info { /// Fee includes the amount of coins paid in fees and the maximum /// gas to be used by the transaction. The ratio yields an effective "gasprice", /// which must be above some miminum to be accepted into the mempool. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Fee { /// amount is the amount of coins to be paid as a fee @@ -234,6 +246,7 @@ pub struct Fee { /// Tip is the tip used for meta-transactions. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Tip { /// amount is the amount of the tip @@ -249,6 +262,7 @@ pub struct Tip { /// by the node if sent directly as-is. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuxSignerData { /// address is the bech32-encoded address of the auxiliary signer. If using @@ -270,6 +284,7 @@ pub struct AuxSignerData { } /// GetTxsEventRequest is the request type for the Service.TxsByEvents /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxsEventRequest { /// events is the list of transaction event type. @@ -292,6 +307,7 @@ pub struct GetTxsEventRequest { } /// GetTxsEventResponse is the response type for the Service.TxsByEvents /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxsEventResponse { /// txs is the list of queried transactions. @@ -311,6 +327,7 @@ pub struct GetTxsEventResponse { } /// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BroadcastTxRequest { /// tx_bytes is the raw transaction. @@ -321,6 +338,7 @@ pub struct BroadcastTxRequest { } /// BroadcastTxResponse is the response type for the /// Service.BroadcastTx method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BroadcastTxResponse { /// tx_response is the queried TxResponses. @@ -329,6 +347,7 @@ pub struct BroadcastTxResponse { } /// SimulateRequest is the request type for the Service.Simulate /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulateRequest { /// tx is the transaction to simulate. @@ -344,6 +363,7 @@ pub struct SimulateRequest { } /// SimulateResponse is the response type for the /// Service.SimulateRPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulateResponse { /// gas_info is the information about gas used in the simulation. @@ -355,6 +375,7 @@ pub struct SimulateResponse { } /// GetTxRequest is the request type for the Service.GetTx /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxRequest { /// hash is the tx hash to query, encoded as a hex string. @@ -362,6 +383,7 @@ pub struct GetTxRequest { pub hash: ::prost::alloc::string::String, } /// GetTxResponse is the response type for the Service.GetTx method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxResponse { /// tx is the queried transaction. @@ -375,6 +397,7 @@ pub struct GetTxResponse { /// RPC method. /// /// Since: cosmos-sdk 0.45.2 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockWithTxsRequest { /// height is the height of the block to query. @@ -387,6 +410,7 @@ pub struct GetBlockWithTxsRequest { /// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. /// /// Since: cosmos-sdk 0.45.2 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockWithTxsResponse { /// txs are the transactions in the block. @@ -423,6 +447,15 @@ impl OrderBy { OrderBy::Desc => "ORDER_BY_DESC", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified), + "ORDER_BY_ASC" => Some(Self::Asc), + "ORDER_BY_DESC" => Some(Self::Desc), + _ => None, + } + } } /// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -453,6 +486,16 @@ impl BroadcastMode { BroadcastMode::Async => "BROADCAST_MODE_ASYNC", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BROADCAST_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "BROADCAST_MODE_BLOCK" => Some(Self::Block), + "BROADCAST_MODE_SYNC" => Some(Self::Sync), + "BROADCAST_MODE_ASYNC" => Some(Self::Async), + _ => None, + } + } } include!("cosmos.tx.v1beta1.serde.rs"); include!("cosmos.tx.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs index ee984e1d..5f3702ca 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs @@ -84,32 +84,32 @@ impl<'de> serde::Deserialize<'de> for AuthInfo { formatter.write_str("struct cosmos.tx.v1beta1.AuthInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut signer_infos__ = None; let mut fee__ = None; let mut tip__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::SignerInfos => { if signer_infos__.is_some() { return Err(serde::de::Error::duplicate_field("signerInfos")); } - signer_infos__ = Some(map.next_value()?); + signer_infos__ = Some(map_.next_value()?); } GeneratedField::Fee => { if fee__.is_some() { return Err(serde::de::Error::duplicate_field("fee")); } - fee__ = map.next_value()?; + fee__ = map_.next_value()?; } GeneratedField::Tip => { if tip__.is_some() { return Err(serde::de::Error::duplicate_field("tip")); } - tip__ = map.next_value()?; + tip__ = map_.next_value()?; } } } @@ -151,12 +151,12 @@ impl serde::Serialize for AuxSignerData { struct_ser.serialize_field("signDoc", v)?; } if self.mode != 0 { - let v = super::signing::v1beta1::SignMode::from_i32(self.mode).ok_or_else(|| { - serde::ser::Error::custom(format!("Invalid variant {}", self.mode)) - })?; + let v = super::signing::v1beta1::SignMode::try_from(self.mode) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.mode)))?; struct_ser.serialize_field("mode", &v)?; } if !self.sig.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("sig", pbjson::private::base64::encode(&self.sig).as_str())?; } @@ -220,7 +220,7 @@ impl<'de> serde::Deserialize<'de> for AuxSignerData { formatter.write_str("struct cosmos.tx.v1beta1.AuxSignerData") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -228,33 +228,34 @@ impl<'de> serde::Deserialize<'de> for AuxSignerData { let mut sign_doc__ = None; let mut mode__ = None; let mut sig__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } GeneratedField::SignDoc => { if sign_doc__.is_some() { return Err(serde::de::Error::duplicate_field("signDoc")); } - sign_doc__ = map.next_value()?; + sign_doc__ = map_.next_value()?; } GeneratedField::Mode => { if mode__.is_some() { return Err(serde::de::Error::duplicate_field("mode")); } - mode__ = - Some(map.next_value::()? as i32); + mode__ = Some( + map_.next_value::()? as i32 + ); } GeneratedField::Sig => { if sig__.is_some() { return Err(serde::de::Error::duplicate_field("sig")); } sig__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -312,10 +313,9 @@ impl<'de> serde::Deserialize<'de> for BroadcastMode { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(BroadcastMode::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -325,10 +325,9 @@ impl<'de> serde::Deserialize<'de> for BroadcastMode { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(BroadcastMode::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -367,15 +366,15 @@ impl serde::Serialize for BroadcastTxRequest { let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.BroadcastTxRequest", len)?; if !self.tx_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "txBytes", pbjson::private::base64::encode(&self.tx_bytes).as_str(), )?; } if self.mode != 0 { - let v = BroadcastMode::from_i32(self.mode).ok_or_else(|| { - serde::ser::Error::custom(format!("Invalid variant {}", self.mode)) - })?; + let v = BroadcastMode::try_from(self.mode) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.mode)))?; struct_ser.serialize_field("mode", &v)?; } struct_ser.end() @@ -434,20 +433,20 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { formatter.write_str("struct cosmos.tx.v1beta1.BroadcastTxRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut tx_bytes__ = None; let mut mode__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::TxBytes => { if tx_bytes__.is_some() { return Err(serde::de::Error::duplicate_field("txBytes")); } tx_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -455,7 +454,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { if mode__.is_some() { return Err(serde::de::Error::duplicate_field("mode")); } - mode__ = Some(map.next_value::()? as i32); + mode__ = Some(map_.next_value::()? as i32); } } } @@ -542,18 +541,18 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxResponse { formatter.write_str("struct cosmos.tx.v1beta1.BroadcastTxResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut tx_response__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::TxResponse => { if tx_response__.is_some() { return Err(serde::de::Error::duplicate_field("txResponse")); } - tx_response__ = map.next_value()?; + tx_response__ = map_.next_value()?; } } } @@ -594,6 +593,7 @@ impl serde::Serialize for Fee { struct_ser.serialize_field("amount", &self.amount)?; } if self.gas_limit != 0 { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("gasLimit", ToString::to_string(&self.gas_limit).as_str())?; } @@ -663,7 +663,7 @@ impl<'de> serde::Deserialize<'de> for Fee { formatter.write_str("struct cosmos.tx.v1beta1.Fee") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -671,20 +671,20 @@ impl<'de> serde::Deserialize<'de> for Fee { let mut gas_limit__ = None; let mut payer__ = None; let mut granter__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } GeneratedField::GasLimit => { if gas_limit__.is_some() { return Err(serde::de::Error::duplicate_field("gasLimit")); } gas_limit__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -692,13 +692,13 @@ impl<'de> serde::Deserialize<'de> for Fee { if payer__.is_some() { return Err(serde::de::Error::duplicate_field("payer")); } - payer__ = Some(map.next_value()?); + payer__ = Some(map_.next_value()?); } GeneratedField::Granter => { if granter__.is_some() { return Err(serde::de::Error::duplicate_field("granter")); } - granter__ = Some(map.next_value()?); + granter__ = Some(map_.next_value()?); } } } @@ -730,6 +730,7 @@ impl serde::Serialize for GetBlockWithTxsRequest { let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.GetBlockWithTxsRequest", len)?; if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if let Some(v) = self.pagination.as_ref() { @@ -793,21 +794,21 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut height__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -815,7 +816,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -928,7 +929,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -937,31 +938,31 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { let mut block_id__ = None; let mut block__ = None; let mut pagination__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Txs => { if txs__.is_some() { return Err(serde::de::Error::duplicate_field("txs")); } - txs__ = Some(map.next_value()?); + txs__ = Some(map_.next_value()?); } GeneratedField::BlockId => { if block_id__.is_some() { return Err(serde::de::Error::duplicate_field("blockId")); } - block_id__ = map.next_value()?; + block_id__ = map_.next_value()?; } GeneratedField::Block => { if block__.is_some() { return Err(serde::de::Error::duplicate_field("block")); } - block__ = map.next_value()?; + block__ = map_.next_value()?; } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } } } @@ -1049,18 +1050,18 @@ impl<'de> serde::Deserialize<'de> for GetTxRequest { formatter.write_str("struct cosmos.tx.v1beta1.GetTxRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut hash__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Hash => { if hash__.is_some() { return Err(serde::de::Error::duplicate_field("hash")); } - hash__ = Some(map.next_value()?); + hash__ = Some(map_.next_value()?); } } } @@ -1149,25 +1150,25 @@ impl<'de> serde::Deserialize<'de> for GetTxResponse { formatter.write_str("struct cosmos.tx.v1beta1.GetTxResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut tx__ = None; let mut tx_response__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Tx => { if tx__.is_some() { return Err(serde::de::Error::duplicate_field("tx")); } - tx__ = map.next_value()?; + tx__ = map_.next_value()?; } GeneratedField::TxResponse => { if tx_response__.is_some() { return Err(serde::de::Error::duplicate_field("txResponse")); } - tx_response__ = map.next_value()?; + tx_response__ = map_.next_value()?; } } } @@ -1212,15 +1213,17 @@ impl serde::Serialize for GetTxsEventRequest { struct_ser.serialize_field("pagination", v)?; } if self.order_by != 0 { - let v = OrderBy::from_i32(self.order_by).ok_or_else(|| { + let v = OrderBy::try_from(self.order_by).map_err(|_| { serde::ser::Error::custom(format!("Invalid variant {}", self.order_by)) })?; struct_ser.serialize_field("orderBy", &v)?; } if self.page != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("page", ToString::to_string(&self.page).as_str())?; } if self.limit != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?; } struct_ser.end() @@ -1292,7 +1295,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { formatter.write_str("struct cosmos.tx.v1beta1.GetTxsEventRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1301,32 +1304,32 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { let mut order_by__ = None; let mut page__ = None; let mut limit__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Events => { if events__.is_some() { return Err(serde::de::Error::duplicate_field("events")); } - events__ = Some(map.next_value()?); + events__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } GeneratedField::OrderBy => { if order_by__.is_some() { return Err(serde::de::Error::duplicate_field("orderBy")); } - order_by__ = Some(map.next_value::()? as i32); + order_by__ = Some(map_.next_value::()? as i32); } GeneratedField::Page => { if page__.is_some() { return Err(serde::de::Error::duplicate_field("page")); } page__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1335,7 +1338,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { return Err(serde::de::Error::duplicate_field("limit")); } limit__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1389,6 +1392,7 @@ impl serde::Serialize for GetTxsEventResponse { struct_ser.serialize_field("pagination", v)?; } if self.total != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("total", ToString::to_string(&self.total).as_str())?; } struct_ser.end() @@ -1451,7 +1455,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { formatter.write_str("struct cosmos.tx.v1beta1.GetTxsEventResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -1459,32 +1463,32 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { let mut tx_responses__ = None; let mut pagination__ = None; let mut total__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Txs => { if txs__.is_some() { return Err(serde::de::Error::duplicate_field("txs")); } - txs__ = Some(map.next_value()?); + txs__ = Some(map_.next_value()?); } GeneratedField::TxResponses => { if tx_responses__.is_some() { return Err(serde::de::Error::duplicate_field("txResponses")); } - tx_responses__ = Some(map.next_value()?); + tx_responses__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); } - pagination__ = map.next_value()?; + pagination__ = map_.next_value()?; } GeneratedField::Total => { if total__.is_some() { return Err(serde::de::Error::duplicate_field("total")); } total__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1583,18 +1587,18 @@ impl<'de> serde::Deserialize<'de> for ModeInfo { formatter.write_str("struct cosmos.tx.v1beta1.ModeInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut sum__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Single => { if sum__.is_some() { return Err(serde::de::Error::duplicate_field("single")); } - sum__ = map + sum__ = map_ .next_value::<::std::option::Option<_>>()? .map(mode_info::Sum::Single); } @@ -1602,7 +1606,7 @@ impl<'de> serde::Deserialize<'de> for ModeInfo { if sum__.is_some() { return Err(serde::de::Error::duplicate_field("multi")); } - sum__ = map + sum__ = map_ .next_value::<::std::option::Option<_>>()? .map(mode_info::Sum::Multi); } @@ -1692,25 +1696,25 @@ impl<'de> serde::Deserialize<'de> for mode_info::Multi { formatter.write_str("struct cosmos.tx.v1beta1.ModeInfo.Multi") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut bitarray__ = None; let mut mode_infos__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Bitarray => { if bitarray__.is_some() { return Err(serde::de::Error::duplicate_field("bitarray")); } - bitarray__ = map.next_value()?; + bitarray__ = map_.next_value()?; } GeneratedField::ModeInfos => { if mode_infos__.is_some() { return Err(serde::de::Error::duplicate_field("modeInfos")); } - mode_infos__ = Some(map.next_value()?); + mode_infos__ = Some(map_.next_value()?); } } } @@ -1741,9 +1745,8 @@ impl serde::Serialize for mode_info::Single { let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.ModeInfo.Single", len)?; if self.mode != 0 { - let v = super::signing::v1beta1::SignMode::from_i32(self.mode).ok_or_else(|| { - serde::ser::Error::custom(format!("Invalid variant {}", self.mode)) - })?; + let v = super::signing::v1beta1::SignMode::try_from(self.mode) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.mode)))?; struct_ser.serialize_field("mode", &v)?; } struct_ser.end() @@ -1800,19 +1803,20 @@ impl<'de> serde::Deserialize<'de> for mode_info::Single { formatter.write_str("struct cosmos.tx.v1beta1.ModeInfo.Single") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut mode__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Mode => { if mode__.is_some() { return Err(serde::de::Error::duplicate_field("mode")); } - mode__ = - Some(map.next_value::()? as i32); + mode__ = Some( + map_.next_value::()? as i32 + ); } } } @@ -1863,10 +1867,9 @@ impl<'de> serde::Deserialize<'de> for OrderBy { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(OrderBy::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -1876,10 +1879,9 @@ impl<'de> serde::Deserialize<'de> for OrderBy { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(OrderBy::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -1922,12 +1924,14 @@ impl serde::Serialize for SignDoc { } let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.SignDoc", len)?; if !self.body_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "bodyBytes", pbjson::private::base64::encode(&self.body_bytes).as_str(), )?; } if !self.auth_info_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "authInfoBytes", pbjson::private::base64::encode(&self.auth_info_bytes).as_str(), @@ -1937,6 +1941,7 @@ impl serde::Serialize for SignDoc { struct_ser.serialize_field("chainId", &self.chain_id)?; } if self.account_number != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "accountNumber", ToString::to_string(&self.account_number).as_str(), @@ -2013,7 +2018,7 @@ impl<'de> serde::Deserialize<'de> for SignDoc { formatter.write_str("struct cosmos.tx.v1beta1.SignDoc") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2021,14 +2026,14 @@ impl<'de> serde::Deserialize<'de> for SignDoc { let mut auth_info_bytes__ = None; let mut chain_id__ = None; let mut account_number__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BodyBytes => { if body_bytes__.is_some() { return Err(serde::de::Error::duplicate_field("bodyBytes")); } body_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2037,7 +2042,7 @@ impl<'de> serde::Deserialize<'de> for SignDoc { return Err(serde::de::Error::duplicate_field("authInfoBytes")); } auth_info_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2045,14 +2050,14 @@ impl<'de> serde::Deserialize<'de> for SignDoc { if chain_id__.is_some() { return Err(serde::de::Error::duplicate_field("chainId")); } - chain_id__ = Some(map.next_value()?); + chain_id__ = Some(map_.next_value()?); } GeneratedField::AccountNumber => { if account_number__.is_some() { return Err(serde::de::Error::duplicate_field("accountNumber")); } account_number__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2098,6 +2103,7 @@ impl serde::Serialize for SignDocDirectAux { let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.SignDocDirectAux", len)?; if !self.body_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "bodyBytes", pbjson::private::base64::encode(&self.body_bytes).as_str(), @@ -2110,12 +2116,14 @@ impl serde::Serialize for SignDocDirectAux { struct_ser.serialize_field("chainId", &self.chain_id)?; } if self.account_number != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "accountNumber", ToString::to_string(&self.account_number).as_str(), )?; } if self.sequence != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; } if let Some(v) = self.tip.as_ref() { @@ -2196,7 +2204,7 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { formatter.write_str("struct cosmos.tx.v1beta1.SignDocDirectAux") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -2206,14 +2214,14 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { let mut account_number__ = None; let mut sequence__ = None; let mut tip__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BodyBytes => { if body_bytes__.is_some() { return Err(serde::de::Error::duplicate_field("bodyBytes")); } body_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2221,20 +2229,20 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { if public_key__.is_some() { return Err(serde::de::Error::duplicate_field("publicKey")); } - public_key__ = map.next_value()?; + public_key__ = map_.next_value()?; } GeneratedField::ChainId => { if chain_id__.is_some() { return Err(serde::de::Error::duplicate_field("chainId")); } - chain_id__ = Some(map.next_value()?); + chain_id__ = Some(map_.next_value()?); } GeneratedField::AccountNumber => { if account_number__.is_some() { return Err(serde::de::Error::duplicate_field("accountNumber")); } account_number__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2243,7 +2251,7 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { return Err(serde::de::Error::duplicate_field("sequence")); } sequence__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2251,7 +2259,7 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { if tip__.is_some() { return Err(serde::de::Error::duplicate_field("tip")); } - tip__ = map.next_value()?; + tip__ = map_.next_value()?; } } } @@ -2297,6 +2305,7 @@ impl serde::Serialize for SignerInfo { struct_ser.serialize_field("modeInfo", v)?; } if self.sequence != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; } struct_ser.end() @@ -2363,33 +2372,33 @@ impl<'de> serde::Deserialize<'de> for SignerInfo { formatter.write_str("struct cosmos.tx.v1beta1.SignerInfo") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut public_key__ = None; let mut mode_info__ = None; let mut sequence__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::PublicKey => { if public_key__.is_some() { return Err(serde::de::Error::duplicate_field("publicKey")); } - public_key__ = map.next_value()?; + public_key__ = map_.next_value()?; } GeneratedField::ModeInfo => { if mode_info__.is_some() { return Err(serde::de::Error::duplicate_field("modeInfo")); } - mode_info__ = map.next_value()?; + mode_info__ = 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<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -2425,6 +2434,7 @@ impl serde::Serialize for SimulateRequest { struct_ser.serialize_field("tx", v)?; } if !self.tx_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "txBytes", pbjson::private::base64::encode(&self.tx_bytes).as_str(), @@ -2486,26 +2496,26 @@ impl<'de> serde::Deserialize<'de> for SimulateRequest { formatter.write_str("struct cosmos.tx.v1beta1.SimulateRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut tx__ = None; let mut tx_bytes__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Tx => { if tx__.is_some() { return Err(serde::de::Error::duplicate_field("tx")); } - tx__ = map.next_value()?; + tx__ = map_.next_value()?; } GeneratedField::TxBytes => { if tx_bytes__.is_some() { return Err(serde::de::Error::duplicate_field("txBytes")); } tx_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -2602,25 +2612,25 @@ impl<'de> serde::Deserialize<'de> for SimulateResponse { formatter.write_str("struct cosmos.tx.v1beta1.SimulateResponse") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut gas_info__ = None; let mut result__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::GasInfo => { if gas_info__.is_some() { return Err(serde::de::Error::duplicate_field("gasInfo")); } - gas_info__ = map.next_value()?; + gas_info__ = map_.next_value()?; } GeneratedField::Result => { if result__.is_some() { return Err(serde::de::Error::duplicate_field("result")); } - result__ = map.next_value()?; + result__ = map_.next_value()?; } } } @@ -2714,25 +2724,25 @@ impl<'de> serde::Deserialize<'de> for Tip { formatter.write_str("struct cosmos.tx.v1beta1.Tip") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut amount__ = None; let mut tipper__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } GeneratedField::Tipper => { if tipper__.is_some() { return Err(serde::de::Error::duplicate_field("tipper")); } - tipper__ = Some(map.next_value()?); + tipper__ = Some(map_.next_value()?); } } } @@ -2837,33 +2847,33 @@ impl<'de> serde::Deserialize<'de> for Tx { formatter.write_str("struct cosmos.tx.v1beta1.Tx") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut body__ = None; let mut auth_info__ = None; let mut signatures__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Body => { if body__.is_some() { return Err(serde::de::Error::duplicate_field("body")); } - body__ = map.next_value()?; + body__ = map_.next_value()?; } GeneratedField::AuthInfo => { if auth_info__.is_some() { return Err(serde::de::Error::duplicate_field("authInfo")); } - auth_info__ = map.next_value()?; + auth_info__ = map_.next_value()?; } GeneratedField::Signatures => { if signatures__.is_some() { return Err(serde::de::Error::duplicate_field("signatures")); } signatures__ = Some( - map.next_value::>>()? + map_.next_value::>>()? .into_iter() .map(|x| x.0) .collect(), @@ -2912,6 +2922,7 @@ impl serde::Serialize for TxBody { struct_ser.serialize_field("memo", &self.memo)?; } if self.timeout_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "timeoutHeight", ToString::to_string(&self.timeout_height).as_str(), @@ -3001,7 +3012,7 @@ impl<'de> serde::Deserialize<'de> for TxBody { formatter.write_str("struct cosmos.tx.v1beta1.TxBody") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -3010,26 +3021,26 @@ impl<'de> serde::Deserialize<'de> for TxBody { let mut timeout_height__ = None; let mut extension_options__ = None; let mut non_critical_extension_options__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Messages => { if messages__.is_some() { return Err(serde::de::Error::duplicate_field("messages")); } - messages__ = Some(map.next_value()?); + messages__ = Some(map_.next_value()?); } GeneratedField::Memo => { if memo__.is_some() { return Err(serde::de::Error::duplicate_field("memo")); } - memo__ = Some(map.next_value()?); + memo__ = Some(map_.next_value()?); } GeneratedField::TimeoutHeight => { if timeout_height__.is_some() { return Err(serde::de::Error::duplicate_field("timeoutHeight")); } timeout_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -3037,7 +3048,7 @@ impl<'de> serde::Deserialize<'de> for TxBody { if extension_options__.is_some() { return Err(serde::de::Error::duplicate_field("extensionOptions")); } - extension_options__ = Some(map.next_value()?); + extension_options__ = Some(map_.next_value()?); } GeneratedField::NonCriticalExtensionOptions => { if non_critical_extension_options__.is_some() { @@ -3045,7 +3056,7 @@ impl<'de> serde::Deserialize<'de> for TxBody { "nonCriticalExtensionOptions", )); } - non_critical_extension_options__ = Some(map.next_value()?); + non_critical_extension_options__ = Some(map_.next_value()?); } } } @@ -3081,12 +3092,14 @@ impl serde::Serialize for TxRaw { } let mut struct_ser = serializer.serialize_struct("cosmos.tx.v1beta1.TxRaw", len)?; if !self.body_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "bodyBytes", pbjson::private::base64::encode(&self.body_bytes).as_str(), )?; } if !self.auth_info_bytes.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "authInfoBytes", pbjson::private::base64::encode(&self.auth_info_bytes).as_str(), @@ -3168,21 +3181,21 @@ impl<'de> serde::Deserialize<'de> for TxRaw { formatter.write_str("struct cosmos.tx.v1beta1.TxRaw") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut body_bytes__ = None; let mut auth_info_bytes__ = None; let mut signatures__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BodyBytes => { if body_bytes__.is_some() { return Err(serde::de::Error::duplicate_field("bodyBytes")); } body_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -3191,7 +3204,7 @@ impl<'de> serde::Deserialize<'de> for TxRaw { return Err(serde::de::Error::duplicate_field("authInfoBytes")); } auth_info_bytes__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -3200,7 +3213,7 @@ impl<'de> serde::Deserialize<'de> for TxRaw { return Err(serde::de::Error::duplicate_field("signatures")); } signatures__ = Some( - map.next_value::>>()? + map_.next_value::>>()? .into_iter() .map(|x| x.0) .collect(), diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs index 949637d6..ea0fe8f7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Plan specifies information about a planned upgrade and when it should occur. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Plan { /// Sets the name for the upgrade. This name will be used by the upgraded @@ -36,6 +37,7 @@ pub struct Plan { /// upgrade. /// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov /// proposals, see MsgSoftwareUpgrade. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SoftwareUpgradeProposal { #[prost(string, tag = "1")] @@ -49,6 +51,7 @@ pub struct SoftwareUpgradeProposal { /// upgrade. /// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov /// proposals, see MsgCancelUpgrade. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CancelSoftwareUpgradeProposal { #[prost(string, tag = "1")] @@ -59,6 +62,7 @@ pub struct CancelSoftwareUpgradeProposal { /// ModuleVersion specifies a module and its consensus version. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleVersion { /// name of the app module @@ -70,10 +74,12 @@ pub struct ModuleVersion { } /// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCurrentPlanRequest {} /// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCurrentPlanResponse { /// plan is the current upgrade plan. @@ -82,6 +88,7 @@ pub struct QueryCurrentPlanResponse { } /// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAppliedPlanRequest { /// name is the name of the applied plan to query for. @@ -90,6 +97,7 @@ pub struct QueryAppliedPlanRequest { } /// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAppliedPlanResponse { /// height is the block height at which the plan was applied. @@ -98,6 +106,7 @@ pub struct QueryAppliedPlanResponse { } /// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryUpgradedConsensusStateRequest { /// last height of the current chain must be sent in request @@ -107,6 +116,7 @@ pub struct QueryUpgradedConsensusStateRequest { } /// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryUpgradedConsensusStateResponse { /// Since: cosmos-sdk 0.43 @@ -117,6 +127,7 @@ pub struct QueryUpgradedConsensusStateResponse { /// RPC method. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleVersionsRequest { /// module_name is a field to query a specific module @@ -129,6 +140,7 @@ pub struct QueryModuleVersionsRequest { /// RPC method. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleVersionsResponse { /// module_versions is a list of module names with their consensus versions. @@ -138,11 +150,13 @@ pub struct QueryModuleVersionsResponse { /// QueryAuthorityRequest is the request type for Query/Authority /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAuthorityRequest {} /// QueryAuthorityResponse is the response type for Query/Authority /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAuthorityResponse { #[prost(string, tag = "1")] @@ -151,6 +165,7 @@ pub struct QueryAuthorityResponse { /// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSoftwareUpgrade { /// authority is the address of the governance account. @@ -163,11 +178,13 @@ pub struct MsgSoftwareUpgrade { /// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSoftwareUpgradeResponse {} /// MsgCancelUpgrade is the Msg/CancelUpgrade request type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUpgrade { /// authority is the address of the governance account. @@ -177,6 +194,7 @@ pub struct MsgCancelUpgrade { /// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUpgradeResponse {} include!("cosmos.upgrade.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs index 8bb5f78d..3de767c7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs @@ -79,26 +79,26 @@ impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut title__ = None; let mut description__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Title => { if title__.is_some() { return Err(serde::de::Error::duplicate_field("title")); } - title__ = Some(map.next_value()?); + title__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } } } @@ -135,6 +135,7 @@ impl serde::Serialize for ModuleVersion { struct_ser.serialize_field("name", &self.name)?; } if self.version != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("version", ToString::to_string(&self.version).as_str())?; } struct_ser.end() @@ -193,26 +194,26 @@ impl<'de> serde::Deserialize<'de> for ModuleVersion { formatter.write_str("struct cosmos.upgrade.v1beta1.ModuleVersion") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut version__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Version => { if version__.is_some() { return Err(serde::de::Error::duplicate_field("version")); } version__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -301,18 +302,18 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { formatter.write_str("struct cosmos.upgrade.v1beta1.MsgCancelUpgrade") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut authority__ = None; - while let Some(k) = map.next_key()? { + 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()?); + authority__ = Some(map_.next_value()?); } } } @@ -389,13 +390,13 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgCancelUpgradeResponse {}) } @@ -485,25 +486,25 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { formatter.write_str("struct cosmos.upgrade.v1beta1.MsgSoftwareUpgrade") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut authority__ = None; let mut plan__ = None; - while let Some(k) = map.next_key()? { + 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()?); + authority__ = Some(map_.next_value()?); } GeneratedField::Plan => { if plan__.is_some() { return Err(serde::de::Error::duplicate_field("plan")); } - plan__ = map.next_value()?; + plan__ = map_.next_value()?; } } } @@ -581,13 +582,13 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgSoftwareUpgradeResponse {}) } @@ -630,6 +631,7 @@ impl serde::Serialize for Plan { struct_ser.serialize_field("time", v)?; } if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } if !self.info.is_empty() { @@ -709,7 +711,7 @@ impl<'de> serde::Deserialize<'de> for Plan { formatter.write_str("struct cosmos.upgrade.v1beta1.Plan") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -718,26 +720,26 @@ impl<'de> serde::Deserialize<'de> for Plan { let mut height__ = None; let mut info__ = None; let mut upgraded_client_state__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Time => { if time__.is_some() { return Err(serde::de::Error::duplicate_field("time")); } - time__ = map.next_value()?; + time__ = map_.next_value()?; } GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -745,7 +747,7 @@ impl<'de> serde::Deserialize<'de> for Plan { if info__.is_some() { return Err(serde::de::Error::duplicate_field("info")); } - info__ = Some(map.next_value()?); + info__ = Some(map_.next_value()?); } GeneratedField::UpgradedClientState => { if upgraded_client_state__.is_some() { @@ -753,7 +755,7 @@ impl<'de> serde::Deserialize<'de> for Plan { "upgradedClientState", )); } - upgraded_client_state__ = map.next_value()?; + upgraded_client_state__ = map_.next_value()?; } } } @@ -841,19 +843,19 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } } } @@ -883,6 +885,7 @@ impl serde::Serialize for QueryAppliedPlanResponse { let mut struct_ser = serializer.serialize_struct("cosmos.upgrade.v1beta1.QueryAppliedPlanResponse", len)?; if self.height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("height", ToString::to_string(&self.height).as_str())?; } struct_ser.end() @@ -941,20 +944,20 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut height__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Height => { if height__.is_some() { return Err(serde::de::Error::duplicate_field("height")); } height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1033,13 +1036,13 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryAuthorityRequest {}) } @@ -1123,19 +1126,19 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut address__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { if address__.is_some() { return Err(serde::de::Error::duplicate_field("address")); } - address__ = Some(map.next_value()?); + address__ = Some(map_.next_value()?); } } } @@ -1212,13 +1215,13 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(QueryCurrentPlanRequest {}) } @@ -1302,19 +1305,19 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut plan__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Plan => { if plan__.is_some() { return Err(serde::de::Error::duplicate_field("plan")); } - plan__ = map.next_value()?; + plan__ = map_.next_value()?; } } } @@ -1400,19 +1403,19 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut module_name__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ModuleName => { if module_name__.is_some() { return Err(serde::de::Error::duplicate_field("moduleName")); } - module_name__ = Some(map.next_value()?); + module_name__ = Some(map_.next_value()?); } } } @@ -1502,19 +1505,19 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut module_versions__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::ModuleVersions => { if module_versions__.is_some() { return Err(serde::de::Error::duplicate_field("moduleVersions")); } - module_versions__ = Some(map.next_value()?); + module_versions__ = Some(map_.next_value()?); } } } @@ -1546,6 +1549,7 @@ impl serde::Serialize for QueryUpgradedConsensusStateRequest { len, )?; if self.last_height != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "lastHeight", ToString::to_string(&self.last_height).as_str(), @@ -1608,20 +1612,20 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut last_height__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::LastHeight => { if last_height__.is_some() { return Err(serde::de::Error::duplicate_field("lastHeight")); } last_height__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1655,6 +1659,7 @@ impl serde::Serialize for QueryUpgradedConsensusStateResponse { len, )?; if !self.upgraded_consensus_state.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( "upgradedConsensusState", pbjson::private::base64::encode(&self.upgraded_consensus_state).as_str(), @@ -1719,13 +1724,13 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut upgraded_consensus_state__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::UpgradedConsensusState => { if upgraded_consensus_state__.is_some() { @@ -1734,7 +1739,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { )); } upgraded_consensus_state__ = Some( - map.next_value::<::pbjson::private::BytesDeserialize<_>>()? + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } @@ -1840,7 +1845,7 @@ impl<'de> serde::Deserialize<'de> for SoftwareUpgradeProposal { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -1848,25 +1853,25 @@ impl<'de> serde::Deserialize<'de> for SoftwareUpgradeProposal { let mut title__ = None; let mut description__ = None; let mut plan__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Title => { if title__.is_some() { return Err(serde::de::Error::duplicate_field("title")); } - title__ = Some(map.next_value()?); + title__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } GeneratedField::Plan => { if plan__.is_some() { return Err(serde::de::Error::duplicate_field("plan")); } - plan__ = map.next_value()?; + plan__ = map_.next_value()?; } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs index 0ab5fc04..41bba608 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// BaseVestingAccount implements the VestingAccount interface. It contains all /// the necessary fields needed for any vesting account implementation. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BaseVestingAccount { #[prost(message, optional, tag = "1")] @@ -17,6 +18,7 @@ pub struct BaseVestingAccount { } /// ContinuousVestingAccount implements the VestingAccount interface. It /// continuously vests by unlocking coins linearly with respect to time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContinuousVestingAccount { #[prost(message, optional, tag = "1")] @@ -28,12 +30,14 @@ pub struct ContinuousVestingAccount { /// DelayedVestingAccount implements the VestingAccount interface. It vests all /// coins after a specific time, but non prior. In other words, it keeps them /// locked until a specified time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelayedVestingAccount { #[prost(message, optional, tag = "1")] pub base_vesting_account: ::core::option::Option, } /// Period defines a length of time and amount of coins that will vest. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Period { /// Period duration in seconds. @@ -44,6 +48,7 @@ pub struct Period { } /// PeriodicVestingAccount implements the VestingAccount interface. It /// periodically vests by unlocking coins during each specified period. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeriodicVestingAccount { #[prost(message, optional, tag = "1")] @@ -58,6 +63,7 @@ pub struct PeriodicVestingAccount { /// still be used for delegating and for governance votes even while locked. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PermanentLockedAccount { #[prost(message, optional, tag = "1")] @@ -65,6 +71,7 @@ pub struct PermanentLockedAccount { } /// MsgCreateVestingAccount defines a message that enables creating a vesting /// account. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateVestingAccount { #[prost(string, tag = "1")] @@ -80,12 +87,14 @@ pub struct MsgCreateVestingAccount { pub delayed: bool, } /// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateVestingAccountResponse {} /// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent /// locked account. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePermanentLockedAccount { #[prost(string, tag = "1")] @@ -98,12 +107,14 @@ pub struct MsgCreatePermanentLockedAccount { /// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePermanentLockedAccountResponse {} /// MsgCreateVestingAccount defines a message that enables creating a vesting /// account. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePeriodicVestingAccount { #[prost(string, tag = "1")] @@ -120,6 +131,7 @@ pub struct MsgCreatePeriodicVestingAccount { /// response type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePeriodicVestingAccountResponse {} include!("cosmos.vesting.v1beta1.serde.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs index fa36be12..6e01cf4e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs @@ -37,6 +37,7 @@ impl serde::Serialize for BaseVestingAccount { struct_ser.serialize_field("delegatedVesting", &self.delegated_vesting)?; } if self.end_time != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("endTime", ToString::to_string(&self.end_time).as_str())?; } struct_ser.end() @@ -116,7 +117,7 @@ impl<'de> serde::Deserialize<'de> for BaseVestingAccount { formatter.write_str("struct cosmos.vesting.v1beta1.BaseVestingAccount") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -125,38 +126,38 @@ impl<'de> serde::Deserialize<'de> for BaseVestingAccount { let mut delegated_free__ = None; let mut delegated_vesting__ = None; let mut end_time__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BaseAccount => { if base_account__.is_some() { return Err(serde::de::Error::duplicate_field("baseAccount")); } - base_account__ = map.next_value()?; + base_account__ = map_.next_value()?; } GeneratedField::OriginalVesting => { if original_vesting__.is_some() { return Err(serde::de::Error::duplicate_field("originalVesting")); } - original_vesting__ = Some(map.next_value()?); + original_vesting__ = Some(map_.next_value()?); } GeneratedField::DelegatedFree => { if delegated_free__.is_some() { return Err(serde::de::Error::duplicate_field("delegatedFree")); } - delegated_free__ = Some(map.next_value()?); + delegated_free__ = Some(map_.next_value()?); } GeneratedField::DelegatedVesting => { if delegated_vesting__.is_some() { return Err(serde::de::Error::duplicate_field("delegatedVesting")); } - delegated_vesting__ = Some(map.next_value()?); + delegated_vesting__ = Some(map_.next_value()?); } GeneratedField::EndTime => { if end_time__.is_some() { return Err(serde::de::Error::duplicate_field("endTime")); } end_time__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -198,6 +199,7 @@ impl serde::Serialize for ContinuousVestingAccount { struct_ser.serialize_field("baseVestingAccount", v)?; } if self.start_time != 0 { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("startTime", ToString::to_string(&self.start_time).as_str())?; } @@ -266,14 +268,14 @@ impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut base_vesting_account__ = None; let mut start_time__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BaseVestingAccount => { if base_vesting_account__.is_some() { @@ -281,14 +283,14 @@ impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { "baseVestingAccount", )); } - base_vesting_account__ = map.next_value()?; + base_vesting_account__ = map_.next_value()?; } GeneratedField::StartTime => { if start_time__.is_some() { return Err(serde::de::Error::duplicate_field("startTime")); } start_time__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -381,13 +383,13 @@ impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut base_vesting_account__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BaseVestingAccount => { if base_vesting_account__.is_some() { @@ -395,7 +397,7 @@ impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { "baseVestingAccount", )); } - base_vesting_account__ = map.next_value()?; + base_vesting_account__ = map_.next_value()?; } } } @@ -442,6 +444,7 @@ impl serde::Serialize for MsgCreatePeriodicVestingAccount { struct_ser.serialize_field("toAddress", &self.to_address)?; } if self.start_time != 0 { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("startTime", ToString::to_string(&self.start_time).as_str())?; } @@ -521,7 +524,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -530,26 +533,26 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { let mut to_address__ = None; let mut start_time__ = None; let mut vesting_periods__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::FromAddress => { if from_address__.is_some() { return Err(serde::de::Error::duplicate_field("fromAddress")); } - from_address__ = Some(map.next_value()?); + from_address__ = Some(map_.next_value()?); } GeneratedField::ToAddress => { if to_address__.is_some() { return Err(serde::de::Error::duplicate_field("toAddress")); } - to_address__ = Some(map.next_value()?); + to_address__ = Some(map_.next_value()?); } GeneratedField::StartTime => { if start_time__.is_some() { return Err(serde::de::Error::duplicate_field("startTime")); } start_time__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -557,7 +560,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { if vesting_periods__.is_some() { return Err(serde::de::Error::duplicate_field("vestingPeriods")); } - vesting_periods__ = Some(map.next_value()?); + vesting_periods__ = Some(map_.next_value()?); } } } @@ -641,13 +644,13 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccountResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgCreatePeriodicVestingAccountResponse {}) } @@ -755,7 +758,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -763,25 +766,25 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { let mut from_address__ = None; let mut to_address__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::FromAddress => { if from_address__.is_some() { return Err(serde::de::Error::duplicate_field("fromAddress")); } - from_address__ = Some(map.next_value()?); + from_address__ = Some(map_.next_value()?); } GeneratedField::ToAddress => { if to_address__.is_some() { return Err(serde::de::Error::duplicate_field("toAddress")); } - to_address__ = Some(map.next_value()?); + to_address__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -864,13 +867,13 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccountResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgCreatePermanentLockedAccountResponse {}) } @@ -917,6 +920,7 @@ impl serde::Serialize for MsgCreateVestingAccount { struct_ser.serialize_field("amount", &self.amount)?; } if self.end_time != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("endTime", ToString::to_string(&self.end_time).as_str())?; } if self.delayed { @@ -995,7 +999,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -1005,32 +1009,32 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { let mut amount__ = None; let mut end_time__ = None; let mut delayed__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::FromAddress => { if from_address__.is_some() { return Err(serde::de::Error::duplicate_field("fromAddress")); } - from_address__ = Some(map.next_value()?); + from_address__ = Some(map_.next_value()?); } GeneratedField::ToAddress => { if to_address__.is_some() { return Err(serde::de::Error::duplicate_field("toAddress")); } - to_address__ = Some(map.next_value()?); + to_address__ = Some(map_.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } GeneratedField::EndTime => { if end_time__.is_some() { return Err(serde::de::Error::duplicate_field("endTime")); } end_time__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1038,7 +1042,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { if delayed__.is_some() { return Err(serde::de::Error::duplicate_field("delayed")); } - delayed__ = Some(map.next_value()?); + delayed__ = Some(map_.next_value()?); } } } @@ -1121,13 +1125,13 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccountResponse { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } Ok(MsgCreateVestingAccountResponse {}) } @@ -1155,6 +1159,7 @@ impl serde::Serialize for Period { } let mut struct_ser = serializer.serialize_struct("cosmos.vesting.v1beta1.Period", len)?; if self.length != 0 { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field("length", ToString::to_string(&self.length).as_str())?; } if !self.amount.is_empty() { @@ -1216,20 +1221,20 @@ impl<'de> serde::Deserialize<'de> for Period { formatter.write_str("struct cosmos.vesting.v1beta1.Period") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut length__ = None; let mut amount__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Length => { if length__.is_some() { return Err(serde::de::Error::duplicate_field("length")); } length__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1237,7 +1242,7 @@ impl<'de> serde::Deserialize<'de> for Period { if amount__.is_some() { return Err(serde::de::Error::duplicate_field("amount")); } - amount__ = Some(map.next_value()?); + amount__ = Some(map_.next_value()?); } } } @@ -1273,6 +1278,7 @@ impl serde::Serialize for PeriodicVestingAccount { struct_ser.serialize_field("baseVestingAccount", v)?; } if self.start_time != 0 { + #[allow(clippy::needless_borrow)] struct_ser .serialize_field("startTime", ToString::to_string(&self.start_time).as_str())?; } @@ -1350,7 +1356,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, @@ -1358,7 +1364,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { let mut base_vesting_account__ = None; let mut start_time__ = None; let mut vesting_periods__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BaseVestingAccount => { if base_vesting_account__.is_some() { @@ -1366,14 +1372,14 @@ impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { "baseVestingAccount", )); } - base_vesting_account__ = map.next_value()?; + base_vesting_account__ = map_.next_value()?; } GeneratedField::StartTime => { if start_time__.is_some() { return Err(serde::de::Error::duplicate_field("startTime")); } start_time__ = Some( - map.next_value::<::pbjson::private::NumberDeserialize<_>>()? + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } @@ -1381,7 +1387,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { if vesting_periods__.is_some() { return Err(serde::de::Error::duplicate_field("vestingPeriods")); } - vesting_periods__ = Some(map.next_value()?); + vesting_periods__ = Some(map_.next_value()?); } } } @@ -1473,13 +1479,13 @@ impl<'de> serde::Deserialize<'de> for PermanentLockedAccount { fn visit_map( self, - mut map: V, + mut map_: V, ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut base_vesting_account__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::BaseVestingAccount => { if base_vesting_account__.is_some() { @@ -1487,7 +1493,7 @@ impl<'de> serde::Deserialize<'de> for PermanentLockedAccount { "baseVestingAccount", )); } - base_vesting_account__ = map.next_value()?; + base_vesting_account__ = map_.next_value()?; } } } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs index 991c1940..2353a154 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs @@ -1,6 +1,7 @@ // @generated /// InterfaceDescriptor describes an interface type to be used with /// accepts_interface and implements_interface and declared by declare_interface. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceDescriptor { /// name is the name of the interface. It should be a short-name (without @@ -21,6 +22,7 @@ pub struct InterfaceDescriptor { /// Scalars should ideally define an encoding such that there is only one /// valid syntactical representation for a given semantic meaning, /// i.e. the encoding should be deterministic. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScalarDescriptor { /// name is the name of the scalar. It should be a short-name (without @@ -60,6 +62,15 @@ impl ScalarType { ScalarType::Bytes => "SCALAR_TYPE_BYTES", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SCALAR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "SCALAR_TYPE_STRING" => Some(Self::String), + "SCALAR_TYPE_BYTES" => Some(Self::Bytes), + _ => None, + } + } } include!("cosmos_proto.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs index 7c96cfc0..dde23d28 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs @@ -77,25 +77,25 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { formatter.write_str("struct cosmos_proto.InterfaceDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut description__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } } } @@ -142,8 +142,8 @@ impl serde::Serialize for ScalarDescriptor { .iter() .cloned() .map(|v| { - ScalarType::from_i32(v) - .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", v))) + ScalarType::try_from(v) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", v))) }) .collect::, _>>()?; struct_ser.serialize_field("fieldType", &v)?; @@ -206,33 +206,33 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { formatter.write_str("struct cosmos_proto.ScalarDescriptor") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut description__ = None; let mut field_type__ = None; - while let Some(k) = map.next_key()? { + while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); } - name__ = Some(map.next_value()?); + name__ = Some(map_.next_value()?); } GeneratedField::Description => { if description__.is_some() { return Err(serde::de::Error::duplicate_field("description")); } - description__ = Some(map.next_value()?); + description__ = Some(map_.next_value()?); } GeneratedField::FieldType => { if field_type__.is_some() { return Err(serde::de::Error::duplicate_field("fieldType")); } field_type__ = Some( - map.next_value::>()? + map_.next_value::>()? .into_iter() .map(|x| x as i32) .collect(), @@ -289,10 +289,9 @@ impl<'de> serde::Deserialize<'de> for ScalarType { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ScalarType::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -302,10 +301,9 @@ impl<'de> serde::Deserialize<'de> for ScalarType { where E: serde::de::Error, { - use std::convert::TryFrom; i32::try_from(v) .ok() - .and_then(ScalarType::from_i32) + .and_then(|x| x.try_into().ok()) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs index f37d3872..9e79d078 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs @@ -6,6 +6,7 @@ /// Foo some_parameter = 1; /// PageRequest pagination = 2; /// } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PageRequest { /// key is a value returned in PageResponse.next_key to begin @@ -41,6 +42,7 @@ pub struct PageRequest { /// repeated Bar results = 1; /// PageResponse page = 2; /// } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PageResponse { /// next_key is the key to be passed to PageRequest.key to @@ -53,4 +55,5 @@ pub struct PageResponse { #[prost(uint64, tag = "2")] pub total: u64, } +include!("cosmos.base.query.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs new file mode 100644 index 00000000..a0a7ca8d --- /dev/null +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs @@ -0,0 +1,306 @@ +// @generated +impl serde::Serialize for PageRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + if self.offset != 0 { + len += 1; + } + if self.limit != 0 { + len += 1; + } + if self.count_total { + len += 1; + } + if self.reverse { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.query.v1beta1.PageRequest", len)?; + if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if self.offset != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("offset", ToString::to_string(&self.offset).as_str())?; + } + if self.limit != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?; + } + if self.count_total { + struct_ser.serialize_field("countTotal", &self.count_total)?; + } + if self.reverse { + struct_ser.serialize_field("reverse", &self.reverse)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PageRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "key", + "offset", + "limit", + "count_total", + "countTotal", + "reverse", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Offset, + Limit, + CountTotal, + Reverse, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + "offset" => Ok(GeneratedField::Offset), + "limit" => Ok(GeneratedField::Limit), + "countTotal" | "count_total" => Ok(GeneratedField::CountTotal), + "reverse" => Ok(GeneratedField::Reverse), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PageRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.query.v1beta1.PageRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + let mut offset__ = None; + let mut limit__ = None; + let mut count_total__ = None; + let mut reverse__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Offset => { + if offset__.is_some() { + return Err(serde::de::Error::duplicate_field("offset")); + } + offset__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Limit => { + if limit__.is_some() { + return Err(serde::de::Error::duplicate_field("limit")); + } + limit__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::CountTotal => { + if count_total__.is_some() { + return Err(serde::de::Error::duplicate_field("countTotal")); + } + count_total__ = Some(map_.next_value()?); + } + GeneratedField::Reverse => { + if reverse__.is_some() { + return Err(serde::de::Error::duplicate_field("reverse")); + } + reverse__ = Some(map_.next_value()?); + } + } + } + Ok(PageRequest { + key: key__.unwrap_or_default(), + offset: offset__.unwrap_or_default(), + limit: limit__.unwrap_or_default(), + count_total: count_total__.unwrap_or_default(), + reverse: reverse__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.query.v1beta1.PageRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for PageResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.next_key.is_empty() { + len += 1; + } + if self.total != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos.base.query.v1beta1.PageResponse", len)?; + if !self.next_key.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "nextKey", + pbjson::private::base64::encode(&self.next_key).as_str(), + )?; + } + if self.total != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("total", ToString::to_string(&self.total).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PageResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["next_key", "nextKey", "total"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + NextKey, + Total, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "nextKey" | "next_key" => Ok(GeneratedField::NextKey), + "total" => Ok(GeneratedField::Total), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PageResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.query.v1beta1.PageResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut next_key__ = None; + let mut total__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::NextKey => { + if next_key__.is_some() { + return Err(serde::de::Error::duplicate_field("nextKey")); + } + next_key__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Total => { + if total__.is_some() { + return Err(serde::de::Error::duplicate_field("total")); + } + total__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(PageResponse { + next_key: next_key__.unwrap_or_default(), + total: total__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos.base.query.v1beta1.PageResponse", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs index cc4421b2..8a02bbd7 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs @@ -3,6 +3,7 @@ /// /// NOTE: The amount field is an Int which implements the custom method /// signatures required by gogoproto. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Coin { #[prost(string, tag = "1")] @@ -14,6 +15,7 @@ pub struct Coin { /// /// NOTE: The amount field is an Dec which implements the custom method /// signatures required by gogoproto. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecCoin { #[prost(string, tag = "1")] @@ -22,15 +24,18 @@ pub struct DecCoin { pub amount: ::prost::alloc::string::String, } /// IntProto defines a Protobuf wrapper around an Int object. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IntProto { #[prost(string, tag = "1")] pub int: ::prost::alloc::string::String, } /// DecProto defines a Protobuf wrapper around a Dec object. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecProto { #[prost(string, tag = "1")] pub dec: ::prost::alloc::string::String, } +include!("cosmos.base.v1beta1.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs new file mode 100644 index 00000000..a9daa350 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs @@ -0,0 +1,401 @@ +// @generated +impl serde::Serialize for Coin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.Coin", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Coin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Coin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.v1beta1.Coin") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + let mut amount__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map_.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map_.next_value()?); + } + } + } + Ok(Coin { + denom: denom__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.v1beta1.Coin", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DecCoin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.denom.is_empty() { + len += 1; + } + if !self.amount.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.DecCoin", len)?; + if !self.denom.is_empty() { + struct_ser.serialize_field("denom", &self.denom)?; + } + if !self.amount.is_empty() { + struct_ser.serialize_field("amount", &self.amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DecCoin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["denom", "amount"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DecCoin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.v1beta1.DecCoin") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + let mut amount__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map_.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = Some(map_.next_value()?); + } + } + } + Ok(DecCoin { + denom: denom__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.v1beta1.DecCoin", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DecProto { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.dec.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.DecProto", len)?; + if !self.dec.is_empty() { + struct_ser.serialize_field("dec", &self.dec)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DecProto { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["dec"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Dec, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "dec" => Ok(GeneratedField::Dec), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DecProto; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.v1beta1.DecProto") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut dec__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Dec => { + if dec__.is_some() { + return Err(serde::de::Error::duplicate_field("dec")); + } + dec__ = Some(map_.next_value()?); + } + } + } + Ok(DecProto { + dec: dec__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.v1beta1.DecProto", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for IntProto { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.int.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.v1beta1.IntProto", len)?; + if !self.int.is_empty() { + struct_ser.serialize_field("int", &self.int)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for IntProto { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["int"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Int, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "int" => Ok(GeneratedField::Int), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = IntProto; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos.base.v1beta1.IntProto") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut int__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Int => { + if int__.is_some() { + return Err(serde::de::Error::duplicate_field("int")); + } + int__ = Some(map_.next_value()?); + } + } + } + Ok(IntProto { + int: int__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.v1beta1.IntProto", FIELDS, GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs index a74f2b1e..2353a154 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs @@ -1,6 +1,7 @@ // @generated /// InterfaceDescriptor describes an interface type to be used with /// accepts_interface and implements_interface and declared by declare_interface. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceDescriptor { /// name is the name of the interface. It should be a short-name (without @@ -21,6 +22,7 @@ pub struct InterfaceDescriptor { /// Scalars should ideally define an encoding such that there is only one /// valid syntactical representation for a given semantic meaning, /// i.e. the encoding should be deterministic. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScalarDescriptor { /// name is the name of the scalar. It should be a short-name (without @@ -60,5 +62,15 @@ impl ScalarType { ScalarType::Bytes => "SCALAR_TYPE_BYTES", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SCALAR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "SCALAR_TYPE_STRING" => Some(Self::String), + "SCALAR_TYPE_BYTES" => Some(Self::Bytes), + _ => None, + } + } } +include!("cosmos_proto.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs new file mode 100644 index 00000000..dde23d28 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs @@ -0,0 +1,326 @@ +// @generated +impl serde::Serialize for InterfaceDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmos_proto.InterfaceDescriptor", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "description"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Description, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "description" => Ok(GeneratedField::Description), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = InterfaceDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos_proto.InterfaceDescriptor") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut description__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + } + } + Ok(InterfaceDescriptor { + name: name__.unwrap_or_default(), + description: description__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmos_proto.InterfaceDescriptor", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ScalarDescriptor { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.name.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.field_type.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos_proto.ScalarDescriptor", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.field_type.is_empty() { + let v = self + .field_type + .iter() + .cloned() + .map(|v| { + ScalarType::try_from(v) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", v))) + }) + .collect::, _>>()?; + struct_ser.serialize_field("fieldType", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ScalarDescriptor { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["name", "description", "field_type", "fieldType"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Description, + FieldType, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "description" => Ok(GeneratedField::Description), + "fieldType" | "field_type" => Ok(GeneratedField::FieldType), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ScalarDescriptor; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmos_proto.ScalarDescriptor") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut description__ = None; + let mut field_type__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::FieldType => { + if field_type__.is_some() { + return Err(serde::de::Error::duplicate_field("fieldType")); + } + field_type__ = Some( + map_.next_value::>()? + .into_iter() + .map(|x| x as i32) + .collect(), + ); + } + } + } + Ok(ScalarDescriptor { + name: name__.unwrap_or_default(), + description: description__.unwrap_or_default(), + field_type: field_type__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos_proto.ScalarDescriptor", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ScalarType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "SCALAR_TYPE_UNSPECIFIED", + Self::String => "SCALAR_TYPE_STRING", + Self::Bytes => "SCALAR_TYPE_BYTES", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ScalarType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "SCALAR_TYPE_UNSPECIFIED", + "SCALAR_TYPE_STRING", + "SCALAR_TYPE_BYTES", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ScalarType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::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) -> std::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) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "SCALAR_TYPE_UNSPECIFIED" => Ok(ScalarType::Unspecified), + "SCALAR_TYPE_STRING" => Ok(ScalarType::String), + "SCALAR_TYPE_BYTES" => Ok(ScalarType::Bytes), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs index d2ed2ea6..d2f4abce 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs @@ -1,11 +1,13 @@ // @generated /// AccessTypeParam +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccessTypeParam { #[prost(enumeration = "AccessType", tag = "1")] pub value: i32, } /// AccessConfig access control type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccessConfig { #[prost(enumeration = "AccessType", tag = "1")] @@ -18,6 +20,7 @@ pub struct AccessConfig { pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Params defines the set of wasm parameters. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(message, optional, tag = "1")] @@ -26,6 +29,7 @@ pub struct Params { pub instantiate_default_permission: i32, } /// CodeInfo is data for the uploaded contract WASM code +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CodeInfo { /// CodeHash is the unique identifier created by wasmvm @@ -39,6 +43,7 @@ pub struct CodeInfo { pub instantiate_config: ::core::option::Option, } /// ContractInfo stores a WASM contract instance +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContractInfo { /// CodeID is the reference to the stored Wasm code @@ -66,6 +71,7 @@ pub struct ContractInfo { pub extension: ::core::option::Option<::prost_types::Any>, } /// ContractCodeHistoryEntry metadata to a contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContractCodeHistoryEntry { #[prost(enumeration = "ContractCodeHistoryOperationType", tag = "1")] @@ -81,6 +87,7 @@ pub struct ContractCodeHistoryEntry { } /// AbsoluteTxPosition is a unique transaction position that allows for global /// ordering of transactions. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbsoluteTxPosition { /// BlockHeight is the block the contract was created at @@ -92,6 +99,7 @@ pub struct AbsoluteTxPosition { pub tx_index: u64, } /// Model is a struct that holds a KV pair +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Model { /// hex-encode key to read it better (this is often ascii) @@ -131,6 +139,17 @@ impl AccessType { AccessType::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "ACCESS_TYPE_NOBODY" => Some(Self::Nobody), + "ACCESS_TYPE_ONLY_ADDRESS" => Some(Self::OnlyAddress), + "ACCESS_TYPE_EVERYBODY" => Some(Self::Everybody), + "ACCESS_TYPE_ANY_OF_ADDRESSES" => Some(Self::AnyOfAddresses), + _ => None, + } + } } /// ContractCodeHistoryOperationType actions that caused a code change #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -164,8 +183,19 @@ impl ContractCodeHistoryOperationType { } } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT" => Some(Self::Init), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" => Some(Self::Migrate), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" => Some(Self::Genesis), + _ => None, + } + } } /// MsgStoreCode submit Wasm code to the system +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgStoreCode { /// Sender is the that actor that signed the messages @@ -180,6 +210,7 @@ pub struct MsgStoreCode { pub instantiate_permission: ::core::option::Option, } /// MsgStoreCodeResponse returns store result data. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgStoreCodeResponse { /// CodeID is the reference to the stored WASM code @@ -191,6 +222,7 @@ pub struct MsgStoreCodeResponse { } /// MsgInstantiateContract create a new smart contract instance for the given /// code id. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgInstantiateContract { /// Sender is the that actor that signed the messages @@ -214,6 +246,7 @@ pub struct MsgInstantiateContract { } /// MsgInstantiateContract2 create a new smart contract instance for the given /// code id with a predicable address. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgInstantiateContract2 { /// Sender is the that actor that signed the messages @@ -243,6 +276,7 @@ pub struct MsgInstantiateContract2 { pub fix_msg: bool, } /// MsgInstantiateContractResponse return instantiation result data +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgInstantiateContractResponse { /// Address is the bech32 address of the new contract instance. @@ -253,6 +287,7 @@ pub struct MsgInstantiateContractResponse { pub data: ::prost::alloc::vec::Vec, } /// MsgInstantiateContract2Response return instantiation result data +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgInstantiateContract2Response { /// Address is the bech32 address of the new contract instance. @@ -263,6 +298,7 @@ pub struct MsgInstantiateContract2Response { pub data: ::prost::alloc::vec::Vec, } /// MsgExecuteContract submits the given message data to a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecuteContract { /// Sender is the that actor that signed the messages @@ -279,6 +315,7 @@ pub struct MsgExecuteContract { pub funds: ::prost::alloc::vec::Vec, } /// MsgExecuteContractResponse returns execution result data. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecuteContractResponse { /// Data contains bytes to returned from the contract @@ -286,6 +323,7 @@ pub struct MsgExecuteContractResponse { pub data: ::prost::alloc::vec::Vec, } /// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMigrateContract { /// Sender is the that actor that signed the messages @@ -302,6 +340,7 @@ pub struct MsgMigrateContract { pub msg: ::prost::alloc::vec::Vec, } /// MsgMigrateContractResponse returns contract migration result data. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMigrateContractResponse { /// Data contains same raw bytes returned as data from the wasm contract. @@ -310,6 +349,7 @@ pub struct MsgMigrateContractResponse { pub data: ::prost::alloc::vec::Vec, } /// MsgUpdateAdmin sets a new admin for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateAdmin { /// Sender is the that actor that signed the messages @@ -323,9 +363,11 @@ pub struct MsgUpdateAdmin { pub contract: ::prost::alloc::string::String, } /// MsgUpdateAdminResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateAdminResponse {} /// MsgClearAdmin removes any admin stored for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgClearAdmin { /// Sender is the that actor that signed the messages @@ -336,9 +378,11 @@ pub struct MsgClearAdmin { pub contract: ::prost::alloc::string::String, } /// MsgClearAdminResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgClearAdminResponse {} /// GenesisState - genesis state of x/wasm +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, optional, tag = "1")] @@ -356,6 +400,7 @@ pub struct GenesisState { pub mod genesis_state { /// GenMsgs define the messages that can be executed during genesis phase in /// order. The intention is to have more human readable data that is auditable. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenMsgs { /// sum is a single message @@ -365,6 +410,7 @@ pub mod genesis_state { /// Nested message and enum types in `GenMsgs`. pub mod gen_msgs { /// sum is a single message + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Sum { #[prost(message, tag = "1")] @@ -379,6 +425,7 @@ pub mod genesis_state { } } /// Code struct encompasses CodeInfo and CodeBytes +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Code { #[prost(uint64, tag = "1")] @@ -392,6 +439,7 @@ pub struct Code { pub pinned: bool, } /// Contract struct encompasses ContractAddress, ContractInfo, and ContractState +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Contract { #[prost(string, tag = "1")] @@ -402,6 +450,7 @@ pub struct Contract { pub contract_state: ::prost::alloc::vec::Vec, } /// Sequence key and value of an id generation counter +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Sequence { #[prost(bytes = "vec", tag = "1")] @@ -410,6 +459,7 @@ pub struct Sequence { pub value: u64, } /// MsgIBCSend +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgIbcSend { /// the channel by which the packet will be sent @@ -429,12 +479,14 @@ pub struct MsgIbcSend { pub data: ::prost::alloc::vec::Vec, } /// MsgIBCCloseChannel port and channel need to be owned by the contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgIbcCloseChannel { #[prost(string, tag = "2")] pub channel: ::prost::alloc::string::String, } /// StoreCodeProposal gov proposal content type to submit WASM code to the system +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreCodeProposal { /// Title is a short summary @@ -458,6 +510,7 @@ pub struct StoreCodeProposal { } /// InstantiateContractProposal gov proposal content type to instantiate a /// contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InstantiateContractProposal { /// Title is a short summary @@ -486,6 +539,7 @@ pub struct InstantiateContractProposal { pub funds: ::prost::alloc::vec::Vec, } /// MigrateContractProposal gov proposal content type to migrate a contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateContractProposal { /// Title is a short summary @@ -507,6 +561,7 @@ pub struct MigrateContractProposal { pub msg: ::prost::alloc::vec::Vec, } /// SudoContractProposal gov proposal content type to call sudo on a contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SudoContractProposal { /// Title is a short summary @@ -524,6 +579,7 @@ pub struct SudoContractProposal { } /// ExecuteContractProposal gov proposal content type to call execute on a /// contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecuteContractProposal { /// Title is a short summary @@ -546,6 +602,7 @@ pub struct ExecuteContractProposal { pub funds: ::prost::alloc::vec::Vec, } /// UpdateAdminProposal gov proposal content type to set an admin for a contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateAdminProposal { /// Title is a short summary @@ -563,6 +620,7 @@ pub struct UpdateAdminProposal { } /// ClearAdminProposal gov proposal content type to clear the admin of a /// contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClearAdminProposal { /// Title is a short summary @@ -577,6 +635,7 @@ pub struct ClearAdminProposal { } /// PinCodesProposal gov proposal content type to pin a set of code ids in the /// wasmvm cache. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PinCodesProposal { /// Title is a short summary @@ -591,6 +650,7 @@ pub struct PinCodesProposal { } /// UnpinCodesProposal gov proposal content type to unpin a set of code ids in /// the wasmvm cache. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnpinCodesProposal { /// Title is a short summary @@ -605,6 +665,7 @@ pub struct UnpinCodesProposal { } /// AccessConfigUpdate contains the code id and the access config to be /// applied. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccessConfigUpdate { /// CodeID is the reference to the stored WASM code to be updated @@ -616,6 +677,7 @@ pub struct AccessConfigUpdate { } /// UpdateInstantiateConfigProposal gov proposal content type to update /// instantiate config to a set of code ids. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateInstantiateConfigProposal { /// Title is a short summary @@ -631,6 +693,7 @@ pub struct UpdateInstantiateConfigProposal { } /// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractInfoRequest { /// address is the address of the contract to query @@ -639,6 +702,7 @@ pub struct QueryContractInfoRequest { } /// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractInfoResponse { /// address is the address of the contract @@ -649,6 +713,7 @@ pub struct QueryContractInfoResponse { } /// QueryContractHistoryRequest is the request type for the Query/ContractHistory /// RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractHistoryRequest { /// address is the address of the contract to query @@ -661,6 +726,7 @@ pub struct QueryContractHistoryRequest { } /// QueryContractHistoryResponse is the response type for the /// Query/ContractHistory RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractHistoryResponse { #[prost(message, repeated, tag = "1")] @@ -672,6 +738,7 @@ pub struct QueryContractHistoryResponse { } /// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode /// RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractsByCodeRequest { /// grpc-gateway_out does not support Go style CodID @@ -684,6 +751,7 @@ pub struct QueryContractsByCodeRequest { } /// QueryContractsByCodeResponse is the response type for the /// Query/ContractsByCode RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractsByCodeResponse { /// contracts are a set of contract addresses @@ -696,6 +764,7 @@ pub struct QueryContractsByCodeResponse { } /// QueryAllContractStateRequest is the request type for the /// Query/AllContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllContractStateRequest { /// address is the address of the contract @@ -708,6 +777,7 @@ pub struct QueryAllContractStateRequest { } /// QueryAllContractStateResponse is the response type for the /// Query/AllContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllContractStateResponse { #[prost(message, repeated, tag = "1")] @@ -719,6 +789,7 @@ pub struct QueryAllContractStateResponse { } /// QueryRawContractStateRequest is the request type for the /// Query/RawContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRawContractStateRequest { /// address is the address of the contract @@ -729,6 +800,7 @@ pub struct QueryRawContractStateRequest { } /// QueryRawContractStateResponse is the response type for the /// Query/RawContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRawContractStateResponse { /// Data contains the raw store data @@ -737,6 +809,7 @@ pub struct QueryRawContractStateResponse { } /// QuerySmartContractStateRequest is the request type for the /// Query/SmartContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySmartContractStateRequest { /// address is the address of the contract @@ -748,6 +821,7 @@ pub struct QuerySmartContractStateRequest { } /// QuerySmartContractStateResponse is the response type for the /// Query/SmartContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySmartContractStateResponse { /// Data contains the json data returned from the smart contract @@ -755,6 +829,7 @@ pub struct QuerySmartContractStateResponse { pub data: ::prost::alloc::vec::Vec, } /// QueryCodeRequest is the request type for the Query/Code RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCodeRequest { /// grpc-gateway_out does not support Go style CodID @@ -762,6 +837,7 @@ pub struct QueryCodeRequest { pub code_id: u64, } /// CodeInfoResponse contains code meta data from CodeInfo +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CodeInfoResponse { /// id for legacy support @@ -775,6 +851,7 @@ pub struct CodeInfoResponse { pub instantiate_permission: ::core::option::Option, } /// QueryCodeResponse is the response type for the Query/Code RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCodeResponse { #[prost(message, optional, tag = "1")] @@ -783,6 +860,7 @@ pub struct QueryCodeResponse { pub data: ::prost::alloc::vec::Vec, } /// QueryCodesRequest is the request type for the Query/Codes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCodesRequest { /// pagination defines an optional pagination for the request. @@ -791,6 +869,7 @@ pub struct QueryCodesRequest { ::core::option::Option, } /// QueryCodesResponse is the response type for the Query/Codes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCodesResponse { #[prost(message, repeated, tag = "1")] @@ -802,6 +881,7 @@ pub struct QueryCodesResponse { } /// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes /// RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPinnedCodesRequest { /// pagination defines an optional pagination for the request. @@ -811,6 +891,7 @@ pub struct QueryPinnedCodesRequest { } /// QueryPinnedCodesResponse is the response type for the /// Query/PinnedCodes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPinnedCodesResponse { #[prost(uint64, repeated, packed = "false", tag = "1")] @@ -821,14 +902,17 @@ pub struct QueryPinnedCodesResponse { ::core::option::Option, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } +include!("cosmwasm.wasm.v1.serde.rs"); include!("cosmwasm.wasm.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs new file mode 100644 index 00000000..553922eb --- /dev/null +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs @@ -0,0 +1,8229 @@ +// @generated +impl serde::Serialize for AbsoluteTxPosition { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.block_height != 0 { + len += 1; + } + if self.tx_index != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.AbsoluteTxPosition", len)?; + if self.block_height != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "blockHeight", + ToString::to_string(&self.block_height).as_str(), + )?; + } + if self.tx_index != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("txIndex", ToString::to_string(&self.tx_index).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["block_height", "blockHeight", "tx_index", "txIndex"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BlockHeight, + TxIndex, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "blockHeight" | "block_height" => Ok(GeneratedField::BlockHeight), + "txIndex" | "tx_index" => Ok(GeneratedField::TxIndex), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AbsoluteTxPosition; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.AbsoluteTxPosition") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut block_height__ = None; + let mut tx_index__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::BlockHeight => { + if block_height__.is_some() { + return Err(serde::de::Error::duplicate_field("blockHeight")); + } + block_height__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::TxIndex => { + if tx_index__.is_some() { + return Err(serde::de::Error::duplicate_field("txIndex")); + } + tx_index__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(AbsoluteTxPosition { + block_height: block_height__.unwrap_or_default(), + tx_index: tx_index__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.AbsoluteTxPosition", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AccessConfig { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.permission != 0 { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + if !self.addresses.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.AccessConfig", len)?; + if self.permission != 0 { + let v = AccessType::try_from(self.permission).map_err(|_| { + serde::ser::Error::custom(format!("Invalid variant {}", self.permission)) + })?; + struct_ser.serialize_field("permission", &v)?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.addresses.is_empty() { + struct_ser.serialize_field("addresses", &self.addresses)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AccessConfig { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["permission", "address", "addresses"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Permission, + Address, + Addresses, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "permission" => Ok(GeneratedField::Permission), + "address" => Ok(GeneratedField::Address), + "addresses" => Ok(GeneratedField::Addresses), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AccessConfig; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.AccessConfig") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut permission__ = None; + let mut address__ = None; + let mut addresses__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Permission => { + if permission__.is_some() { + return Err(serde::de::Error::duplicate_field("permission")); + } + permission__ = Some(map_.next_value::()? as i32); + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } + GeneratedField::Addresses => { + if addresses__.is_some() { + return Err(serde::de::Error::duplicate_field("addresses")); + } + addresses__ = Some(map_.next_value()?); + } + } + } + Ok(AccessConfig { + permission: permission__.unwrap_or_default(), + address: address__.unwrap_or_default(), + addresses: addresses__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.AccessConfig", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for AccessConfigUpdate { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + if self.instantiate_permission.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.AccessConfigUpdate", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AccessConfigUpdate { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code_id", + "codeId", + "instantiate_permission", + "instantiatePermission", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeId, + InstantiatePermission, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AccessConfigUpdate; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.AccessConfigUpdate") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_id__ = None; + let mut instantiate_permission__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; + } + } + } + Ok(AccessConfigUpdate { + code_id: code_id__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.AccessConfigUpdate", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AccessType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "ACCESS_TYPE_UNSPECIFIED", + Self::Nobody => "ACCESS_TYPE_NOBODY", + Self::OnlyAddress => "ACCESS_TYPE_ONLY_ADDRESS", + Self::Everybody => "ACCESS_TYPE_EVERYBODY", + Self::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for AccessType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "ACCESS_TYPE_UNSPECIFIED", + "ACCESS_TYPE_NOBODY", + "ACCESS_TYPE_ONLY_ADDRESS", + "ACCESS_TYPE_EVERYBODY", + "ACCESS_TYPE_ANY_OF_ADDRESSES", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AccessType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::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) -> std::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) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "ACCESS_TYPE_UNSPECIFIED" => Ok(AccessType::Unspecified), + "ACCESS_TYPE_NOBODY" => Ok(AccessType::Nobody), + "ACCESS_TYPE_ONLY_ADDRESS" => Ok(AccessType::OnlyAddress), + "ACCESS_TYPE_EVERYBODY" => Ok(AccessType::Everybody), + "ACCESS_TYPE_ANY_OF_ADDRESSES" => Ok(AccessType::AnyOfAddresses), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for AccessTypeParam { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.value != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.AccessTypeParam", len)?; + if self.value != 0 { + let v = AccessType::try_from(self.value).map_err(|_| { + serde::ser::Error::custom(format!("Invalid variant {}", self.value)) + })?; + struct_ser.serialize_field("value", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AccessTypeParam { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AccessTypeParam; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.AccessTypeParam") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut value__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some(map_.next_value::()? as i32); + } + } + } + Ok(AccessTypeParam { + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.AccessTypeParam", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ClearAdminProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.ClearAdminProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ClearAdminProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "contract"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + Contract, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "contract" => Ok(GeneratedField::Contract), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ClearAdminProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.ClearAdminProposal") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut contract__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + } + } + Ok(ClearAdminProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.ClearAdminProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Code { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + if self.code_info.is_some() { + len += 1; + } + if !self.code_bytes.is_empty() { + len += 1; + } + if self.pinned { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Code", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if let Some(v) = self.code_info.as_ref() { + struct_ser.serialize_field("codeInfo", v)?; + } + if !self.code_bytes.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "codeBytes", + pbjson::private::base64::encode(&self.code_bytes).as_str(), + )?; + } + if self.pinned { + struct_ser.serialize_field("pinned", &self.pinned)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Code { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code_id", + "codeId", + "code_info", + "codeInfo", + "code_bytes", + "codeBytes", + "pinned", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeId, + CodeInfo, + CodeBytes, + Pinned, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "codeInfo" | "code_info" => Ok(GeneratedField::CodeInfo), + "codeBytes" | "code_bytes" => Ok(GeneratedField::CodeBytes), + "pinned" => Ok(GeneratedField::Pinned), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Code; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.Code") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_id__ = None; + let mut code_info__ = None; + let mut code_bytes__ = None; + let mut pinned__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::CodeInfo => { + if code_info__.is_some() { + return Err(serde::de::Error::duplicate_field("codeInfo")); + } + code_info__ = map_.next_value()?; + } + GeneratedField::CodeBytes => { + if code_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("codeBytes")); + } + code_bytes__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pinned => { + if pinned__.is_some() { + return Err(serde::de::Error::duplicate_field("pinned")); + } + pinned__ = Some(map_.next_value()?); + } + } + } + Ok(Code { + code_id: code_id__.unwrap_or_default(), + code_info: code_info__, + code_bytes: code_bytes__.unwrap_or_default(), + pinned: pinned__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.Code", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for CodeInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.code_hash.is_empty() { + len += 1; + } + if !self.creator.is_empty() { + len += 1; + } + if self.instantiate_config.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.CodeInfo", len)?; + if !self.code_hash.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "codeHash", + pbjson::private::base64::encode(&self.code_hash).as_str(), + )?; + } + if !self.creator.is_empty() { + struct_ser.serialize_field("creator", &self.creator)?; + } + if let Some(v) = self.instantiate_config.as_ref() { + struct_ser.serialize_field("instantiateConfig", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CodeInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code_hash", + "codeHash", + "creator", + "instantiate_config", + "instantiateConfig", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeHash, + Creator, + InstantiateConfig, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), + "creator" => Ok(GeneratedField::Creator), + "instantiateConfig" | "instantiate_config" => { + Ok(GeneratedField::InstantiateConfig) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CodeInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.CodeInfo") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_hash__ = None; + let mut creator__ = None; + let mut instantiate_config__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeHash => { + if code_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("codeHash")); + } + code_hash__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Creator => { + if creator__.is_some() { + return Err(serde::de::Error::duplicate_field("creator")); + } + creator__ = Some(map_.next_value()?); + } + GeneratedField::InstantiateConfig => { + if instantiate_config__.is_some() { + return Err(serde::de::Error::duplicate_field("instantiateConfig")); + } + instantiate_config__ = map_.next_value()?; + } + } + } + Ok(CodeInfo { + code_hash: code_hash__.unwrap_or_default(), + creator: creator__.unwrap_or_default(), + instantiate_config: instantiate_config__, + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.CodeInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for CodeInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + if !self.creator.is_empty() { + len += 1; + } + if !self.data_hash.is_empty() { + len += 1; + } + if self.instantiate_permission.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.CodeInfoResponse", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.creator.is_empty() { + struct_ser.serialize_field("creator", &self.creator)?; + } + if !self.data_hash.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "dataHash", + pbjson::private::base64::encode(&self.data_hash).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CodeInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code_id", + "codeId", + "creator", + "data_hash", + "dataHash", + "instantiate_permission", + "instantiatePermission", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeId, + Creator, + DataHash, + InstantiatePermission, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "creator" => Ok(GeneratedField::Creator), + "dataHash" | "data_hash" => Ok(GeneratedField::DataHash), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CodeInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.CodeInfoResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_id__ = None; + let mut creator__ = None; + let mut data_hash__ = None; + let mut instantiate_permission__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Creator => { + if creator__.is_some() { + return Err(serde::de::Error::duplicate_field("creator")); + } + creator__ = Some(map_.next_value()?); + } + GeneratedField::DataHash => { + if data_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("dataHash")); + } + data_hash__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; + } + } + } + Ok(CodeInfoResponse { + code_id: code_id__.unwrap_or_default(), + creator: creator__.unwrap_or_default(), + data_hash: data_hash__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.CodeInfoResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Contract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.contract_address.is_empty() { + len += 1; + } + if self.contract_info.is_some() { + len += 1; + } + if !self.contract_state.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Contract", len)?; + if !self.contract_address.is_empty() { + struct_ser.serialize_field("contractAddress", &self.contract_address)?; + } + if let Some(v) = self.contract_info.as_ref() { + struct_ser.serialize_field("contractInfo", v)?; + } + if !self.contract_state.is_empty() { + struct_ser.serialize_field("contractState", &self.contract_state)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Contract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "contract_address", + "contractAddress", + "contract_info", + "contractInfo", + "contract_state", + "contractState", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ContractAddress, + ContractInfo, + ContractState, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "contractAddress" | "contract_address" => { + Ok(GeneratedField::ContractAddress) + } + "contractInfo" | "contract_info" => Ok(GeneratedField::ContractInfo), + "contractState" | "contract_state" => Ok(GeneratedField::ContractState), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Contract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.Contract") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut contract_address__ = None; + let mut contract_info__ = None; + let mut contract_state__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::ContractAddress => { + if contract_address__.is_some() { + return Err(serde::de::Error::duplicate_field("contractAddress")); + } + contract_address__ = Some(map_.next_value()?); + } + GeneratedField::ContractInfo => { + if contract_info__.is_some() { + return Err(serde::de::Error::duplicate_field("contractInfo")); + } + contract_info__ = map_.next_value()?; + } + GeneratedField::ContractState => { + if contract_state__.is_some() { + return Err(serde::de::Error::duplicate_field("contractState")); + } + contract_state__ = Some(map_.next_value()?); + } + } + } + Ok(Contract { + contract_address: contract_address__.unwrap_or_default(), + contract_info: contract_info__, + contract_state: contract_state__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.Contract", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ContractCodeHistoryEntry { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.operation != 0 { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if self.updated.is_some() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.ContractCodeHistoryEntry", len)?; + if self.operation != 0 { + let v = ContractCodeHistoryOperationType::try_from(self.operation).map_err(|_| { + serde::ser::Error::custom(format!("Invalid variant {}", self.operation)) + })?; + struct_ser.serialize_field("operation", &v)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if let Some(v) = self.updated.as_ref() { + struct_ser.serialize_field("updated", v)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ContractCodeHistoryEntry { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["operation", "code_id", "codeId", "updated", "msg"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Operation, + CodeId, + Updated, + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "operation" => Ok(GeneratedField::Operation), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "updated" => Ok(GeneratedField::Updated), + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ContractCodeHistoryEntry; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.ContractCodeHistoryEntry") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut operation__ = None; + let mut code_id__ = None; + let mut updated__ = None; + let mut msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Operation => { + if operation__.is_some() { + return Err(serde::de::Error::duplicate_field("operation")); + } + operation__ = + Some(map_.next_value::()? as i32); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Updated => { + if updated__.is_some() { + return Err(serde::de::Error::duplicate_field("updated")); + } + updated__ = map_.next_value()?; + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(ContractCodeHistoryEntry { + operation: operation__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + updated: updated__, + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.ContractCodeHistoryEntry", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for ContractCodeHistoryOperationType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED", + Self::Init => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", + Self::Migrate => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE", + Self::Genesis => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ContractCodeHistoryOperationType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED", + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE", + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ContractCodeHistoryOperationType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::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) -> std::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) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" => { + Ok(ContractCodeHistoryOperationType::Unspecified) + } + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT" => { + Ok(ContractCodeHistoryOperationType::Init) + } + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" => { + Ok(ContractCodeHistoryOperationType::Migrate) + } + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" => { + Ok(ContractCodeHistoryOperationType::Genesis) + } + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for ContractInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + if !self.creator.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if self.created.is_some() { + len += 1; + } + if !self.ibc_port_id.is_empty() { + len += 1; + } + if self.extension.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.ContractInfo", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.creator.is_empty() { + struct_ser.serialize_field("creator", &self.creator)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if let Some(v) = self.created.as_ref() { + struct_ser.serialize_field("created", v)?; + } + if !self.ibc_port_id.is_empty() { + struct_ser.serialize_field("ibcPortId", &self.ibc_port_id)?; + } + if let Some(v) = self.extension.as_ref() { + struct_ser.serialize_field("extension", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ContractInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code_id", + "codeId", + "creator", + "admin", + "label", + "created", + "ibc_port_id", + "ibcPortId", + "extension", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeId, + Creator, + Admin, + Label, + Created, + IbcPortId, + Extension, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "creator" => Ok(GeneratedField::Creator), + "admin" => Ok(GeneratedField::Admin), + "label" => Ok(GeneratedField::Label), + "created" => Ok(GeneratedField::Created), + "ibcPortId" | "ibc_port_id" => Ok(GeneratedField::IbcPortId), + "extension" => Ok(GeneratedField::Extension), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ContractInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.ContractInfo") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_id__ = None; + let mut creator__ = None; + let mut admin__ = None; + let mut label__ = None; + let mut created__ = None; + let mut ibc_port_id__ = None; + let mut extension__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Creator => { + if creator__.is_some() { + return Err(serde::de::Error::duplicate_field("creator")); + } + creator__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Created => { + if created__.is_some() { + return Err(serde::de::Error::duplicate_field("created")); + } + created__ = map_.next_value()?; + } + GeneratedField::IbcPortId => { + if ibc_port_id__.is_some() { + return Err(serde::de::Error::duplicate_field("ibcPortId")); + } + ibc_port_id__ = Some(map_.next_value()?); + } + GeneratedField::Extension => { + if extension__.is_some() { + return Err(serde::de::Error::duplicate_field("extension")); + } + extension__ = map_.next_value()?; + } + } + } + Ok(ContractInfo { + code_id: code_id__.unwrap_or_default(), + creator: creator__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + label: label__.unwrap_or_default(), + created: created__, + ibc_port_id: ibc_port_id__.unwrap_or_default(), + extension: extension__, + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ExecuteContractProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.run_as.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.ExecuteContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.run_as.is_empty() { + struct_ser.serialize_field("runAs", &self.run_as)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "title", + "description", + "run_as", + "runAs", + "contract", + "msg", + "funds", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + RunAs, + Contract, + Msg, + Funds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "runAs" | "run_as" => Ok(GeneratedField::RunAs), + "contract" => Ok(GeneratedField::Contract), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ExecuteContractProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.ExecuteContractProposal") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut run_as__ = None; + let mut contract__ = None; + let mut msg__ = None; + let mut funds__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::RunAs => { + if run_as__.is_some() { + return Err(serde::de::Error::duplicate_field("runAs")); + } + run_as__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + } + } + Ok(ExecuteContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + run_as: run_as__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.ExecuteContractProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + if !self.codes.is_empty() { + len += 1; + } + if !self.contracts.is_empty() { + len += 1; + } + if !self.sequences.is_empty() { + len += 1; + } + if !self.gen_msgs.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.GenesisState", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + if !self.codes.is_empty() { + struct_ser.serialize_field("codes", &self.codes)?; + } + if !self.contracts.is_empty() { + struct_ser.serialize_field("contracts", &self.contracts)?; + } + if !self.sequences.is_empty() { + struct_ser.serialize_field("sequences", &self.sequences)?; + } + if !self.gen_msgs.is_empty() { + struct_ser.serialize_field("genMsgs", &self.gen_msgs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "params", + "codes", + "contracts", + "sequences", + "gen_msgs", + "genMsgs", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + Codes, + Contracts, + Sequences, + GenMsgs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "params" => Ok(GeneratedField::Params), + "codes" => Ok(GeneratedField::Codes), + "contracts" => Ok(GeneratedField::Contracts), + "sequences" => Ok(GeneratedField::Sequences), + "genMsgs" | "gen_msgs" => Ok(GeneratedField::GenMsgs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.GenesisState") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + let mut codes__ = None; + let mut contracts__ = None; + let mut sequences__ = None; + let mut gen_msgs__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map_.next_value()?; + } + GeneratedField::Codes => { + if codes__.is_some() { + return Err(serde::de::Error::duplicate_field("codes")); + } + codes__ = Some(map_.next_value()?); + } + GeneratedField::Contracts => { + if contracts__.is_some() { + return Err(serde::de::Error::duplicate_field("contracts")); + } + contracts__ = Some(map_.next_value()?); + } + GeneratedField::Sequences => { + if sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("sequences")); + } + sequences__ = Some(map_.next_value()?); + } + GeneratedField::GenMsgs => { + if gen_msgs__.is_some() { + return Err(serde::de::Error::duplicate_field("genMsgs")); + } + gen_msgs__ = Some(map_.next_value()?); + } + } + } + Ok(GenesisState { + params: params__, + codes: codes__.unwrap_or_default(), + contracts: contracts__.unwrap_or_default(), + sequences: sequences__.unwrap_or_default(), + gen_msgs: gen_msgs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for genesis_state::GenMsgs { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.sum.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.GenesisState.GenMsgs", len)?; + if let Some(v) = self.sum.as_ref() { + match v { + genesis_state::gen_msgs::Sum::StoreCode(v) => { + struct_ser.serialize_field("storeCode", v)?; + } + genesis_state::gen_msgs::Sum::InstantiateContract(v) => { + struct_ser.serialize_field("instantiateContract", v)?; + } + genesis_state::gen_msgs::Sum::ExecuteContract(v) => { + struct_ser.serialize_field("executeContract", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "store_code", + "storeCode", + "instantiate_contract", + "instantiateContract", + "execute_contract", + "executeContract", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + StoreCode, + InstantiateContract, + ExecuteContract, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "storeCode" | "store_code" => Ok(GeneratedField::StoreCode), + "instantiateContract" | "instantiate_contract" => { + Ok(GeneratedField::InstantiateContract) + } + "executeContract" | "execute_contract" => { + Ok(GeneratedField::ExecuteContract) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = genesis_state::GenMsgs; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.GenesisState.GenMsgs") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sum__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::StoreCode => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("storeCode")); + } + sum__ = map_ + .next_value::<::std::option::Option<_>>()? + .map(genesis_state::gen_msgs::Sum::StoreCode); + } + GeneratedField::InstantiateContract => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiateContract", + )); + } + sum__ = map_ + .next_value::<::std::option::Option<_>>()? + .map(genesis_state::gen_msgs::Sum::InstantiateContract); + } + GeneratedField::ExecuteContract => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("executeContract")); + } + sum__ = map_ + .next_value::<::std::option::Option<_>>()? + .map(genesis_state::gen_msgs::Sum::ExecuteContract); + } + } + } + Ok(genesis_state::GenMsgs { sum: sum__ }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.GenesisState.GenMsgs", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for InstantiateContractProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.run_as.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.InstantiateContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.run_as.is_empty() { + struct_ser.serialize_field("runAs", &self.run_as)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "title", + "description", + "run_as", + "runAs", + "admin", + "code_id", + "codeId", + "label", + "msg", + "funds", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + RunAs, + Admin, + CodeId, + Label, + Msg, + Funds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "runAs" | "run_as" => Ok(GeneratedField::RunAs), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = InstantiateContractProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.InstantiateContractProposal") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut run_as__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::RunAs => { + if run_as__.is_some() { + return Err(serde::de::Error::duplicate_field("runAs")); + } + run_as__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + } + } + Ok(InstantiateContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + run_as: run_as__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.InstantiateContractProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MigrateContractProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MigrateContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MigrateContractProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "title", + "description", + "contract", + "code_id", + "codeId", + "msg", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + Contract, + CodeId, + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "contract" => Ok(GeneratedField::Contract), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MigrateContractProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MigrateContractProposal") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut contract__ = None; + let mut code_id__ = None; + let mut msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MigrateContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MigrateContractProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Model { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Model", len)?; + if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if !self.value.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "value", + pbjson::private::base64::encode(&self.value).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Model { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Model; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.Model") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + let mut value__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Model { + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.Model", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgClearAdmin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgClearAdmin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sender", "contract"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Contract, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "contract" => Ok(GeneratedField::Contract), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgClearAdmin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdmin") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut contract__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + } + } + Ok(MsgClearAdmin { + sender: sender__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgClearAdminResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdminResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgClearAdminResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdminResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(MsgClearAdminResponse {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgClearAdminResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgExecuteContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgExecuteContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sender", "contract", "msg", "funds"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Contract, + Msg, + Funds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "contract" => Ok(GeneratedField::Contract), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgExecuteContract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContract") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut contract__ = None; + let mut msg__ = None; + let mut funds__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + } + } + Ok(MsgExecuteContract { + sender: sender__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgExecuteContract", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgExecuteContractResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContractResponse", len)?; + if !self.data.is_empty() { + #[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 MsgExecuteContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = MsgExecuteContractResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContractResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgExecuteContractResponse { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgExecuteContractResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgIbcCloseChannel { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.channel.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCCloseChannel", len)?; + if !self.channel.is_empty() { + struct_ser.serialize_field("channel", &self.channel)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["channel"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Channel, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "channel" => Ok(GeneratedField::Channel), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgIbcCloseChannel; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCCloseChannel") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut channel__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Channel => { + if channel__.is_some() { + return Err(serde::de::Error::duplicate_field("channel")); + } + channel__ = Some(map_.next_value()?); + } + } + } + Ok(MsgIbcCloseChannel { + channel: channel__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgIBCCloseChannel", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgIbcSend { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.channel.is_empty() { + len += 1; + } + if self.timeout_height != 0 { + len += 1; + } + if self.timeout_timestamp != 0 { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCSend", len)?; + if !self.channel.is_empty() { + struct_ser.serialize_field("channel", &self.channel)?; + } + if self.timeout_height != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "timeoutHeight", + ToString::to_string(&self.timeout_height).as_str(), + )?; + } + if self.timeout_timestamp != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "timeoutTimestamp", + ToString::to_string(&self.timeout_timestamp).as_str(), + )?; + } + if !self.data.is_empty() { + #[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 MsgIbcSend { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "channel", + "timeout_height", + "timeoutHeight", + "timeout_timestamp", + "timeoutTimestamp", + "data", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Channel, + TimeoutHeight, + TimeoutTimestamp, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "channel" => Ok(GeneratedField::Channel), + "timeoutHeight" | "timeout_height" => Ok(GeneratedField::TimeoutHeight), + "timeoutTimestamp" | "timeout_timestamp" => { + Ok(GeneratedField::TimeoutTimestamp) + } + "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 = MsgIbcSend; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCSend") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut channel__ = None; + let mut timeout_height__ = None; + let mut timeout_timestamp__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Channel => { + if channel__.is_some() { + return Err(serde::de::Error::duplicate_field("channel")); + } + channel__ = Some(map_.next_value()?); + } + GeneratedField::TimeoutHeight => { + if timeout_height__.is_some() { + return Err(serde::de::Error::duplicate_field("timeoutHeight")); + } + timeout_height__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + 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, + ); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgIbcSend { + channel: channel__.unwrap_or_default(), + timeout_height: timeout_height__.unwrap_or_default(), + timeout_timestamp: timeout_timestamp__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgIBCSend", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgInstantiateContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", "admin", "code_id", "codeId", "label", "msg", "funds", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Admin, + CodeId, + Label, + Msg, + Funds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgInstantiateContract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + } + } + Ok(MsgInstantiateContract { + sender: sender__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgInstantiateContract", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgInstantiateContract2 { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + if !self.salt.is_empty() { + len += 1; + } + if self.fix_msg { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + if !self.salt.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("salt", pbjson::private::base64::encode(&self.salt).as_str())?; + } + if self.fix_msg { + struct_ser.serialize_field("fixMsg", &self.fix_msg)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", "admin", "code_id", "codeId", "label", "msg", "funds", "salt", "fix_msg", + "fixMsg", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Admin, + CodeId, + Label, + Msg, + Funds, + Salt, + FixMsg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + "salt" => Ok(GeneratedField::Salt), + "fixMsg" | "fix_msg" => Ok(GeneratedField::FixMsg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgInstantiateContract2; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + let mut salt__ = None; + let mut fix_msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + GeneratedField::Salt => { + if salt__.is_some() { + return Err(serde::de::Error::duplicate_field("salt")); + } + salt__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::FixMsg => { + if fix_msg__.is_some() { + return Err(serde::de::Error::duplicate_field("fixMsg")); + } + fix_msg__ = Some(map_.next_value()?); + } + } + } + Ok(MsgInstantiateContract2 { + sender: sender__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + salt: salt__.unwrap_or_default(), + fix_msg: fix_msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgInstantiateContract2", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgInstantiateContract2Response { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2Response", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.data.is_empty() { + #[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 MsgInstantiateContract2Response { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "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 = MsgInstantiateContract2Response; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2Response") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = 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, + ); + } + } + } + Ok(MsgInstantiateContract2Response { + address: address__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgInstantiateContract2Response", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgInstantiateContractResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContractResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.data.is_empty() { + #[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 MsgInstantiateContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "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 = MsgInstantiateContractResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContractResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = 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, + ); + } + } + } + Ok(MsgInstantiateContractResponse { + address: address__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgInstantiateContractResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgMigrateContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgMigrateContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sender", "contract", "code_id", "codeId", "msg"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Contract, + CodeId, + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "contract" => Ok(GeneratedField::Contract), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgMigrateContract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContract") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut contract__ = None; + let mut code_id__ = None; + let mut msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgMigrateContract { + sender: sender__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgMigrateContract", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgMigrateContractResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContractResponse", len)?; + if !self.data.is_empty() { + #[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 MsgMigrateContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = MsgMigrateContractResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContractResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgMigrateContractResponse { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgMigrateContractResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgStoreCode { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.wasm_byte_code.is_empty() { + len += 1; + } + if self.instantiate_permission.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCode", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.wasm_byte_code.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "wasmByteCode", + pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgStoreCode { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "wasm_byte_code", + "wasmByteCode", + "instantiate_permission", + "instantiatePermission", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + WasmByteCode, + InstantiatePermission, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgStoreCode; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCode") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut wasm_byte_code__ = None; + let mut instantiate_permission__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::WasmByteCode => { + if wasm_byte_code__.is_some() { + return Err(serde::de::Error::duplicate_field("wasmByteCode")); + } + wasm_byte_code__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; + } + } + } + Ok(MsgStoreCode { + sender: sender__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgStoreCode", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgStoreCodeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + if !self.checksum.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCodeResponse", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.checksum.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "checksum", + pbjson::private::base64::encode(&self.checksum).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["code_id", "codeId", "checksum"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeId, + Checksum, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "checksum" => Ok(GeneratedField::Checksum), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgStoreCodeResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCodeResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_id__ = None; + let mut checksum__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); + } + checksum__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgStoreCodeResponse { + code_id: code_id__.unwrap_or_default(), + checksum: checksum__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgStoreCodeResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateAdmin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.new_admin.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.new_admin.is_empty() { + struct_ser.serialize_field("newAdmin", &self.new_admin)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sender", "new_admin", "newAdmin", "contract"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + NewAdmin, + Contract, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "newAdmin" | "new_admin" => Ok(GeneratedField::NewAdmin), + "contract" => Ok(GeneratedField::Contract), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgUpdateAdmin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdmin") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut new_admin__ = None; + let mut contract__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::NewAdmin => { + if new_admin__.is_some() { + return Err(serde::de::Error::duplicate_field("newAdmin")); + } + new_admin__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + } + } + Ok(MsgUpdateAdmin { + sender: sender__.unwrap_or_default(), + new_admin: new_admin__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgUpdateAdminResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdminResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUpdateAdminResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdminResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(MsgUpdateAdminResponse {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgUpdateAdminResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Params { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_upload_access.is_some() { + len += 1; + } + if self.instantiate_default_permission != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Params", len)?; + if let Some(v) = self.code_upload_access.as_ref() { + struct_ser.serialize_field("codeUploadAccess", v)?; + } + if self.instantiate_default_permission != 0 { + let v = AccessType::try_from(self.instantiate_default_permission).map_err(|_| { + serde::ser::Error::custom(format!( + "Invalid variant {}", + self.instantiate_default_permission + )) + })?; + struct_ser.serialize_field("instantiateDefaultPermission", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Params { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code_upload_access", + "codeUploadAccess", + "instantiate_default_permission", + "instantiateDefaultPermission", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeUploadAccess, + InstantiateDefaultPermission, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeUploadAccess" | "code_upload_access" => { + Ok(GeneratedField::CodeUploadAccess) + } + "instantiateDefaultPermission" | "instantiate_default_permission" => { + Ok(GeneratedField::InstantiateDefaultPermission) + } + _ => 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 std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.Params") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_upload_access__ = None; + let mut instantiate_default_permission__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeUploadAccess => { + if code_upload_access__.is_some() { + return Err(serde::de::Error::duplicate_field("codeUploadAccess")); + } + code_upload_access__ = map_.next_value()?; + } + GeneratedField::InstantiateDefaultPermission => { + if instantiate_default_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiateDefaultPermission", + )); + } + instantiate_default_permission__ = + Some(map_.next_value::()? as i32); + } + } + } + Ok(Params { + code_upload_access: code_upload_access__, + instantiate_default_permission: instantiate_default_permission__ + .unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.Params", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PinCodesProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.code_ids.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.PinCodesProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.code_ids.is_empty() { + struct_ser.serialize_field( + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PinCodesProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "code_ids", "codeIds"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + CodeIds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PinCodesProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.PinCodesProposal") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut code_ids__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); + } + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(PinCodesProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + code_ids: code_ids__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.PinCodesProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllContractStateRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllContractStateRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateRequest") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryAllContractStateRequest { + address: address__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryAllContractStateRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryAllContractStateResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.models.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateResponse", len)?; + if !self.models.is_empty() { + struct_ser.serialize_field("models", &self.models)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["models", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Models, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "models" => Ok(GeneratedField::Models), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryAllContractStateResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut models__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Models => { + if models__.is_some() { + return Err(serde::de::Error::duplicate_field("models")); + } + models__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryAllContractStateResponse { + models: models__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryAllContractStateResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryCodeRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeRequest", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCodeRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["code_id", "codeId"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeId, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryCodeRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_id__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryCodeRequest { + code_id: code_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryCodeRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryCodeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_info.is_some() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeResponse", len)?; + if let Some(v) = self.code_info.as_ref() { + struct_ser.serialize_field("codeInfo", v)?; + } + if !self.data.is_empty() { + #[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 QueryCodeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["code_info", "codeInfo", "data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeInfo, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeInfo" | "code_info" => Ok(GeneratedField::CodeInfo), + "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 = QueryCodeResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_info__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeInfo => { + if code_info__.is_some() { + return Err(serde::de::Error::duplicate_field("codeInfo")); + } + code_info__ = 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, + ); + } + } + } + Ok(QueryCodeResponse { + code_info: code_info__, + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryCodeResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryCodesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCodesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryCodesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryCodesRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryCodesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryCodesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.code_infos.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesResponse", len)?; + if !self.code_infos.is_empty() { + struct_ser.serialize_field("codeInfos", &self.code_infos)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCodesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["code_infos", "codeInfos", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeInfos, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeInfos" | "code_infos" => Ok(GeneratedField::CodeInfos), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryCodesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_infos__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeInfos => { + if code_infos__.is_some() { + return Err(serde::de::Error::duplicate_field("codeInfos")); + } + code_infos__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryCodesResponse { + code_infos: code_infos__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryCodesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryContractHistoryRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryContractHistoryRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryRequest") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryContractHistoryRequest { + address: address__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryContractHistoryRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryContractHistoryResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.entries.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryResponse", len)?; + if !self.entries.is_empty() { + struct_ser.serialize_field("entries", &self.entries)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["entries", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Entries, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "entries" => Ok(GeneratedField::Entries), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryContractHistoryResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut entries__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Entries => { + if entries__.is_some() { + return Err(serde::de::Error::duplicate_field("entries")); + } + entries__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryContractHistoryResponse { + entries: entries__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryContractHistoryResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryContractInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryContractInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoRequest") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } + } + } + Ok(QueryContractInfoRequest { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryContractInfoRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryContractInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.contract_info.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.contract_info.as_ref() { + struct_ser.serialize_field("contractInfo", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "contract_info", "contractInfo"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + ContractInfo, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "contractInfo" | "contract_info" => Ok(GeneratedField::ContractInfo), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryContractInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut contract_info__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } + GeneratedField::ContractInfo => { + if contract_info__.is_some() { + return Err(serde::de::Error::duplicate_field("contractInfo")); + } + contract_info__ = map_.next_value()?; + } + } + } + Ok(QueryContractInfoResponse { + address: address__.unwrap_or_default(), + contract_info: contract_info__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryContractInfoResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryContractsByCodeRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeRequest", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["code_id", "codeId", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeId, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryContractsByCodeRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeRequest") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_id__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryContractsByCodeRequest { + code_id: code_id__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryContractsByCodeRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryContractsByCodeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.contracts.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeResponse", len)?; + if !self.contracts.is_empty() { + struct_ser.serialize_field("contracts", &self.contracts)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["contracts", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Contracts, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "contracts" => Ok(GeneratedField::Contracts), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryContractsByCodeResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut contracts__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Contracts => { + if contracts__.is_some() { + return Err(serde::de::Error::duplicate_field("contracts")); + } + contracts__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryContractsByCodeResponse { + contracts: contracts__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryContractsByCodeResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = QueryParamsRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(QueryParamsRequest {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryParamsRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryParamsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.params.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["params"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Params, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QueryParamsResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map_.next_value()?; + } + } + } + Ok(QueryParamsResponse { params: params__ }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryParamsResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryPinnedCodesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryPinnedCodesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesRequest") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryPinnedCodesRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryPinnedCodesRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryPinnedCodesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.code_ids.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesResponse", len)?; + if !self.code_ids.is_empty() { + struct_ser.serialize_field( + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["code_ids", "codeIds", "pagination"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeIds, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryPinnedCodesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_ids__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); + } + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryPinnedCodesResponse { + code_ids: code_ids__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryPinnedCodesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryRawContractStateRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.query_data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.query_data.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "queryData", + pbjson::private::base64::encode(&self.query_data).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "query_data", "queryData"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + QueryData, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "queryData" | "query_data" => Ok(GeneratedField::QueryData), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryRawContractStateRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateRequest") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut query_data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } + GeneratedField::QueryData => { + if query_data__.is_some() { + return Err(serde::de::Error::duplicate_field("queryData")); + } + query_data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryRawContractStateRequest { + address: address__.unwrap_or_default(), + query_data: query_data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryRawContractStateRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QueryRawContractStateResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateResponse", len)?; + if !self.data.is_empty() { + #[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 QueryRawContractStateResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QueryRawContractStateResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QueryRawContractStateResponse { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryRawContractStateResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySmartContractStateRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.query_data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.query_data.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "queryData", + pbjson::private::base64::encode(&self.query_data).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "query_data", "queryData"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + QueryData, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "queryData" | "query_data" => Ok(GeneratedField::QueryData), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QuerySmartContractStateRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateRequest") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut query_data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } + GeneratedField::QueryData => { + if query_data__.is_some() { + return Err(serde::de::Error::duplicate_field("queryData")); + } + query_data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QuerySmartContractStateRequest { + address: address__.unwrap_or_default(), + query_data: query_data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QuerySmartContractStateRequest", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for QuerySmartContractStateResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateResponse", len)?; + if !self.data.is_empty() { + #[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 QuerySmartContractStateResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = QuerySmartContractStateResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(QuerySmartContractStateResponse { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QuerySmartContractStateResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Sequence { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.id_key.is_empty() { + len += 1; + } + if self.value != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Sequence", len)?; + if !self.id_key.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "idKey", + pbjson::private::base64::encode(&self.id_key).as_str(), + )?; + } + if self.value != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("value", ToString::to_string(&self.value).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Sequence { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["id_key", "idKey", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + IdKey, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "idKey" | "id_key" => Ok(GeneratedField::IdKey), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Sequence; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.Sequence") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id_key__ = None; + let mut value__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::IdKey => { + if id_key__.is_some() { + return Err(serde::de::Error::duplicate_field("idKey")); + } + id_key__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Sequence { + id_key: id_key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.Sequence", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for StoreCodeProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.run_as.is_empty() { + len += 1; + } + if !self.wasm_byte_code.is_empty() { + len += 1; + } + if self.instantiate_permission.is_some() { + len += 1; + } + if self.unpin_code { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.StoreCodeProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.run_as.is_empty() { + struct_ser.serialize_field("runAs", &self.run_as)?; + } + if !self.wasm_byte_code.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "wasmByteCode", + pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; + } + if self.unpin_code { + struct_ser.serialize_field("unpinCode", &self.unpin_code)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for StoreCodeProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "title", + "description", + "run_as", + "runAs", + "wasm_byte_code", + "wasmByteCode", + "instantiate_permission", + "instantiatePermission", + "unpin_code", + "unpinCode", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + RunAs, + WasmByteCode, + InstantiatePermission, + UnpinCode, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "runAs" | "run_as" => Ok(GeneratedField::RunAs), + "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } + "unpinCode" | "unpin_code" => Ok(GeneratedField::UnpinCode), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StoreCodeProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.StoreCodeProposal") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut run_as__ = None; + let mut wasm_byte_code__ = None; + let mut instantiate_permission__ = None; + let mut unpin_code__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::RunAs => { + if run_as__.is_some() { + return Err(serde::de::Error::duplicate_field("runAs")); + } + run_as__ = Some(map_.next_value()?); + } + GeneratedField::WasmByteCode => { + if wasm_byte_code__.is_some() { + return Err(serde::de::Error::duplicate_field("wasmByteCode")); + } + wasm_byte_code__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; + } + GeneratedField::UnpinCode => { + if unpin_code__.is_some() { + return Err(serde::de::Error::duplicate_field("unpinCode")); + } + unpin_code__ = Some(map_.next_value()?); + } + } + } + Ok(StoreCodeProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + run_as: run_as__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, + unpin_code: unpin_code__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.StoreCodeProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for SudoContractProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.SudoContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SudoContractProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "contract", "msg"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + Contract, + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "contract" => Ok(GeneratedField::Contract), + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SudoContractProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.SudoContractProposal") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut contract__ = None; + let mut msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(SudoContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.SudoContractProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for UnpinCodesProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.code_ids.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.UnpinCodesProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.code_ids.is_empty() { + struct_ser.serialize_field( + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for UnpinCodesProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "code_ids", "codeIds"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + CodeIds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = UnpinCodesProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.UnpinCodesProposal") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut code_ids__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); + } + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(UnpinCodesProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + code_ids: code_ids__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.UnpinCodesProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for UpdateAdminProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.new_admin.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.UpdateAdminProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.new_admin.is_empty() { + struct_ser.serialize_field("newAdmin", &self.new_admin)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for UpdateAdminProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["title", "description", "new_admin", "newAdmin", "contract"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + NewAdmin, + Contract, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "newAdmin" | "new_admin" => Ok(GeneratedField::NewAdmin), + "contract" => Ok(GeneratedField::Contract), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = UpdateAdminProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.UpdateAdminProposal") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut new_admin__ = None; + let mut contract__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::NewAdmin => { + if new_admin__.is_some() { + return Err(serde::de::Error::duplicate_field("newAdmin")); + } + new_admin__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + } + } + Ok(UpdateAdminProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + new_admin: new_admin__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.UpdateAdminProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for UpdateInstantiateConfigProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.access_config_updates.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.UpdateInstantiateConfigProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.access_config_updates.is_empty() { + struct_ser.serialize_field("accessConfigUpdates", &self.access_config_updates)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for UpdateInstantiateConfigProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "title", + "description", + "access_config_updates", + "accessConfigUpdates", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + AccessConfigUpdates, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "accessConfigUpdates" | "access_config_updates" => { + Ok(GeneratedField::AccessConfigUpdates) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = UpdateInstantiateConfigProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.UpdateInstantiateConfigProposal") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut access_config_updates__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::AccessConfigUpdates => { + if access_config_updates__.is_some() { + return Err(serde::de::Error::duplicate_field( + "accessConfigUpdates", + )); + } + access_config_updates__ = Some(map_.next_value()?); + } + } + } + Ok(UpdateInstantiateConfigProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + access_config_updates: access_config_updates__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.UpdateInstantiateConfigProposal", + FIELDS, + GeneratedVisitor, + ) + } +} diff --git a/proto-build/buf.sdk.gen.yaml b/proto-build/buf.sdk.gen.yaml index accc551d..396e9761 100644 --- a/proto-build/buf.sdk.gen.yaml +++ b/proto-build/buf.sdk.gen.yaml @@ -1,10 +1,10 @@ version: v1 plugins: - - plugin: buf.build/community/neoeinstein-prost:v0.2.1 + - plugin: buf.build/community/neoeinstein-prost:v0.3.1 out: . opt: - extern_path=.tendermint=::tendermint_proto::v0_34 - - plugin: buf.build/community/neoeinstein-prost-serde:v0.2.3 + - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0 out: . opt: - extern_path=.tendermint=::tendermint_proto::v0_34 diff --git a/proto-build/buf.wasmd.gen.yaml b/proto-build/buf.wasmd.gen.yaml index 17b5bb6e..3caa5ac8 100644 --- a/proto-build/buf.wasmd.gen.yaml +++ b/proto-build/buf.wasmd.gen.yaml @@ -1,6 +1,8 @@ version: v1 plugins: - - plugin: buf.build/community/neoeinstein-prost:v0.2.1 + - plugin: buf.build/community/neoeinstein-prost:v0.3.1 + out: . + - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0 out: . - plugin: buf.build/community/neoeinstein-tonic:v0.3.0 out: . From 17d17d94fe199155c95ab0e3e394d0e20f8544dd Mon Sep 17 00:00:00 2001 From: Ash Date: Sat, 1 Jun 2024 17:01:17 -0700 Subject: [PATCH 04/31] extern google types with pbjson-types --- Cargo.lock | 50 ++++++++++++++++++- cosmos-sdk-proto/Cargo.toml | 1 + .../prost/cosmos-sdk/cosmos.app.v1alpha1.rs | 2 +- .../prost/cosmos-sdk/cosmos.auth.v1beta1.rs | 12 ++--- .../prost/cosmos-sdk/cosmos.authz.v1beta1.rs | 10 ++-- .../cosmos-sdk/cosmos.base.abci.v1beta1.rs | 6 +-- .../cosmos.base.tendermint.v1beta1.rs | 4 +- .../cosmos-sdk/cosmos.crypto.keyring.v1.rs | 4 +- .../cosmos-sdk/cosmos.crypto.multisig.rs | 2 +- .../cosmos-sdk/cosmos.evidence.v1beta1.rs | 10 ++-- .../cosmos-sdk/cosmos.feegrant.v1beta1.rs | 12 ++--- .../src/prost/cosmos-sdk/cosmos.gov.v1.rs | 18 +++---- .../prost/cosmos-sdk/cosmos.gov.v1beta1.rs | 16 +++--- .../src/prost/cosmos-sdk/cosmos.group.v1.rs | 28 +++++------ .../prost/cosmos-sdk/cosmos.nft.v1beta1.rs | 4 +- .../cosmos-sdk/cosmos.slashing.v1beta1.rs | 4 +- .../cosmos-sdk/cosmos.staking.v1beta1.rs | 18 +++---- .../cosmos-sdk/cosmos.tx.signing.v1beta1.rs | 2 +- .../src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs | 10 ++-- .../cosmos-sdk/cosmos.upgrade.v1beta1.rs | 4 +- .../src/prost/wasmd/cosmwasm.wasm.v1.rs | 2 +- proto-build/buf.sdk.gen.yaml | 4 +- proto-build/buf.wasmd.gen.yaml | 4 ++ 23 files changed, 139 insertions(+), 88 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b69fbd6..cc2a2639 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -240,6 +240,15 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "num-traits", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -267,6 +276,7 @@ name = "cosmos-sdk-proto" version = "0.22.0-pre" dependencies = [ "pbjson", + "pbjson-types", "prost", "prost-types", "serde", @@ -854,6 +864,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -1005,6 +1024,33 @@ dependencies = [ "serde", ] +[[package]] +name = "pbjson-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" +dependencies = [ + "heck", + "itertools 0.11.0", + "prost", + "prost-types", +] + +[[package]] +name = "pbjson-types" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" +dependencies = [ + "bytes", + "chrono", + "pbjson", + "pbjson-build", + "prost", + "prost-build", + "serde", +] + [[package]] name = "peg" version = "0.8.2" @@ -1133,7 +1179,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes", "heck", - "itertools", + "itertools 0.10.5", "log", "multimap", "once_cell", @@ -1154,7 +1200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn", diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index c7bc5fcd..49216136 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -21,6 +21,7 @@ prost-types = "0.12" tendermint-proto = "0.37" serde = "1.0.203" pbjson = "0.6.0" +pbjson-types = "0.6.0" # Optional dependencies tonic = { version = "0.11", optional = true, default-features = false, features = ["codegen", "prost"] } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs index b01df819..c79c8a3a 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs @@ -112,7 +112,7 @@ pub struct ModuleConfig { /// config is the config object for the module. Module config messages should /// define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. #[prost(message, optional, tag = "2")] - pub config: ::core::option::Option<::prost_types::Any>, + pub config: ::core::option::Option<::pbjson_types::Any>, } /// QueryConfigRequest is the Query/Config request type. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs index 675da535..6de14ad5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs @@ -8,7 +8,7 @@ pub struct BaseAccount { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::prost_types::Any>, + pub pub_key: ::core::option::Option<::pbjson_types::Any>, #[prost(uint64, tag = "3")] pub account_number: u64, #[prost(uint64, tag = "4")] @@ -49,7 +49,7 @@ pub struct GenesisState { pub params: ::core::option::Option, /// accounts are the accounts present at genesis. #[prost(message, repeated, tag = "2")] - pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } /// QueryAccountsRequest is the request type for the Query/Accounts RPC method. /// @@ -69,7 +69,7 @@ pub struct QueryAccountsRequest { pub struct QueryAccountsResponse { /// accounts are the existing accounts #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::pbjson_types::Any>, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, @@ -88,7 +88,7 @@ pub struct QueryAccountRequest { pub struct QueryAccountResponse { /// account defines the account of the corresponding address. #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option<::prost_types::Any>, + pub account: ::core::option::Option<::pbjson_types::Any>, } /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -115,7 +115,7 @@ pub struct QueryModuleAccountsRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountsResponse { #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } /// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -129,7 +129,7 @@ pub struct QueryModuleAccountByNameRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountByNameResponse { #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option<::prost_types::Any>, + pub account: ::core::option::Option<::pbjson_types::Any>, } /// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. /// diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs index 17d96c04..1faa1130 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs @@ -14,12 +14,12 @@ pub struct GenericAuthorization { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Grant { #[prost(message, optional, tag = "1")] - pub authorization: ::core::option::Option<::prost_types::Any>, + pub authorization: ::core::option::Option<::pbjson_types::Any>, /// time when the grant will expire and will be pruned. If null, then the grant /// doesn't have a time expiration (other conditions in `authorization` /// may apply to invalidate the grant) #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, + pub expiration: ::core::option::Option<::pbjson_types::Timestamp>, } /// GrantAuthorization extends a grant with both the addresses of the grantee and granter. /// It is used in genesis.proto and query.proto @@ -31,9 +31,9 @@ pub struct GrantAuthorization { #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] - pub authorization: ::core::option::Option<::prost_types::Any>, + pub authorization: ::core::option::Option<::pbjson_types::Any>, #[prost(message, optional, tag = "4")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, + pub expiration: ::core::option::Option<::pbjson_types::Timestamp>, } /// GrantQueueItem contains the list of TypeURL of a sdk.Msg. #[allow(clippy::derive_partial_eq_without_eq)] @@ -177,7 +177,7 @@ pub struct MsgExec { /// The x/authz will try to find a grant matching (msg.signers\[0\], grantee, MsgTypeURL(msg)) /// triple and validate it. #[prost(message, repeated, tag = "2")] - pub msgs: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub msgs: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } /// MsgGrantResponse defines the Msg/MsgGrant response type. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs index 926a3fd4..e64042e8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs @@ -37,7 +37,7 @@ pub struct TxResponse { pub gas_used: i64, /// The request transaction bytes. #[prost(message, optional, tag = "11")] - pub tx: ::core::option::Option<::prost_types::Any>, + pub tx: ::core::option::Option<::pbjson_types::Any>, /// Time of the previous block. For heights > 1, it's the weighted median of /// the timestamps of the valid votes in the block.LastCommit. For height == 1, /// it's genesis time. @@ -118,7 +118,7 @@ pub struct Result { /// /// Since: cosmos-sdk 0.46 #[prost(message, repeated, tag = "4")] - pub msg_responses: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub msg_responses: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } /// SimulationResponse defines the response generated when a transaction is /// successfully simulated. @@ -153,7 +153,7 @@ pub struct TxMsgData { /// /// Since: cosmos-sdk 0.46 #[prost(message, repeated, tag = "2")] - pub msg_responses: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub msg_responses: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } /// SearchTxsResult defines a structure for querying txs pageable #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs index 3b8fb2fc..c631e629 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs @@ -25,7 +25,7 @@ pub struct Header { #[prost(int64, tag = "3")] pub height: i64, #[prost(message, optional, tag = "4")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + pub time: ::core::option::Option<::pbjson_types::Timestamp>, /// prev block info #[prost(message, optional, tag = "5")] pub last_block_id: ::core::option::Option<::tendermint_proto::v0_34::types::BlockId>, @@ -120,7 +120,7 @@ pub struct Validator { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::prost_types::Any>, + pub pub_key: ::core::option::Option<::pbjson_types::Any>, #[prost(int64, tag = "3")] pub voting_power: i64, #[prost(int64, tag = "4")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs index 4643f946..dd387c3d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs @@ -8,7 +8,7 @@ pub struct Record { pub name: ::prost::alloc::string::String, /// pub_key represents a public key in any format #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::prost_types::Any>, + pub pub_key: ::core::option::Option<::pbjson_types::Any>, /// Record contains one of the following items #[prost(oneof = "record::Item", tags = "3, 4, 5, 6")] pub item: ::core::option::Option, @@ -21,7 +21,7 @@ pub mod record { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Local { #[prost(message, optional, tag = "1")] - pub priv_key: ::core::option::Option<::prost_types::Any>, + pub priv_key: ::core::option::Option<::pbjson_types::Any>, } /// Ledger item #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs index 7d82167f..f0bb874e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs @@ -8,7 +8,7 @@ pub struct LegacyAminoPubKey { #[prost(uint32, tag = "1")] pub threshold: u32, #[prost(message, repeated, tag = "2")] - pub public_keys: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub public_keys: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } include!("cosmos.crypto.multisig.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs index c65bee42..6c1430d4 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs @@ -7,7 +7,7 @@ pub struct Equivocation { #[prost(int64, tag = "1")] pub height: i64, #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + pub time: ::core::option::Option<::pbjson_types::Timestamp>, #[prost(int64, tag = "3")] pub power: i64, #[prost(string, tag = "4")] @@ -19,7 +19,7 @@ pub struct Equivocation { pub struct GenesisState { /// evidence defines all the evidence at genesis. #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub evidence: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } /// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -35,7 +35,7 @@ pub struct QueryEvidenceRequest { pub struct QueryEvidenceResponse { /// evidence returns the requested evidence. #[prost(message, optional, tag = "1")] - pub evidence: ::core::option::Option<::prost_types::Any>, + pub evidence: ::core::option::Option<::pbjson_types::Any>, } /// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC /// method. @@ -53,7 +53,7 @@ pub struct QueryAllEvidenceRequest { pub struct QueryAllEvidenceResponse { /// evidence returns all evidences. #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub evidence: ::prost::alloc::vec::Vec<::pbjson_types::Any>, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, @@ -66,7 +66,7 @@ pub struct MsgSubmitEvidence { #[prost(string, tag = "1")] pub submitter: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option<::prost_types::Any>, + pub evidence: ::core::option::Option<::pbjson_types::Any>, } /// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs index 998159d8..55127b70 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs @@ -11,7 +11,7 @@ pub struct BasicAllowance { pub spend_limit: ::prost::alloc::vec::Vec, /// expiration specifies an optional time when this allowance expires #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, + pub expiration: ::core::option::Option<::pbjson_types::Timestamp>, } /// PeriodicAllowance extends Allowance to allow for both a maximum cap, /// as well as a limit per time period. @@ -24,7 +24,7 @@ pub struct PeriodicAllowance { /// period specifies the time duration in which period_spend_limit coins can /// be spent before that allowance is reset #[prost(message, optional, tag = "2")] - pub period: ::core::option::Option<::prost_types::Duration>, + pub period: ::core::option::Option<::pbjson_types::Duration>, /// period_spend_limit specifies the maximum number of coins that can be spent /// in the period #[prost(message, repeated, tag = "3")] @@ -36,7 +36,7 @@ pub struct PeriodicAllowance { /// it is calculated from the start time of the first transaction after the /// last period ended #[prost(message, optional, tag = "5")] - pub period_reset: ::core::option::Option<::prost_types::Timestamp>, + pub period_reset: ::core::option::Option<::pbjson_types::Timestamp>, } /// AllowedMsgAllowance creates allowance only for specified message types. #[allow(clippy::derive_partial_eq_without_eq)] @@ -44,7 +44,7 @@ pub struct PeriodicAllowance { pub struct AllowedMsgAllowance { /// allowance can be any of basic and periodic fee allowance. #[prost(message, optional, tag = "1")] - pub allowance: ::core::option::Option<::prost_types::Any>, + pub allowance: ::core::option::Option<::pbjson_types::Any>, /// allowed_messages are the messages for which the grantee has the access. #[prost(string, repeated, tag = "2")] pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -61,7 +61,7 @@ pub struct Grant { pub grantee: ::prost::alloc::string::String, /// allowance can be any of basic, periodic, allowed fee allowance. #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::prost_types::Any>, + pub allowance: ::core::option::Option<::pbjson_types::Any>, } /// GenesisState contains a set of fee allowances, persisted from the store #[allow(clippy::derive_partial_eq_without_eq)] @@ -148,7 +148,7 @@ pub struct MsgGrantAllowance { pub grantee: ::prost::alloc::string::String, /// allowance can be any of basic, periodic, allowed fee allowance. #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::prost_types::Any>, + pub allowance: ::core::option::Option<::pbjson_types::Any>, } /// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs index aea05b72..8c65319f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs @@ -27,7 +27,7 @@ pub struct Proposal { #[prost(uint64, tag = "1")] pub id: u64, #[prost(message, repeated, tag = "2")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, #[prost(enumeration = "ProposalStatus", tag = "3")] pub status: i32, /// final_tally_result is the final tally result of the proposal. When @@ -36,15 +36,15 @@ pub struct Proposal { #[prost(message, optional, tag = "4")] pub final_tally_result: ::core::option::Option, #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, + pub submit_time: ::core::option::Option<::pbjson_types::Timestamp>, #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option<::prost_types::Timestamp>, + pub deposit_end_time: ::core::option::Option<::pbjson_types::Timestamp>, #[prost(message, repeated, tag = "7")] pub total_deposit: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option<::prost_types::Timestamp>, + pub voting_start_time: ::core::option::Option<::pbjson_types::Timestamp>, #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option<::prost_types::Timestamp>, + pub voting_end_time: ::core::option::Option<::pbjson_types::Timestamp>, /// metadata is any arbitrary metadata attached to the proposal. #[prost(string, tag = "10")] pub metadata: ::prost::alloc::string::String, @@ -87,7 +87,7 @@ pub struct DepositParams { /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 /// months. #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option<::prost_types::Duration>, + pub max_deposit_period: ::core::option::Option<::pbjson_types::Duration>, } /// VotingParams defines the params for voting on governance proposals. #[allow(clippy::derive_partial_eq_without_eq)] @@ -95,7 +95,7 @@ pub struct DepositParams { pub struct VotingParams { /// Length of the voting period. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, + pub voting_period: ::core::option::Option<::pbjson_types::Duration>, } /// TallyParams defines the params for tallying votes on governance proposals. #[allow(clippy::derive_partial_eq_without_eq)] @@ -399,7 +399,7 @@ pub struct QueryTallyResultResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, #[prost(message, repeated, tag = "2")] pub initial_deposit: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] @@ -422,7 +422,7 @@ pub struct MsgSubmitProposalResponse { pub struct MsgExecLegacyContent { /// content is the proposal's content. #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::prost_types::Any>, + pub content: ::core::option::Option<::pbjson_types::Any>, /// authority must be the gov module address. #[prost(string, tag = "2")] pub authority: ::prost::alloc::string::String, diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs index 1378fee5..2a3feef5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs @@ -39,7 +39,7 @@ pub struct Proposal { #[prost(uint64, tag = "1")] pub proposal_id: u64, #[prost(message, optional, tag = "2")] - pub content: ::core::option::Option<::prost_types::Any>, + pub content: ::core::option::Option<::pbjson_types::Any>, #[prost(enumeration = "ProposalStatus", tag = "3")] pub status: i32, /// final_tally_result is the final tally result of the proposal. When @@ -48,15 +48,15 @@ pub struct Proposal { #[prost(message, optional, tag = "4")] pub final_tally_result: ::core::option::Option, #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, + pub submit_time: ::core::option::Option<::pbjson_types::Timestamp>, #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option<::prost_types::Timestamp>, + pub deposit_end_time: ::core::option::Option<::pbjson_types::Timestamp>, #[prost(message, repeated, tag = "7")] pub total_deposit: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option<::prost_types::Timestamp>, + pub voting_start_time: ::core::option::Option<::pbjson_types::Timestamp>, #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option<::prost_types::Timestamp>, + pub voting_end_time: ::core::option::Option<::pbjson_types::Timestamp>, } /// TallyResult defines a standard tally for a governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] @@ -100,7 +100,7 @@ pub struct DepositParams { /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 /// months. #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option<::prost_types::Duration>, + pub max_deposit_period: ::core::option::Option<::pbjson_types::Duration>, } /// VotingParams defines the params for voting on governance proposals. #[allow(clippy::derive_partial_eq_without_eq)] @@ -108,7 +108,7 @@ pub struct DepositParams { pub struct VotingParams { /// Length of the voting period. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, + pub voting_period: ::core::option::Option<::pbjson_types::Duration>, } /// TallyParams defines the params for tallying votes on governance proposals. #[allow(clippy::derive_partial_eq_without_eq)] @@ -412,7 +412,7 @@ pub struct QueryTallyResultResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::prost_types::Any>, + pub content: ::core::option::Option<::pbjson_types::Any>, #[prost(message, repeated, tag = "2")] pub initial_deposit: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs index 033229f2..55de6463 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs @@ -15,7 +15,7 @@ pub struct Member { pub metadata: ::prost::alloc::string::String, /// added_at is a timestamp specifying when a member was added. #[prost(message, optional, tag = "4")] - pub added_at: ::core::option::Option<::prost_types::Timestamp>, + pub added_at: ::core::option::Option<::pbjson_types::Timestamp>, } /// MemberRequest represents a group member to be used in Msg server requests. /// Contrary to `Member`, it doesn't have any `added_at` field @@ -74,7 +74,7 @@ pub struct DecisionPolicyWindows { /// voting_period is the duration from submission of a proposal to the end of voting period /// Within this times votes can be submitted with MsgVote. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, + pub voting_period: ::core::option::Option<::pbjson_types::Duration>, /// min_execution_period is the minimum duration after the proposal submission /// where members can start sending MsgExec. This means that the window for /// sending a MsgExec transaction is: @@ -87,7 +87,7 @@ pub struct DecisionPolicyWindows { /// is empty, meaning that all proposals created with this decision policy /// won't be able to be executed. #[prost(message, optional, tag = "2")] - pub min_execution_period: ::core::option::Option<::prost_types::Duration>, + pub min_execution_period: ::core::option::Option<::pbjson_types::Duration>, } // // State @@ -117,7 +117,7 @@ pub struct GroupInfo { pub total_weight: ::prost::alloc::string::String, /// created_at is a timestamp specifying when a group was created. #[prost(message, optional, tag = "6")] - pub created_at: ::core::option::Option<::prost_types::Timestamp>, + pub created_at: ::core::option::Option<::pbjson_types::Timestamp>, } /// GroupMember represents the relationship between a group and a member. #[allow(clippy::derive_partial_eq_without_eq)] @@ -152,10 +152,10 @@ pub struct GroupPolicyInfo { pub version: u64, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, + pub decision_policy: ::core::option::Option<::pbjson_types::Any>, /// created_at is a timestamp specifying when a group policy was created. #[prost(message, optional, tag = "7")] - pub created_at: ::core::option::Option<::prost_types::Timestamp>, + pub created_at: ::core::option::Option<::pbjson_types::Timestamp>, } /// Proposal defines a group proposal. Any member of a group can submit a proposal /// for a group policy to decide upon. @@ -178,7 +178,7 @@ pub struct Proposal { pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// submit_time is a timestamp specifying when a proposal was submitted. #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, + pub submit_time: ::core::option::Option<::pbjson_types::Timestamp>, /// group_version tracks the version of the group at proposal submission. /// This field is here for informational purposes only. #[prost(uint64, tag = "6")] @@ -204,13 +204,13 @@ pub struct Proposal { /// at this point, and the `final_tally_result`and `status` fields will be /// accordingly updated. #[prost(message, optional, tag = "10")] - pub voting_period_end: ::core::option::Option<::prost_types::Timestamp>, + pub voting_period_end: ::core::option::Option<::pbjson_types::Timestamp>, /// executor_result is the final result of the proposal execution. Initial value is NotRun. #[prost(enumeration = "ProposalExecutorResult", tag = "11")] pub executor_result: i32, /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. #[prost(message, repeated, tag = "12")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } /// TallyResult represents the sum of weighted votes for each vote option. #[allow(clippy::derive_partial_eq_without_eq)] @@ -247,7 +247,7 @@ pub struct Vote { pub metadata: ::prost::alloc::string::String, /// submit_time is the timestamp when the vote was submitted. #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, + pub submit_time: ::core::option::Option<::pbjson_types::Timestamp>, } /// VoteOption enumerates the valid vote options for a given proposal. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -886,7 +886,7 @@ pub struct MsgCreateGroupPolicy { pub metadata: ::prost::alloc::string::String, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "4")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, + pub decision_policy: ::core::option::Option<::pbjson_types::Any>, } /// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -932,7 +932,7 @@ pub struct MsgCreateGroupWithPolicy { pub group_policy_as_admin: bool, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, + pub decision_policy: ::core::option::Option<::pbjson_types::Any>, } /// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -961,7 +961,7 @@ pub struct MsgUpdateGroupPolicyDecisionPolicy { pub group_policy_address: ::prost::alloc::string::String, /// decision_policy is the updated group policy's decision policy. #[prost(message, optional, tag = "3")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, + pub decision_policy: ::core::option::Option<::pbjson_types::Any>, } /// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -1001,7 +1001,7 @@ pub struct MsgSubmitProposal { pub metadata: ::prost::alloc::string::String, /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. #[prost(message, repeated, tag = "4")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, /// exec defines the mode of execution of the proposal, /// whether it should be executed immediately on creation or not. /// If so, proposers signatures are considered as Yes votes. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs index 3508f997..28cfb47c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs @@ -58,7 +58,7 @@ pub struct Class { pub uri_hash: ::prost::alloc::string::String, /// data is the app specific metadata of the NFT class. Optional #[prost(message, optional, tag = "7")] - pub data: ::core::option::Option<::prost_types::Any>, + pub data: ::core::option::Option<::pbjson_types::Any>, } /// NFT defines the NFT. #[allow(clippy::derive_partial_eq_without_eq)] @@ -78,7 +78,7 @@ pub struct Nft { pub uri_hash: ::prost::alloc::string::String, /// data is an app specific data of the NFT. Optional #[prost(message, optional, tag = "10")] - pub data: ::core::option::Option<::prost_types::Any>, + pub data: ::core::option::Option<::pbjson_types::Any>, } /// GenesisState defines the nft module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs index 75ff2bfd..5716cb36 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs @@ -16,7 +16,7 @@ pub struct ValidatorSigningInfo { pub index_offset: i64, /// Timestamp until which the validator is jailed due to liveness downtime. #[prost(message, optional, tag = "4")] - pub jailed_until: ::core::option::Option<::prost_types::Timestamp>, + pub jailed_until: ::core::option::Option<::pbjson_types::Timestamp>, /// Whether or not a validator has been tombstoned (killed out of validator set). It is set /// once the validator commits an equivocation or for any other configured misbehiavor. #[prost(bool, tag = "5")] @@ -35,7 +35,7 @@ pub struct Params { #[prost(bytes = "vec", tag = "2")] pub min_signed_per_window: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] - pub downtime_jail_duration: ::core::option::Option<::prost_types::Duration>, + pub downtime_jail_duration: ::core::option::Option<::pbjson_types::Duration>, #[prost(bytes = "vec", tag = "4")] pub slash_fraction_double_sign: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "5")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs index 98a8bd4f..625e4744 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs @@ -113,7 +113,7 @@ pub struct Commission { pub commission_rates: ::core::option::Option, /// update_time is the last time the commission rate was changed. #[prost(message, optional, tag = "2")] - pub update_time: ::core::option::Option<::prost_types::Timestamp>, + pub update_time: ::core::option::Option<::pbjson_types::Timestamp>, } /// Description defines a validator description. #[allow(clippy::derive_partial_eq_without_eq)] @@ -151,7 +151,7 @@ pub struct Validator { pub operator_address: ::prost::alloc::string::String, /// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. #[prost(message, optional, tag = "2")] - pub consensus_pubkey: ::core::option::Option<::prost_types::Any>, + pub consensus_pubkey: ::core::option::Option<::pbjson_types::Any>, /// jailed defined whether the validator has been jailed from bonded status or not. #[prost(bool, tag = "3")] pub jailed: bool, @@ -172,7 +172,7 @@ pub struct Validator { pub unbonding_height: i64, /// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. #[prost(message, optional, tag = "9")] - pub unbonding_time: ::core::option::Option<::prost_types::Timestamp>, + pub unbonding_time: ::core::option::Option<::pbjson_types::Timestamp>, /// commission defines the commission parameters. #[prost(message, optional, tag = "10")] pub commission: ::core::option::Option, @@ -270,7 +270,7 @@ pub struct UnbondingDelegationEntry { pub creation_height: i64, /// completion_time is the unix time for unbonding completion. #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, + pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, /// initial_balance defines the tokens initially scheduled to receive at completion. #[prost(string, tag = "3")] pub initial_balance: ::prost::alloc::string::String, @@ -287,7 +287,7 @@ pub struct RedelegationEntry { pub creation_height: i64, /// completion_time defines the unix time for redelegation completion. #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, + pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, /// initial_balance defines the initial balance when redelegation started. #[prost(string, tag = "3")] pub initial_balance: ::prost::alloc::string::String, @@ -321,7 +321,7 @@ pub struct Redelegation { pub struct Params { /// unbonding_time is the time duration of unbonding. #[prost(message, optional, tag = "1")] - pub unbonding_time: ::core::option::Option<::prost_types::Duration>, + pub unbonding_time: ::core::option::Option<::pbjson_types::Duration>, /// max_validators is the maximum number of validators. #[prost(uint32, tag = "2")] pub max_validators: u32, @@ -760,7 +760,7 @@ pub struct MsgCreateValidator { #[prost(string, tag = "5")] pub validator_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "6")] - pub pubkey: ::core::option::Option<::prost_types::Any>, + pub pubkey: ::core::option::Option<::pbjson_types::Any>, #[prost(message, optional, tag = "7")] pub value: ::core::option::Option, } @@ -824,7 +824,7 @@ pub struct MsgBeginRedelegate { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgBeginRedelegateResponse { #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, + pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, } /// MsgUndelegate defines a SDK message for performing an undelegation from a /// delegate and a validator. @@ -843,7 +843,7 @@ pub struct MsgUndelegate { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUndelegateResponse { #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, + pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, } /// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator /// diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs index b3a7a525..fbeb17ae 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs @@ -16,7 +16,7 @@ pub struct SignatureDescriptors { pub struct SignatureDescriptor { /// public_key is the public key of the signer #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::prost_types::Any>, + pub public_key: ::core::option::Option<::pbjson_types::Any>, #[prost(message, optional, tag = "2")] pub data: ::core::option::Option, /// sequence is the sequence of the account, which describes the diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs index efa1dd4d..ca1755c7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs @@ -72,7 +72,7 @@ pub struct SignDocDirectAux { pub body_bytes: ::prost::alloc::vec::Vec, /// public_key is the public key of the signing account. #[prost(message, optional, tag = "2")] - pub public_key: ::core::option::Option<::prost_types::Any>, + pub public_key: ::core::option::Option<::pbjson_types::Any>, /// chain_id is the identifier of the chain this transaction targets. /// It prevents signed transactions from being used on another chain by an /// attacker. @@ -105,7 +105,7 @@ pub struct TxBody { /// is referred to as the primary signer and pays the fee for the whole /// transaction. #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, /// memo is any arbitrary note/comment to be added to the transaction. /// WARNING: in clients, any publicly exposed text should not be called memo, /// but should be called `note` instead (see ). @@ -119,12 +119,12 @@ pub struct TxBody { /// when the default options are not sufficient. If any of these are present /// and can't be handled, the transaction will be rejected #[prost(message, repeated, tag = "1023")] - pub extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>, /// extension_options are arbitrary options that can be added by chains /// when the default options are not sufficient. If any of these are present /// and can't be handled, they will be ignored #[prost(message, repeated, tag = "2047")] - pub non_critical_extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub non_critical_extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>, } /// AuthInfo describes the fee and signer modes that are used to sign a /// transaction. @@ -161,7 +161,7 @@ pub struct SignerInfo { /// that already exist in state. If unset, the verifier can use the required \ /// signer address for this position and lookup the public key. #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::prost_types::Any>, + pub public_key: ::core::option::Option<::pbjson_types::Any>, /// mode_info describes the signing mode of the signer and is a nested /// structure to support nested multisig pubkey's #[prost(message, optional, tag = "2")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs index ea0fe8f7..2527afae 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs @@ -17,7 +17,7 @@ pub struct Plan { /// If this field is not empty, an error will be thrown. #[deprecated] #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + pub time: ::core::option::Option<::pbjson_types::Timestamp>, /// The height at which the upgrade must be performed. /// Only used if Time is not set. #[prost(int64, tag = "3")] @@ -31,7 +31,7 @@ pub struct Plan { /// If this field is not empty, an error will be thrown. #[deprecated] #[prost(message, optional, tag = "5")] - pub upgraded_client_state: ::core::option::Option<::prost_types::Any>, + pub upgraded_client_state: ::core::option::Option<::pbjson_types::Any>, } /// SoftwareUpgradeProposal is a gov Content type for initiating a software /// upgrade. diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs index d2f4abce..97a5fd5f 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs @@ -68,7 +68,7 @@ pub struct ContractInfo { /// Extension is an extension point to store custom metadata within the /// persistence model. #[prost(message, optional, tag = "7")] - pub extension: ::core::option::Option<::prost_types::Any>, + pub extension: ::core::option::Option<::pbjson_types::Any>, } /// ContractCodeHistoryEntry metadata to a contract. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/proto-build/buf.sdk.gen.yaml b/proto-build/buf.sdk.gen.yaml index 396e9761..c51eabf9 100644 --- a/proto-build/buf.sdk.gen.yaml +++ b/proto-build/buf.sdk.gen.yaml @@ -3,11 +3,11 @@ plugins: - plugin: buf.build/community/neoeinstein-prost:v0.3.1 out: . opt: + - compile_well_known_types + - extern_path=.google.protobuf=::pbjson_types - extern_path=.tendermint=::tendermint_proto::v0_34 - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0 out: . - opt: - - extern_path=.tendermint=::tendermint_proto::v0_34 - plugin: buf.build/community/neoeinstein-tonic:v0.3.0 out: . opt: diff --git a/proto-build/buf.wasmd.gen.yaml b/proto-build/buf.wasmd.gen.yaml index 3caa5ac8..974b5f81 100644 --- a/proto-build/buf.wasmd.gen.yaml +++ b/proto-build/buf.wasmd.gen.yaml @@ -2,6 +2,10 @@ version: v1 plugins: - plugin: buf.build/community/neoeinstein-prost:v0.3.1 out: . + opt: + - compile_well_known_types + - extern_path=.google.protobuf=::pbjson_types + - extern_path=.tendermint=::tendermint_proto::v0_34 - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0 out: . - plugin: buf.build/community/neoeinstein-tonic:v0.3.0 From 702d3846e82c723509e0b8bc555e6e24c9136b46 Mon Sep 17 00:00:00 2001 From: Ash Date: Sat, 1 Jun 2024 17:28:39 -0700 Subject: [PATCH 05/31] compiles --- .../src/prost/cosmos-sdk/COSMOS_SDK_COMMIT | 2 +- .../cosmos.staking.v1beta1.serde.rs | 8 +- cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT | 2 +- .../src/prost/wasmd/cosmwasm.wasm.v1.rs | 912 +- .../src/prost/wasmd/cosmwasm.wasm.v1.serde.rs | 8513 +++++++++++++---- .../src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs | 474 +- proto-build/src/main.rs | 4 +- wasmd | 2 +- 8 files changed, 7523 insertions(+), 2394 deletions(-) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT b/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT index b4555f4e..ca133cff 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT @@ -1 +1 @@ -v0.46.15 \ No newline at end of file +v0.47.10 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs index 5cc2941d..c8d8c3a9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs @@ -7299,10 +7299,10 @@ impl serde::Serialize for StakeAuthorization { } if let Some(v) = self.validators.as_ref() { match v { - stake_authorization::Validators::AllowList(v) => { + stake_authorization::Policy::AllowList(v) => { struct_ser.serialize_field("allowList", v)?; } - stake_authorization::Validators::DenyList(v) => { + stake_authorization::Policy::DenyList(v) => { struct_ser.serialize_field("denyList", v)?; } } @@ -7406,7 +7406,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { } validators__ = map_ .next_value::<::std::option::Option<_>>()? - .map(stake_authorization::Validators::AllowList); + .map(stake_authorization::Policy::AllowList); } GeneratedField::DenyList => { if validators__.is_some() { @@ -7414,7 +7414,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { } validators__ = map_ .next_value::<::std::option::Option<_>>()? - .map(stake_authorization::Validators::DenyList); + .map(stake_authorization::Policy::DenyList); } } } diff --git a/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT b/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT index 9f27816d..a8672915 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT +++ b/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT @@ -1 +1 @@ -v0.29.2 \ No newline at end of file +v0.45.0 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs index 97a5fd5f..ec97221c 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs @@ -12,10 +12,6 @@ pub struct AccessTypeParam { pub struct AccessConfig { #[prost(enumeration = "AccessType", tag = "1")] pub permission: i32, - /// Address - /// Deprecated: replaced by addresses - #[prost(string, tag = "2")] - pub address: ::prost::alloc::string::String, #[prost(string, repeated, tag = "3")] pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } @@ -59,8 +55,6 @@ pub struct ContractInfo { #[prost(string, tag = "4")] pub label: ::prost::alloc::string::String, /// Created Tx position when the contract was instantiated. - /// This data should kept internal and not be exposed via query results. Just - /// use for sorting #[prost(message, optional, tag = "5")] pub created: ::core::option::Option, #[prost(string, tag = "6")] @@ -117,9 +111,6 @@ pub enum AccessType { Unspecified = 0, /// AccessTypeNobody forbidden Nobody = 1, - /// AccessTypeOnlyAddress restricted to a single address - /// Deprecated: use AccessTypeAnyOfAddresses instead - OnlyAddress = 2, /// AccessTypeEverybody unrestricted Everybody = 3, /// AccessTypeAnyOfAddresses allow any of the addresses @@ -134,7 +125,6 @@ impl AccessType { match self { AccessType::Unspecified => "ACCESS_TYPE_UNSPECIFIED", AccessType::Nobody => "ACCESS_TYPE_NOBODY", - AccessType::OnlyAddress => "ACCESS_TYPE_ONLY_ADDRESS", AccessType::Everybody => "ACCESS_TYPE_EVERYBODY", AccessType::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", } @@ -144,7 +134,6 @@ impl AccessType { match value { "ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified), "ACCESS_TYPE_NOBODY" => Some(Self::Nobody), - "ACCESS_TYPE_ONLY_ADDRESS" => Some(Self::OnlyAddress), "ACCESS_TYPE_EVERYBODY" => Some(Self::Everybody), "ACCESS_TYPE_ANY_OF_ADDRESSES" => Some(Self::AnyOfAddresses), _ => None, @@ -194,193 +183,122 @@ impl ContractCodeHistoryOperationType { } } } -/// MsgStoreCode submit Wasm code to the system -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCode { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission access control to apply on contract creation, - /// optional - #[prost(message, optional, tag = "5")] - pub instantiate_permission: ::core::option::Option, -} -/// MsgStoreCodeResponse returns store result data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCodeResponse { - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// Checksum is the sha256 hash of the stored code - #[prost(bytes = "vec", tag = "2")] - pub checksum: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContract create a new smart contract instance for the given -/// code id. +/// StoreCodeAuthorization defines authorization for wasm code upload. +/// Since: wasmd 0.42 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, +pub struct StoreCodeAuthorization { + /// Grants for code upload + #[prost(message, repeated, tag = "1")] + pub grants: ::prost::alloc::vec::Vec, } -/// MsgInstantiateContract2 create a new smart contract instance for the given -/// code id with a predicable address. +/// ContractExecutionAuthorization defines authorization for wasm execute. +/// Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract2 { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, - /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - #[prost(bytes = "vec", tag = "7")] - pub salt: ::prost::alloc::vec::Vec, - /// FixMsg include the msg value into the hash for the predictable address. - /// Default is false - #[prost(bool, tag = "8")] - pub fix_msg: bool, +pub struct ContractExecutionAuthorization { + /// Grants for contract executions + #[prost(message, repeated, tag = "1")] + pub grants: ::prost::alloc::vec::Vec, } -/// MsgInstantiateContractResponse return instantiation result data +/// ContractMigrationAuthorization defines authorization for wasm contract +/// migration. Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContractResponse { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, +pub struct ContractMigrationAuthorization { + /// Grants for contract migrations + #[prost(message, repeated, tag = "1")] + pub grants: ::prost::alloc::vec::Vec, } -/// MsgInstantiateContract2Response return instantiation result data +/// CodeGrant a granted permission for a single code #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract2Response { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, +pub struct CodeGrant { + /// CodeHash is the unique identifier created by wasmvm + /// Wildcard "*" is used to specify any kind of grant. + #[prost(bytes = "vec", tag = "1")] + pub code_hash: ::prost::alloc::vec::Vec, + /// InstantiatePermission is the superset access control to apply + /// on contract creation. + /// Optional + #[prost(message, optional, tag = "2")] + pub instantiate_permission: ::core::option::Option, } -/// MsgExecuteContract submits the given message data to a smart contract +/// ContractGrant a granted permission for a single contract +/// Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecuteContract { - /// Sender is the that actor that signed the messages +pub struct ContractGrant { + /// Contract is the bech32 address of the smart contract #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract - #[prost(bytes = "vec", tag = "3")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on execution - #[prost(message, repeated, tag = "5")] - pub funds: ::prost::alloc::vec::Vec, -} -/// MsgExecuteContractResponse returns execution result data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecuteContractResponse { - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, + /// Limit defines execution limits that are enforced and updated when the grant + /// is applied. When the limit lapsed the grant is removed. + #[prost(message, optional, tag = "2")] + pub limit: ::core::option::Option<::pbjson_types::Any>, + /// Filter define more fine-grained control on the message payload passed + /// to the contract in the operation. When no filter applies on execution, the + /// operation is prohibited. + #[prost(message, optional, tag = "3")] + pub filter: ::core::option::Option<::pbjson_types::Any>, } -/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract +/// MaxCallsLimit limited number of calls to the contract. No funds transferable. +/// Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// CodeID references the new WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "4")] - pub msg: ::prost::alloc::vec::Vec, +pub struct MaxCallsLimit { + /// Remaining number that is decremented on each execution + #[prost(uint64, tag = "1")] + pub remaining: u64, } -/// MsgMigrateContractResponse returns contract migration result data. +/// MaxFundsLimit defines the maximal amounts that can be sent to the contract. +/// Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContractResponse { - /// Data contains same raw bytes returned as data from the wasm contract. - /// (May be empty) - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, +pub struct MaxFundsLimit { + /// Amounts is the maximal amount of tokens transferable to the contract. + #[prost(message, repeated, tag = "1")] + pub amounts: ::prost::alloc::vec::Vec, } -/// MsgUpdateAdmin sets a new admin for a smart contract +/// CombinedLimit defines the maximal amounts that can be sent to a contract and +/// the maximal number of calls executable. Both need to remain >0 to be valid. +/// Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateAdmin { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// NewAdmin address to be set - #[prost(string, tag = "2")] - pub new_admin: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, +pub struct CombinedLimit { + /// Remaining number that is decremented on each execution + #[prost(uint64, tag = "1")] + pub calls_remaining: u64, + /// Amounts is the maximal amount of tokens transferable to the contract. + #[prost(message, repeated, tag = "2")] + pub amounts: ::prost::alloc::vec::Vec, } -/// MsgUpdateAdminResponse returns empty data +/// AllowAllMessagesFilter is a wildcard to allow any type of contract payload +/// message. +/// Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateAdminResponse {} -/// MsgClearAdmin removes any admin stored for a smart contract +pub struct AllowAllMessagesFilter {} +/// AcceptedMessageKeysFilter accept only the specific contract message keys in +/// the json object to be executed. +/// Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgClearAdmin { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, +pub struct AcceptedMessageKeysFilter { + /// Messages is the list of unique keys + #[prost(string, repeated, tag = "1")] + pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -/// MsgClearAdminResponse returns empty data +/// AcceptedMessagesFilter accept only the specific raw contract messages to be +/// executed. +/// Since: wasmd 0.30 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgClearAdminResponse {} +pub struct AcceptedMessagesFilter { + /// Messages is the list of raw contract messages + #[prost(bytes = "vec", repeated, tag = "1")] + pub messages: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} /// GenesisState - genesis state of x/wasm #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -393,36 +311,6 @@ pub struct GenesisState { pub contracts: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "4")] pub sequences: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub gen_msgs: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `GenesisState`. -pub mod genesis_state { - /// GenMsgs define the messages that can be executed during genesis phase in - /// order. The intention is to have more human readable data that is auditable. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct GenMsgs { - /// sum is a single message - #[prost(oneof = "gen_msgs::Sum", tags = "1, 2, 3")] - pub sum: ::core::option::Option, - } - /// Nested message and enum types in `GenMsgs`. - pub mod gen_msgs { - /// sum is a single message - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Sum { - #[prost(message, tag = "1")] - StoreCode(super::super::MsgStoreCode), - #[prost(message, tag = "2")] - InstantiateContract(super::super::MsgInstantiateContract), - /// MsgInstantiateContract2 intentionally not supported - /// see - #[prost(message, tag = "3")] - ExecuteContract(super::super::MsgExecuteContract), - } - } } /// Code struct encompasses CodeInfo and CodeBytes #[allow(clippy::derive_partial_eq_without_eq)] @@ -448,6 +336,8 @@ pub struct Contract { pub contract_info: ::core::option::Option, #[prost(message, repeated, tag = "3")] pub contract_state: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub contract_code_history: ::prost::alloc::vec::Vec, } /// Sequence key and value of an id generation counter #[allow(clippy::derive_partial_eq_without_eq)] @@ -478,6 +368,14 @@ pub struct MsgIbcSend { #[prost(bytes = "vec", tag = "6")] pub data: ::prost::alloc::vec::Vec, } +/// MsgIBCSendResponse +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcSendResponse { + /// Sequence number of the IBC packet sent + #[prost(uint64, tag = "1")] + pub sequence: u64, +} /// MsgIBCCloseChannel port and channel need to be owned by the contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -485,7 +383,10 @@ pub struct MsgIbcCloseChannel { #[prost(string, tag = "2")] pub channel: ::prost::alloc::string::String, } -/// StoreCodeProposal gov proposal content type to submit WASM code to the system +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit StoreCodeProposal. To submit WASM code to the system, +/// a simple MsgStoreCode can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreCodeProposal { @@ -507,9 +408,22 @@ pub struct StoreCodeProposal { /// UnpinCode code on upload, optional #[prost(bool, tag = "8")] pub unpin_code: bool, + /// Source is the URL where the code is hosted + #[prost(string, tag = "9")] + pub source: ::prost::alloc::string::String, + /// Builder is the docker image used to build the code deterministically, used + /// for smart contract verification + #[prost(string, tag = "10")] + pub builder: ::prost::alloc::string::String, + /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart + /// contract verification + #[prost(bytes = "vec", tag = "11")] + pub code_hash: ::prost::alloc::vec::Vec, } -/// InstantiateContractProposal gov proposal content type to instantiate a -/// contract. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit InstantiateContractProposal. To instantiate a contract, +/// a simple MsgInstantiateContract can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InstantiateContractProposal { @@ -538,7 +452,49 @@ pub struct InstantiateContractProposal { #[prost(message, repeated, tag = "8")] pub funds: ::prost::alloc::vec::Vec, } -/// MigrateContractProposal gov proposal content type to migrate a contract. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit InstantiateContract2Proposal. To instantiate contract 2, +/// a simple MsgInstantiateContract2 can be invoked from the x/gov module via +/// a v1 governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InstantiateContract2Proposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// RunAs is the address that is passed to the contract's enviroment as sender + #[prost(string, tag = "3")] + pub run_as: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "4")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "5")] + pub code_id: u64, + /// Label is optional metadata to be stored with a constract instance. + #[prost(string, tag = "6")] + pub label: ::prost::alloc::string::String, + /// Msg json encode message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "7")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "8")] + pub funds: ::prost::alloc::vec::Vec, + /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + #[prost(bytes = "vec", tag = "9")] + pub salt: ::prost::alloc::vec::Vec, + /// FixMsg include the msg value into the hash for the predictable address. + /// Default is false + #[prost(bool, tag = "10")] + pub fix_msg: bool, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit MigrateContractProposal. To migrate a contract, +/// a simple MsgMigrateContract can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateContractProposal { @@ -560,7 +516,10 @@ pub struct MigrateContractProposal { #[prost(bytes = "vec", tag = "6")] pub msg: ::prost::alloc::vec::Vec, } -/// SudoContractProposal gov proposal content type to call sudo on a contract. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit SudoContractProposal. To call sudo on a contract, +/// a simple MsgSudoContract can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SudoContractProposal { @@ -577,8 +536,10 @@ pub struct SudoContractProposal { #[prost(bytes = "vec", tag = "4")] pub msg: ::prost::alloc::vec::Vec, } -/// ExecuteContractProposal gov proposal content type to call execute on a -/// contract. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit ExecuteContractProposal. To call execute on a contract, +/// a simple MsgExecuteContract can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecuteContractProposal { @@ -601,7 +562,10 @@ pub struct ExecuteContractProposal { #[prost(message, repeated, tag = "6")] pub funds: ::prost::alloc::vec::Vec, } -/// UpdateAdminProposal gov proposal content type to set an admin for a contract. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit UpdateAdminProposal. To set an admin for a contract, +/// a simple MsgUpdateAdmin can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateAdminProposal { @@ -618,8 +582,10 @@ pub struct UpdateAdminProposal { #[prost(string, tag = "4")] pub contract: ::prost::alloc::string::String, } -/// ClearAdminProposal gov proposal content type to clear the admin of a -/// contract. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit ClearAdminProposal. To clear the admin of a contract, +/// a simple MsgClearAdmin can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClearAdminProposal { @@ -633,8 +599,10 @@ pub struct ClearAdminProposal { #[prost(string, tag = "3")] pub contract: ::prost::alloc::string::String, } -/// PinCodesProposal gov proposal content type to pin a set of code ids in the -/// wasmvm cache. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit PinCodesProposal. To pin a set of code ids in the wasmvm +/// cache, a simple MsgPinCodes can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PinCodesProposal { @@ -648,8 +616,10 @@ pub struct PinCodesProposal { #[prost(uint64, repeated, packed = "false", tag = "3")] pub code_ids: ::prost::alloc::vec::Vec, } -/// UnpinCodesProposal gov proposal content type to unpin a set of code ids in -/// the wasmvm cache. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm +/// cache, a simple MsgUnpinCodes can be invoked from the x/gov module via +/// a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnpinCodesProposal { @@ -675,8 +645,10 @@ pub struct AccessConfigUpdate { #[prost(message, optional, tag = "2")] pub instantiate_permission: ::core::option::Option, } -/// UpdateInstantiateConfigProposal gov proposal content type to update -/// instantiate config to a set of code ids. +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit UpdateInstantiateConfigProposal. To update instantiate config +/// to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from +/// the x/gov module via a v1 governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateInstantiateConfigProposal { @@ -691,6 +663,55 @@ pub struct UpdateInstantiateConfigProposal { #[prost(message, repeated, tag = "3")] pub access_config_updates: ::prost::alloc::vec::Vec, } +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit StoreAndInstantiateContractProposal. To store and instantiate +/// the contract, a simple MsgStoreAndInstantiateContract can be invoked from +/// the x/gov module via a v1 governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StoreAndInstantiateContractProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// RunAs is the address that is passed to the contract's environment as sender + #[prost(string, tag = "3")] + pub run_as: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "4")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "5")] + pub instantiate_permission: ::core::option::Option, + /// UnpinCode code on upload, optional + #[prost(bool, tag = "6")] + pub unpin_code: bool, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "7")] + pub admin: ::prost::alloc::string::String, + /// Label is optional metadata to be stored with a constract instance. + #[prost(string, tag = "8")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "9")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "10")] + pub funds: ::prost::alloc::vec::Vec, + /// Source is the URL where the code is hosted + #[prost(string, tag = "11")] + pub source: ::prost::alloc::string::String, + /// Builder is the docker image used to build the code deterministically, used + /// for smart contract verification + #[prost(string, tag = "12")] + pub builder: ::prost::alloc::string::String, + /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart + /// contract verification + #[prost(bytes = "vec", tag = "13")] + pub code_hash: ::prost::alloc::vec::Vec, +} /// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC /// method #[allow(clippy::derive_partial_eq_without_eq)] @@ -913,6 +934,475 @@ pub struct QueryParamsResponse { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } +/// QueryContractsByCreatorRequest is the request type for the +/// Query/ContractsByCreator RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryContractsByCreatorRequest { + /// CreatorAddress is the address of contract creator + #[prost(string, tag = "1")] + pub creator_address: ::prost::alloc::string::String, + /// Pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, +} +/// QueryContractsByCreatorResponse is the response type for the +/// Query/ContractsByCreator RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryContractsByCreatorResponse { + /// ContractAddresses result set + #[prost(string, repeated, tag = "1")] + pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, +} +/// MsgStoreCode submit Wasm code to the system +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgStoreCode { + /// Sender is the actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission access control to apply on contract creation, + /// optional + #[prost(message, optional, tag = "5")] + pub instantiate_permission: ::core::option::Option, +} +/// MsgStoreCodeResponse returns store result data. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgStoreCodeResponse { + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "1")] + pub code_id: u64, + /// Checksum is the sha256 hash of the stored code + #[prost(bytes = "vec", tag = "2")] + pub checksum: ::prost::alloc::vec::Vec, +} +/// MsgInstantiateContract create a new smart contract instance for the given +/// code id. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgInstantiateContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "2")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "3")] + pub code_id: u64, + /// Label is optional metadata to be stored with a contract instance. + #[prost(string, tag = "4")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "6")] + pub funds: ::prost::alloc::vec::Vec, +} +/// MsgInstantiateContractResponse return instantiation result data +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgInstantiateContractResponse { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgInstantiateContract2 create a new smart contract instance for the given +/// code id with a predicable address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgInstantiateContract2 { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "2")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "3")] + pub code_id: u64, + /// Label is optional metadata to be stored with a contract instance. + #[prost(string, tag = "4")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "6")] + pub funds: ::prost::alloc::vec::Vec, + /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + #[prost(bytes = "vec", tag = "7")] + pub salt: ::prost::alloc::vec::Vec, + /// FixMsg include the msg value into the hash for the predictable address. + /// Default is false + #[prost(bool, tag = "8")] + pub fix_msg: bool, +} +/// MsgInstantiateContract2Response return instantiation result data +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgInstantiateContract2Response { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgExecuteContract submits the given message data to a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgExecuteContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract + #[prost(bytes = "vec", tag = "3")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on execution + #[prost(message, repeated, tag = "5")] + pub funds: ::prost::alloc::vec::Vec, +} +/// MsgExecuteContractResponse returns execution result data. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgExecuteContractResponse { + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMigrateContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// CodeID references the new WASM code + #[prost(uint64, tag = "3")] + pub code_id: u64, + /// Msg json encoded message to be passed to the contract on migration + #[prost(bytes = "vec", tag = "4")] + pub msg: ::prost::alloc::vec::Vec, +} +/// MsgMigrateContractResponse returns contract migration result data. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMigrateContractResponse { + /// Data contains same raw bytes returned as data from the wasm contract. + /// (May be empty) + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgUpdateAdmin sets a new admin for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateAdmin { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// NewAdmin address to be set + #[prost(string, tag = "2")] + pub new_admin: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, +} +/// MsgUpdateAdminResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateAdminResponse {} +/// MsgClearAdmin removes any admin stored for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgClearAdmin { + /// Sender is the actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, +} +/// MsgClearAdminResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgClearAdminResponse {} +/// MsgUpdateInstantiateConfig updates instantiate config for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateInstantiateConfig { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// CodeID references the stored WASM code + #[prost(uint64, tag = "2")] + pub code_id: u64, + /// NewInstantiatePermission is the new access control + #[prost(message, optional, tag = "3")] + pub new_instantiate_permission: ::core::option::Option, +} +/// MsgUpdateInstantiateConfigResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateInstantiateConfigResponse {} +/// MsgUpdateParams is the MsgUpdateParams request type. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/wasm parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +/// MsgSudoContract is the MsgSudoContract request type. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSudoContract { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract as sudo + #[prost(bytes = "vec", tag = "3")] + pub msg: ::prost::alloc::vec::Vec, +} +/// MsgSudoContractResponse defines the response structure for executing a +/// MsgSudoContract message. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSudoContractResponse { + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgPinCodes is the MsgPinCodes request type. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPinCodes { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// CodeIDs references the new WASM codes + #[prost(uint64, repeated, packed = "false", tag = "2")] + pub code_ids: ::prost::alloc::vec::Vec, +} +/// MsgPinCodesResponse defines the response structure for executing a +/// MsgPinCodes message. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPinCodesResponse {} +/// MsgUnpinCodes is the MsgUnpinCodes request type. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUnpinCodes { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// CodeIDs references the WASM codes + #[prost(uint64, repeated, packed = "false", tag = "2")] + pub code_ids: ::prost::alloc::vec::Vec, +} +/// MsgUnpinCodesResponse defines the response structure for executing a +/// MsgUnpinCodes message. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUnpinCodesResponse {} +/// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract +/// request type. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgStoreAndInstantiateContract { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "3")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "4")] + pub instantiate_permission: ::core::option::Option, + /// UnpinCode code on upload, optional. As default the uploaded contract is + /// pinned to cache. + #[prost(bool, tag = "5")] + pub unpin_code: bool, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "6")] + pub admin: ::prost::alloc::string::String, + /// Label is optional metadata to be stored with a constract instance. + #[prost(string, tag = "7")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "8")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred from the authority account to the contract + /// on instantiation + #[prost(message, repeated, tag = "9")] + pub funds: ::prost::alloc::vec::Vec, + /// Source is the URL where the code is hosted + #[prost(string, tag = "10")] + pub source: ::prost::alloc::string::String, + /// Builder is the docker image used to build the code deterministically, used + /// for smart contract verification + #[prost(string, tag = "11")] + pub builder: ::prost::alloc::string::String, + /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart + /// contract verification + #[prost(bytes = "vec", tag = "12")] + pub code_hash: ::prost::alloc::vec::Vec, +} +/// MsgStoreAndInstantiateContractResponse defines the response structure +/// for executing a MsgStoreAndInstantiateContract message. +/// +/// Since: 0.40 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgStoreAndInstantiateContractResponse { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgAddCodeUploadParamsAddresses is the +/// MsgAddCodeUploadParamsAddresses request type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgAddCodeUploadParamsAddresses { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "2")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// MsgAddCodeUploadParamsAddressesResponse defines the response +/// structure for executing a MsgAddCodeUploadParamsAddresses message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgAddCodeUploadParamsAddressesResponse {} +/// MsgRemoveCodeUploadParamsAddresses is the +/// MsgRemoveCodeUploadParamsAddresses request type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRemoveCodeUploadParamsAddresses { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "2")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// MsgRemoveCodeUploadParamsAddressesResponse defines the response +/// structure for executing a MsgRemoveCodeUploadParamsAddresses message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRemoveCodeUploadParamsAddressesResponse {} +/// MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract +/// request type. +/// +/// Since: 0.42 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgStoreAndMigrateContract { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "3")] + pub instantiate_permission: ::core::option::Option, + /// Contract is the address of the smart contract + #[prost(string, tag = "4")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on migration + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, +} +/// MsgStoreAndMigrateContractResponse defines the response structure +/// for executing a MsgStoreAndMigrateContract message. +/// +/// Since: 0.42 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgStoreAndMigrateContractResponse { + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "1")] + pub code_id: u64, + /// Checksum is the sha256 hash of the stored code + #[prost(bytes = "vec", tag = "2")] + pub checksum: ::prost::alloc::vec::Vec, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "3")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgUpdateContractLabel sets a new label for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateContractLabel { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// NewLabel string to be set + #[prost(string, tag = "2")] + pub new_label: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, +} +/// MsgUpdateContractLabelResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateContractLabelResponse {} include!("cosmwasm.wasm.v1.serde.rs"); include!("cosmwasm.wasm.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs index 553922eb..93f94624 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs @@ -123,7 +123,7 @@ impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { ) } } -impl serde::Serialize for AccessConfig { +impl serde::Serialize for AcceptedMessageKeysFilter { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -131,10 +131,219 @@ impl serde::Serialize for AccessConfig { { use serde::ser::SerializeStruct; let mut len = 0; - if self.permission != 0 { + if !self.keys.is_empty() { len += 1; } - if !self.address.is_empty() { + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.AcceptedMessageKeysFilter", len)?; + if !self.keys.is_empty() { + struct_ser.serialize_field("keys", &self.keys)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AcceptedMessageKeysFilter { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["keys"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Keys, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "keys" => Ok(GeneratedField::Keys), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AcceptedMessageKeysFilter; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.AcceptedMessageKeysFilter") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut keys__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Keys => { + if keys__.is_some() { + return Err(serde::de::Error::duplicate_field("keys")); + } + keys__ = Some(map_.next_value()?); + } + } + } + Ok(AcceptedMessageKeysFilter { + keys: keys__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.AcceptedMessageKeysFilter", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AcceptedMessagesFilter { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.messages.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.AcceptedMessagesFilter", len)?; + if !self.messages.is_empty() { + struct_ser.serialize_field( + "messages", + &self + .messages + .iter() + .map(pbjson::private::base64::encode) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AcceptedMessagesFilter { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["messages"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Messages, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "messages" => Ok(GeneratedField::Messages), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AcceptedMessagesFilter; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.AcceptedMessagesFilter") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut messages__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Messages => { + if messages__.is_some() { + return Err(serde::de::Error::duplicate_field("messages")); + } + messages__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(AcceptedMessagesFilter { + messages: messages__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.AcceptedMessagesFilter", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for AccessConfig { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.permission != 0 { len += 1; } if !self.addresses.is_empty() { @@ -147,9 +356,6 @@ impl serde::Serialize for AccessConfig { })?; struct_ser.serialize_field("permission", &v)?; } - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } if !self.addresses.is_empty() { struct_ser.serialize_field("addresses", &self.addresses)?; } @@ -162,12 +368,11 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["permission", "address", "addresses"]; + const FIELDS: &[&str] = &["permission", "addresses"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Permission, - Address, Addresses, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -194,7 +399,6 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { { match value { "permission" => Ok(GeneratedField::Permission), - "address" => Ok(GeneratedField::Address), "addresses" => Ok(GeneratedField::Addresses), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -216,7 +420,6 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { V: serde::de::MapAccess<'de>, { let mut permission__ = None; - let mut address__ = None; let mut addresses__ = None; while let Some(k) = map_.next_key()? { match k { @@ -226,12 +429,6 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { } permission__ = Some(map_.next_value::()? as i32); } - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } GeneratedField::Addresses => { if addresses__.is_some() { return Err(serde::de::Error::duplicate_field("addresses")); @@ -242,7 +439,6 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { } Ok(AccessConfig { permission: permission__.unwrap_or_default(), - address: address__.unwrap_or_default(), addresses: addresses__.unwrap_or_default(), }) } @@ -385,7 +581,6 @@ impl serde::Serialize for AccessType { let variant = match self { Self::Unspecified => "ACCESS_TYPE_UNSPECIFIED", Self::Nobody => "ACCESS_TYPE_NOBODY", - Self::OnlyAddress => "ACCESS_TYPE_ONLY_ADDRESS", Self::Everybody => "ACCESS_TYPE_EVERYBODY", Self::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", }; @@ -401,7 +596,6 @@ impl<'de> serde::Deserialize<'de> for AccessType { const FIELDS: &[&str] = &[ "ACCESS_TYPE_UNSPECIFIED", "ACCESS_TYPE_NOBODY", - "ACCESS_TYPE_ONLY_ADDRESS", "ACCESS_TYPE_EVERYBODY", "ACCESS_TYPE_ANY_OF_ADDRESSES", ]; @@ -446,7 +640,6 @@ impl<'de> serde::Deserialize<'de> for AccessType { match value { "ACCESS_TYPE_UNSPECIFIED" => Ok(AccessType::Unspecified), "ACCESS_TYPE_NOBODY" => Ok(AccessType::Nobody), - "ACCESS_TYPE_ONLY_ADDRESS" => Ok(AccessType::OnlyAddress), "ACCESS_TYPE_EVERYBODY" => Ok(AccessType::Everybody), "ACCESS_TYPE_ANY_OF_ADDRESSES" => Ok(AccessType::AnyOfAddresses), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), @@ -556,6 +749,85 @@ impl<'de> serde::Deserialize<'de> for AccessTypeParam { ) } } +impl serde::Serialize for AllowAllMessagesFilter { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.AllowAllMessagesFilter", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AllowAllMessagesFilter { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = AllowAllMessagesFilter; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.AllowAllMessagesFilter") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(AllowAllMessagesFilter {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.AllowAllMessagesFilter", + FIELDS, + GeneratedVisitor, + ) + } +} impl serde::Serialize for ClearAdminProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -844,6 +1116,130 @@ impl<'de> serde::Deserialize<'de> for Code { deserializer.deserialize_struct("cosmwasm.wasm.v1.Code", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for CodeGrant { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.code_hash.is_empty() { + len += 1; + } + if self.instantiate_permission.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.CodeGrant", len)?; + if !self.code_hash.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "codeHash", + pbjson::private::base64::encode(&self.code_hash).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CodeGrant { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code_hash", + "codeHash", + "instantiate_permission", + "instantiatePermission", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeHash, + InstantiatePermission, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CodeGrant; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.CodeGrant") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_hash__ = None; + let mut instantiate_permission__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeHash => { + if code_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("codeHash")); + } + code_hash__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; + } + } + } + Ok(CodeGrant { + code_hash: code_hash__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.CodeGrant", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for CodeInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1151,6 +1547,123 @@ impl<'de> serde::Deserialize<'de> for CodeInfoResponse { ) } } +impl serde::Serialize for CombinedLimit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.calls_remaining != 0 { + len += 1; + } + if !self.amounts.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.CombinedLimit", len)?; + if self.calls_remaining != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "callsRemaining", + ToString::to_string(&self.calls_remaining).as_str(), + )?; + } + if !self.amounts.is_empty() { + struct_ser.serialize_field("amounts", &self.amounts)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CombinedLimit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["calls_remaining", "callsRemaining", "amounts"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CallsRemaining, + Amounts, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "callsRemaining" | "calls_remaining" => { + Ok(GeneratedField::CallsRemaining) + } + "amounts" => Ok(GeneratedField::Amounts), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CombinedLimit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.CombinedLimit") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut calls_remaining__ = None; + let mut amounts__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CallsRemaining => { + if calls_remaining__.is_some() { + return Err(serde::de::Error::duplicate_field("callsRemaining")); + } + calls_remaining__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Amounts => { + if amounts__.is_some() { + return Err(serde::de::Error::duplicate_field("amounts")); + } + amounts__ = Some(map_.next_value()?); + } + } + } + Ok(CombinedLimit { + calls_remaining: calls_remaining__.unwrap_or_default(), + amounts: amounts__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.CombinedLimit", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for Contract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1168,6 +1681,9 @@ impl serde::Serialize for Contract { if !self.contract_state.is_empty() { len += 1; } + if !self.contract_code_history.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Contract", len)?; if !self.contract_address.is_empty() { struct_ser.serialize_field("contractAddress", &self.contract_address)?; @@ -1178,6 +1694,9 @@ impl serde::Serialize for Contract { if !self.contract_state.is_empty() { struct_ser.serialize_field("contractState", &self.contract_state)?; } + if !self.contract_code_history.is_empty() { + struct_ser.serialize_field("contractCodeHistory", &self.contract_code_history)?; + } struct_ser.end() } } @@ -1194,6 +1713,8 @@ impl<'de> serde::Deserialize<'de> for Contract { "contractInfo", "contract_state", "contractState", + "contract_code_history", + "contractCodeHistory", ]; #[allow(clippy::enum_variant_names)] @@ -1201,6 +1722,7 @@ impl<'de> serde::Deserialize<'de> for Contract { ContractAddress, ContractInfo, ContractState, + ContractCodeHistory, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -1230,6 +1752,9 @@ impl<'de> serde::Deserialize<'de> for Contract { } "contractInfo" | "contract_info" => Ok(GeneratedField::ContractInfo), "contractState" | "contract_state" => Ok(GeneratedField::ContractState), + "contractCodeHistory" | "contract_code_history" => { + Ok(GeneratedField::ContractCodeHistory) + } _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1252,6 +1777,7 @@ impl<'de> serde::Deserialize<'de> for Contract { let mut contract_address__ = None; let mut contract_info__ = None; let mut contract_state__ = None; + let mut contract_code_history__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::ContractAddress => { @@ -1272,12 +1798,21 @@ impl<'de> serde::Deserialize<'de> for Contract { } contract_state__ = Some(map_.next_value()?); } + GeneratedField::ContractCodeHistory => { + if contract_code_history__.is_some() { + return Err(serde::de::Error::duplicate_field( + "contractCodeHistory", + )); + } + contract_code_history__ = Some(map_.next_value()?); + } } } Ok(Contract { contract_address: contract_address__.unwrap_or_default(), contract_info: contract_info__, contract_state: contract_state__.unwrap_or_default(), + contract_code_history: contract_code_history__.unwrap_or_default(), }) } } @@ -1530,7 +2065,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryOperationType { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for ContractInfo { +impl serde::Serialize for ContractExecutionAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -1538,80 +2073,28 @@ impl serde::Serialize for ContractInfo { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_id != 0 { - len += 1; - } - if !self.creator.is_empty() { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if self.created.is_some() { - len += 1; - } - if !self.ibc_port_id.is_empty() { - len += 1; - } - if self.extension.is_some() { + if !self.grants.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.ContractInfo", len)?; - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.creator.is_empty() { - struct_ser.serialize_field("creator", &self.creator)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if let Some(v) = self.created.as_ref() { - struct_ser.serialize_field("created", v)?; - } - if !self.ibc_port_id.is_empty() { - struct_ser.serialize_field("ibcPortId", &self.ibc_port_id)?; - } - if let Some(v) = self.extension.as_ref() { - struct_ser.serialize_field("extension", v)?; + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.ContractExecutionAuthorization", len)?; + if !self.grants.is_empty() { + struct_ser.serialize_field("grants", &self.grants)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ContractInfo { +impl<'de> serde::Deserialize<'de> for ContractExecutionAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "code_id", - "codeId", - "creator", - "admin", - "label", - "created", - "ibc_port_id", - "ibcPortId", - "extension", - ]; + const FIELDS: &[&str] = &["grants"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeId, - Creator, - Admin, - Label, - Created, - IbcPortId, - Extension, + Grants, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -1636,13 +2119,7 @@ impl<'de> serde::Deserialize<'de> for ContractInfo { E: serde::de::Error, { match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "creator" => Ok(GeneratedField::Creator), - "admin" => Ok(GeneratedField::Admin), - "label" => Ok(GeneratedField::Label), - "created" => Ok(GeneratedField::Created), - "ibcPortId" | "ibc_port_id" => Ok(GeneratedField::IbcPortId), - "extension" => Ok(GeneratedField::Extension), + "grants" => Ok(GeneratedField::Grants), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1652,87 +2129,43 @@ impl<'de> serde::Deserialize<'de> for ContractInfo { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ContractInfo; + type Value = ContractExecutionAuthorization; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.ContractInfo") + formatter.write_str("struct cosmwasm.wasm.v1.ContractExecutionAuthorization") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; - let mut creator__ = None; - let mut admin__ = None; - let mut label__ = None; - let mut created__ = None; - let mut ibc_port_id__ = None; - let mut extension__ = None; + let mut grants__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Creator => { - if creator__.is_some() { - return Err(serde::de::Error::duplicate_field("creator")); - } - creator__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Created => { - if created__.is_some() { - return Err(serde::de::Error::duplicate_field("created")); + GeneratedField::Grants => { + if grants__.is_some() { + return Err(serde::de::Error::duplicate_field("grants")); } - created__ = map_.next_value()?; - } - GeneratedField::IbcPortId => { - if ibc_port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("ibcPortId")); - } - ibc_port_id__ = Some(map_.next_value()?); - } - GeneratedField::Extension => { - if extension__.is_some() { - return Err(serde::de::Error::duplicate_field("extension")); - } - extension__ = map_.next_value()?; + grants__ = Some(map_.next_value()?); } } } - Ok(ContractInfo { - code_id: code_id__.unwrap_or_default(), - creator: creator__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - label: label__.unwrap_or_default(), - created: created__, - ibc_port_id: ibc_port_id__.unwrap_or_default(), - extension: extension__, + Ok(ContractExecutionAuthorization { + grants: grants__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractInfo", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.ContractExecutionAuthorization", + FIELDS, + GeneratedVisitor, + ) } } -impl serde::Serialize for ExecuteContractProposal { +impl serde::Serialize for ContractGrant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -1740,73 +2173,41 @@ impl serde::Serialize for ExecuteContractProposal { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.title.is_empty() { - len += 1; - } - if !self.description.is_empty() { - len += 1; - } - if !self.run_as.is_empty() { - len += 1; - } if !self.contract.is_empty() { len += 1; } - if !self.msg.is_empty() { + if self.limit.is_some() { len += 1; } - if !self.funds.is_empty() { + if self.filter.is_some() { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.ExecuteContractProposal", len)?; - if !self.title.is_empty() { - struct_ser.serialize_field("title", &self.title)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; - } - if !self.run_as.is_empty() { - struct_ser.serialize_field("runAs", &self.run_as)?; - } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.ContractGrant", len)?; if !self.contract.is_empty() { struct_ser.serialize_field("contract", &self.contract)?; } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + if let Some(v) = self.limit.as_ref() { + struct_ser.serialize_field("limit", v)?; } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; + if let Some(v) = self.filter.as_ref() { + struct_ser.serialize_field("filter", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { +impl<'de> serde::Deserialize<'de> for ContractGrant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "title", - "description", - "run_as", - "runAs", - "contract", - "msg", - "funds", - ]; + const FIELDS: &[&str] = &["contract", "limit", "filter"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Title, - Description, - RunAs, Contract, - Msg, - Funds, + Limit, + Filter, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -1831,12 +2232,9 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { E: serde::de::Error, { match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "runAs" | "run_as" => Ok(GeneratedField::RunAs), "contract" => Ok(GeneratedField::Contract), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), + "limit" => Ok(GeneratedField::Limit), + "filter" => Ok(GeneratedField::Filter), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1846,86 +2244,52 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ExecuteContractProposal; + type Value = ContractGrant; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.ExecuteContractProposal") + formatter.write_str("struct cosmwasm.wasm.v1.ContractGrant") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut title__ = None; - let mut description__ = None; - let mut run_as__ = None; let mut contract__ = None; - let mut msg__ = None; - let mut funds__ = None; + let mut limit__ = None; + let mut filter__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - GeneratedField::RunAs => { - if run_as__.is_some() { - return Err(serde::de::Error::duplicate_field("runAs")); - } - run_as__ = Some(map_.next_value()?); - } GeneratedField::Contract => { if contract__.is_some() { return Err(serde::de::Error::duplicate_field("contract")); } contract__ = Some(map_.next_value()?); } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); + GeneratedField::Limit => { + if limit__.is_some() { + return Err(serde::de::Error::duplicate_field("limit")); } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + limit__ = map_.next_value()?; } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); + GeneratedField::Filter => { + if filter__.is_some() { + return Err(serde::de::Error::duplicate_field("filter")); } - funds__ = Some(map_.next_value()?); + filter__ = map_.next_value()?; } } } - Ok(ExecuteContractProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - run_as: run_as__.unwrap_or_default(), + Ok(ContractGrant { contract: contract__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), + limit: limit__, + filter: filter__, }) } } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.ExecuteContractProposal", - FIELDS, - GeneratedVisitor, - ) + deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractGrant", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for GenesisState { +impl serde::Serialize for ContractInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -1933,62 +2297,80 @@ impl serde::Serialize for GenesisState { { use serde::ser::SerializeStruct; let mut len = 0; - if self.params.is_some() { + if self.code_id != 0 { len += 1; } - if !self.codes.is_empty() { + if !self.creator.is_empty() { len += 1; } - if !self.contracts.is_empty() { + if !self.admin.is_empty() { len += 1; } - if !self.sequences.is_empty() { + if !self.label.is_empty() { len += 1; } - if !self.gen_msgs.is_empty() { + if self.created.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.GenesisState", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; + if !self.ibc_port_id.is_empty() { + len += 1; } - if !self.codes.is_empty() { - struct_ser.serialize_field("codes", &self.codes)?; + if self.extension.is_some() { + len += 1; } - if !self.contracts.is_empty() { - struct_ser.serialize_field("contracts", &self.contracts)?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.ContractInfo", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; } - if !self.sequences.is_empty() { - struct_ser.serialize_field("sequences", &self.sequences)?; + if !self.creator.is_empty() { + struct_ser.serialize_field("creator", &self.creator)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if let Some(v) = self.created.as_ref() { + struct_ser.serialize_field("created", v)?; + } + if !self.ibc_port_id.is_empty() { + struct_ser.serialize_field("ibcPortId", &self.ibc_port_id)?; } - if !self.gen_msgs.is_empty() { - struct_ser.serialize_field("genMsgs", &self.gen_msgs)?; + if let Some(v) = self.extension.as_ref() { + struct_ser.serialize_field("extension", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for GenesisState { +impl<'de> serde::Deserialize<'de> for ContractInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "params", - "codes", - "contracts", - "sequences", - "gen_msgs", - "genMsgs", + "code_id", + "codeId", + "creator", + "admin", + "label", + "created", + "ibc_port_id", + "ibcPortId", + "extension", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Params, - Codes, - Contracts, - Sequences, - GenMsgs, + CodeId, + Creator, + Admin, + Label, + Created, + IbcPortId, + Extension, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2013,11 +2395,13 @@ impl<'de> serde::Deserialize<'de> for GenesisState { E: serde::de::Error, { match value { - "params" => Ok(GeneratedField::Params), - "codes" => Ok(GeneratedField::Codes), - "contracts" => Ok(GeneratedField::Contracts), - "sequences" => Ok(GeneratedField::Sequences), - "genMsgs" | "gen_msgs" => Ok(GeneratedField::GenMsgs), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "creator" => Ok(GeneratedField::Creator), + "admin" => Ok(GeneratedField::Admin), + "label" => Ok(GeneratedField::Label), + "created" => Ok(GeneratedField::Created), + "ibcPortId" | "ibc_port_id" => Ok(GeneratedField::IbcPortId), + "extension" => Ok(GeneratedField::Extension), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2027,68 +2411,87 @@ impl<'de> serde::Deserialize<'de> for GenesisState { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GenesisState; + type Value = ContractInfo; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.GenesisState") + formatter.write_str("struct cosmwasm.wasm.v1.ContractInfo") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut params__ = None; - let mut codes__ = None; - let mut contracts__ = None; - let mut sequences__ = None; - let mut gen_msgs__ = None; + let mut code_id__ = None; + let mut creator__ = None; + let mut admin__ = None; + let mut label__ = None; + let mut created__ = None; + let mut ibc_port_id__ = None; + let mut extension__ = 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::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); } - params__ = map_.next_value()?; + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); } - GeneratedField::Codes => { - if codes__.is_some() { - return Err(serde::de::Error::duplicate_field("codes")); + GeneratedField::Creator => { + if creator__.is_some() { + return Err(serde::de::Error::duplicate_field("creator")); } - codes__ = Some(map_.next_value()?); + creator__ = Some(map_.next_value()?); } - GeneratedField::Contracts => { - if contracts__.is_some() { - return Err(serde::de::Error::duplicate_field("contracts")); + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); } - contracts__ = Some(map_.next_value()?); + admin__ = Some(map_.next_value()?); } - GeneratedField::Sequences => { - if sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("sequences")); + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); } - sequences__ = Some(map_.next_value()?); + label__ = Some(map_.next_value()?); + } + GeneratedField::Created => { + if created__.is_some() { + return Err(serde::de::Error::duplicate_field("created")); + } + created__ = map_.next_value()?; + } + GeneratedField::IbcPortId => { + if ibc_port_id__.is_some() { + return Err(serde::de::Error::duplicate_field("ibcPortId")); + } + ibc_port_id__ = Some(map_.next_value()?); } - GeneratedField::GenMsgs => { - if gen_msgs__.is_some() { - return Err(serde::de::Error::duplicate_field("genMsgs")); + GeneratedField::Extension => { + if extension__.is_some() { + return Err(serde::de::Error::duplicate_field("extension")); } - gen_msgs__ = Some(map_.next_value()?); + extension__ = map_.next_value()?; } } } - Ok(GenesisState { - params: params__, - codes: codes__.unwrap_or_default(), - contracts: contracts__.unwrap_or_default(), - sequences: sequences__.unwrap_or_default(), - gen_msgs: gen_msgs__.unwrap_or_default(), + Ok(ContractInfo { + code_id: code_id__.unwrap_or_default(), + creator: creator__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + label: label__.unwrap_or_default(), + created: created__, + ibc_port_id: ibc_port_id__.unwrap_or_default(), + extension: extension__, }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractInfo", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for genesis_state::GenMsgs { +impl serde::Serialize for ContractMigrationAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2096,47 +2499,28 @@ impl serde::Serialize for genesis_state::GenMsgs { { use serde::ser::SerializeStruct; let mut len = 0; - if self.sum.is_some() { + if !self.grants.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.GenesisState.GenMsgs", len)?; - if let Some(v) = self.sum.as_ref() { - match v { - genesis_state::gen_msgs::Sum::StoreCode(v) => { - struct_ser.serialize_field("storeCode", v)?; - } - genesis_state::gen_msgs::Sum::InstantiateContract(v) => { - struct_ser.serialize_field("instantiateContract", v)?; - } - genesis_state::gen_msgs::Sum::ExecuteContract(v) => { - struct_ser.serialize_field("executeContract", v)?; - } - } + serializer.serialize_struct("cosmwasm.wasm.v1.ContractMigrationAuthorization", len)?; + if !self.grants.is_empty() { + struct_ser.serialize_field("grants", &self.grants)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { +impl<'de> serde::Deserialize<'de> for ContractMigrationAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "store_code", - "storeCode", - "instantiate_contract", - "instantiateContract", - "execute_contract", - "executeContract", - ]; + const FIELDS: &[&str] = &["grants"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - StoreCode, - InstantiateContract, - ExecuteContract, + Grants, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2161,13 +2545,7 @@ impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { E: serde::de::Error, { match value { - "storeCode" | "store_code" => Ok(GeneratedField::StoreCode), - "instantiateContract" | "instantiate_contract" => { - Ok(GeneratedField::InstantiateContract) - } - "executeContract" | "execute_contract" => { - Ok(GeneratedField::ExecuteContract) - } + "grants" => Ok(GeneratedField::Grants), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2177,61 +2555,43 @@ impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = genesis_state::GenMsgs; + type Value = ContractMigrationAuthorization; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.GenesisState.GenMsgs") + formatter.write_str("struct cosmwasm.wasm.v1.ContractMigrationAuthorization") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sum__ = None; + let mut grants__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::StoreCode => { - if sum__.is_some() { - return Err(serde::de::Error::duplicate_field("storeCode")); - } - sum__ = map_ - .next_value::<::std::option::Option<_>>()? - .map(genesis_state::gen_msgs::Sum::StoreCode); - } - GeneratedField::InstantiateContract => { - if sum__.is_some() { - return Err(serde::de::Error::duplicate_field( - "instantiateContract", - )); - } - sum__ = map_ - .next_value::<::std::option::Option<_>>()? - .map(genesis_state::gen_msgs::Sum::InstantiateContract); - } - GeneratedField::ExecuteContract => { - if sum__.is_some() { - return Err(serde::de::Error::duplicate_field("executeContract")); + GeneratedField::Grants => { + if grants__.is_some() { + return Err(serde::de::Error::duplicate_field("grants")); } - sum__ = map_ - .next_value::<::std::option::Option<_>>()? - .map(genesis_state::gen_msgs::Sum::ExecuteContract); + grants__ = Some(map_.next_value()?); } } } - Ok(genesis_state::GenMsgs { sum: sum__ }) + Ok(ContractMigrationAuthorization { + grants: grants__.unwrap_or_default(), + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.GenesisState.GenMsgs", + "cosmwasm.wasm.v1.ContractMigrationAuthorization", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for InstantiateContractProposal { +impl serde::Serialize for ExecuteContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2248,13 +2608,7 @@ impl serde::Serialize for InstantiateContractProposal { if !self.run_as.is_empty() { len += 1; } - if !self.admin.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.label.is_empty() { + if !self.contract.is_empty() { len += 1; } if !self.msg.is_empty() { @@ -2264,7 +2618,7 @@ impl serde::Serialize for InstantiateContractProposal { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.InstantiateContractProposal", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.ExecuteContractProposal", len)?; if !self.title.is_empty() { struct_ser.serialize_field("title", &self.title)?; } @@ -2274,15 +2628,8 @@ impl serde::Serialize for InstantiateContractProposal { if !self.run_as.is_empty() { struct_ser.serialize_field("runAs", &self.run_as)?; } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; } if !self.msg.is_empty() { #[allow(clippy::needless_borrow)] @@ -2295,7 +2642,7 @@ impl serde::Serialize for InstantiateContractProposal { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { +impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -2306,10 +2653,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { "description", "run_as", "runAs", - "admin", - "code_id", - "codeId", - "label", + "contract", "msg", "funds", ]; @@ -2319,9 +2663,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { Title, Description, RunAs, - Admin, - CodeId, - Label, + Contract, Msg, Funds, } @@ -2351,9 +2693,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { "title" => Ok(GeneratedField::Title), "description" => Ok(GeneratedField::Description), "runAs" | "run_as" => Ok(GeneratedField::RunAs), - "admin" => Ok(GeneratedField::Admin), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "label" => Ok(GeneratedField::Label), + "contract" => Ok(GeneratedField::Contract), "msg" => Ok(GeneratedField::Msg), "funds" => Ok(GeneratedField::Funds), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -2365,25 +2705,23 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InstantiateContractProposal; + type Value = ExecuteContractProposal; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.InstantiateContractProposal") + formatter.write_str("struct cosmwasm.wasm.v1.ExecuteContractProposal") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut title__ = None; let mut description__ = None; let mut run_as__ = None; - let mut admin__ = None; - let mut code_id__ = None; - let mut label__ = None; + let mut contract__ = None; let mut msg__ = None; let mut funds__ = None; while let Some(k) = map_.next_key()? { @@ -2406,26 +2744,11 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { } run_as__ = Some(map_.next_value()?); } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); } - label__ = Some(map_.next_value()?); + contract__ = Some(map_.next_value()?); } GeneratedField::Msg => { if msg__.is_some() { @@ -2444,26 +2767,24 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { } } } - Ok(InstantiateContractProposal { + Ok(ExecuteContractProposal { title: title__.unwrap_or_default(), description: description__.unwrap_or_default(), run_as: run_as__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - label: label__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), msg: msg__.unwrap_or_default(), funds: funds__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.InstantiateContractProposal", + "cosmwasm.wasm.v1.ExecuteContractProposal", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MigrateContractProposal { +impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2471,66 +2792,48 @@ impl serde::Serialize for MigrateContractProposal { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.title.is_empty() { - len += 1; - } - if !self.description.is_empty() { + if self.params.is_some() { len += 1; } - if !self.contract.is_empty() { + if !self.codes.is_empty() { len += 1; } - if self.code_id != 0 { + if !self.contracts.is_empty() { len += 1; } - if !self.msg.is_empty() { + if !self.sequences.is_empty() { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MigrateContractProposal", len)?; - if !self.title.is_empty() { - struct_ser.serialize_field("title", &self.title)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.GenesisState", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; + if !self.codes.is_empty() { + struct_ser.serialize_field("codes", &self.codes)?; } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + if !self.contracts.is_empty() { + struct_ser.serialize_field("contracts", &self.contracts)?; } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + if !self.sequences.is_empty() { + struct_ser.serialize_field("sequences", &self.sequences)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MigrateContractProposal { +impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "title", - "description", - "contract", - "code_id", - "codeId", - "msg", - ]; + const FIELDS: &[&str] = &["params", "codes", "contracts", "sequences"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Title, - Description, - Contract, - CodeId, - Msg, + Params, + Codes, + Contracts, + Sequences, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2555,11 +2858,10 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { E: serde::de::Error, { match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "contract" => Ok(GeneratedField::Contract), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "msg" => Ok(GeneratedField::Msg), + "params" => Ok(GeneratedField::Params), + "codes" => Ok(GeneratedField::Codes), + "contracts" => Ok(GeneratedField::Contracts), + "sequences" => Ok(GeneratedField::Sequences), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2569,7 +2871,859 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MigrateContractProposal; + type Value = GenesisState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.GenesisState") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut params__ = None; + let mut codes__ = None; + let mut contracts__ = None; + let mut sequences__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); + } + params__ = map_.next_value()?; + } + GeneratedField::Codes => { + if codes__.is_some() { + return Err(serde::de::Error::duplicate_field("codes")); + } + codes__ = Some(map_.next_value()?); + } + GeneratedField::Contracts => { + if contracts__.is_some() { + return Err(serde::de::Error::duplicate_field("contracts")); + } + contracts__ = Some(map_.next_value()?); + } + GeneratedField::Sequences => { + if sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("sequences")); + } + sequences__ = Some(map_.next_value()?); + } + } + } + Ok(GenesisState { + params: params__, + codes: codes__.unwrap_or_default(), + contracts: contracts__.unwrap_or_default(), + sequences: sequences__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for InstantiateContract2Proposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.run_as.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + if !self.salt.is_empty() { + len += 1; + } + if self.fix_msg { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.InstantiateContract2Proposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.run_as.is_empty() { + struct_ser.serialize_field("runAs", &self.run_as)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + if !self.salt.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("salt", pbjson::private::base64::encode(&self.salt).as_str())?; + } + if self.fix_msg { + struct_ser.serialize_field("fixMsg", &self.fix_msg)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for InstantiateContract2Proposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "title", + "description", + "run_as", + "runAs", + "admin", + "code_id", + "codeId", + "label", + "msg", + "funds", + "salt", + "fix_msg", + "fixMsg", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + RunAs, + Admin, + CodeId, + Label, + Msg, + Funds, + Salt, + FixMsg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "runAs" | "run_as" => Ok(GeneratedField::RunAs), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + "salt" => Ok(GeneratedField::Salt), + "fixMsg" | "fix_msg" => Ok(GeneratedField::FixMsg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = InstantiateContract2Proposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.InstantiateContract2Proposal") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut run_as__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + let mut salt__ = None; + let mut fix_msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::RunAs => { + if run_as__.is_some() { + return Err(serde::de::Error::duplicate_field("runAs")); + } + run_as__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + GeneratedField::Salt => { + if salt__.is_some() { + return Err(serde::de::Error::duplicate_field("salt")); + } + salt__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::FixMsg => { + if fix_msg__.is_some() { + return Err(serde::de::Error::duplicate_field("fixMsg")); + } + fix_msg__ = Some(map_.next_value()?); + } + } + } + Ok(InstantiateContract2Proposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + run_as: run_as__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + salt: salt__.unwrap_or_default(), + fix_msg: fix_msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.InstantiateContract2Proposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for InstantiateContractProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.run_as.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.InstantiateContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.run_as.is_empty() { + struct_ser.serialize_field("runAs", &self.run_as)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "title", + "description", + "run_as", + "runAs", + "admin", + "code_id", + "codeId", + "label", + "msg", + "funds", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + RunAs, + Admin, + CodeId, + Label, + Msg, + Funds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "runAs" | "run_as" => Ok(GeneratedField::RunAs), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = InstantiateContractProposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.InstantiateContractProposal") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut run_as__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::RunAs => { + if run_as__.is_some() { + return Err(serde::de::Error::duplicate_field("runAs")); + } + run_as__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + } + } + Ok(InstantiateContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + run_as: run_as__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.InstantiateContractProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MaxCallsLimit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.remaining != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MaxCallsLimit", len)?; + if self.remaining != 0 { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("remaining", ToString::to_string(&self.remaining).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MaxCallsLimit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["remaining"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Remaining, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "remaining" => Ok(GeneratedField::Remaining), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MaxCallsLimit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MaxCallsLimit") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut remaining__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Remaining => { + if remaining__.is_some() { + return Err(serde::de::Error::duplicate_field("remaining")); + } + remaining__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MaxCallsLimit { + remaining: remaining__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MaxCallsLimit", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MaxFundsLimit { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.amounts.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MaxFundsLimit", len)?; + if !self.amounts.is_empty() { + struct_ser.serialize_field("amounts", &self.amounts)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MaxFundsLimit { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["amounts"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amounts, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amounts" => Ok(GeneratedField::Amounts), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MaxFundsLimit; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MaxFundsLimit") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amounts__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Amounts => { + if amounts__.is_some() { + return Err(serde::de::Error::duplicate_field("amounts")); + } + amounts__ = Some(map_.next_value()?); + } + } + } + Ok(MaxFundsLimit { + amounts: amounts__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MaxFundsLimit", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MigrateContractProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MigrateContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MigrateContractProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "title", + "description", + "contract", + "code_id", + "codeId", + "msg", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Title, + Description, + Contract, + CodeId, + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "contract" => Ok(GeneratedField::Contract), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MigrateContractProposal; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { formatter.write_str("struct cosmwasm.wasm.v1.MigrateContractProposal") @@ -2578,28 +3732,3089 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut title__ = None; + let mut description__ = None; + let mut contract__ = None; + let mut code_id__ = None; + let mut msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MigrateContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MigrateContractProposal", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for Model { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.key.is_empty() { + len += 1; + } + if !self.value.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Model", len)?; + if !self.key.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + } + if !self.value.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "value", + pbjson::private::base64::encode(&self.value).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Model { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["key", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Model; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.Model") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut key__ = None; + let mut value__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); + } + key__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(Model { + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.Model", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgAddCodeUploadParamsAddresses { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.authority.is_empty() { + len += 1; + } + if !self.addresses.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + if !self.addresses.is_empty() { + struct_ser.serialize_field("addresses", &self.addresses)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgAddCodeUploadParamsAddresses { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["authority", "addresses"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authority, + Addresses, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authority" => Ok(GeneratedField::Authority), + "addresses" => Ok(GeneratedField::Addresses), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgAddCodeUploadParamsAddresses; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authority__ = None; + let mut addresses__ = 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::Addresses => { + if addresses__.is_some() { + return Err(serde::de::Error::duplicate_field("addresses")); + } + addresses__ = Some(map_.next_value()?); + } + } + } + Ok(MsgAddCodeUploadParamsAddresses { + authority: authority__.unwrap_or_default(), + addresses: addresses__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgAddCodeUploadParamsAddressesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgAddCodeUploadParamsAddressesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgAddCodeUploadParamsAddressesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(MsgAddCodeUploadParamsAddressesResponse {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgClearAdmin { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgClearAdmin { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sender", "contract"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Contract, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "contract" => Ok(GeneratedField::Contract), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgClearAdmin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdmin") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut contract__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + } + } + Ok(MsgClearAdmin { + sender: sender__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgClearAdminResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdminResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgClearAdminResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdminResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(MsgClearAdminResponse {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgClearAdminResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgExecuteContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgExecuteContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sender", "contract", "msg", "funds"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Contract, + Msg, + Funds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "contract" => Ok(GeneratedField::Contract), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgExecuteContract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContract") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut contract__ = None; + let mut msg__ = None; + let mut funds__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + } + } + Ok(MsgExecuteContract { + sender: sender__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgExecuteContract", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgExecuteContractResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContractResponse", len)?; + if !self.data.is_empty() { + #[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 MsgExecuteContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = MsgExecuteContractResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContractResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgExecuteContractResponse { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgExecuteContractResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgIbcCloseChannel { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.channel.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCCloseChannel", len)?; + if !self.channel.is_empty() { + struct_ser.serialize_field("channel", &self.channel)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["channel"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Channel, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "channel" => Ok(GeneratedField::Channel), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgIbcCloseChannel; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCCloseChannel") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut channel__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Channel => { + if channel__.is_some() { + return Err(serde::de::Error::duplicate_field("channel")); + } + channel__ = Some(map_.next_value()?); + } + } + } + Ok(MsgIbcCloseChannel { + channel: channel__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgIBCCloseChannel", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgIbcSend { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.channel.is_empty() { + len += 1; + } + if self.timeout_height != 0 { + len += 1; + } + if self.timeout_timestamp != 0 { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCSend", len)?; + if !self.channel.is_empty() { + struct_ser.serialize_field("channel", &self.channel)?; + } + if self.timeout_height != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "timeoutHeight", + ToString::to_string(&self.timeout_height).as_str(), + )?; + } + if self.timeout_timestamp != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "timeoutTimestamp", + ToString::to_string(&self.timeout_timestamp).as_str(), + )?; + } + if !self.data.is_empty() { + #[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 MsgIbcSend { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "channel", + "timeout_height", + "timeoutHeight", + "timeout_timestamp", + "timeoutTimestamp", + "data", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Channel, + TimeoutHeight, + TimeoutTimestamp, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "channel" => Ok(GeneratedField::Channel), + "timeoutHeight" | "timeout_height" => Ok(GeneratedField::TimeoutHeight), + "timeoutTimestamp" | "timeout_timestamp" => { + Ok(GeneratedField::TimeoutTimestamp) + } + "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 = MsgIbcSend; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCSend") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut channel__ = None; + let mut timeout_height__ = None; + let mut timeout_timestamp__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Channel => { + if channel__.is_some() { + return Err(serde::de::Error::duplicate_field("channel")); + } + channel__ = Some(map_.next_value()?); + } + GeneratedField::TimeoutHeight => { + if timeout_height__.is_some() { + return Err(serde::de::Error::duplicate_field("timeoutHeight")); + } + timeout_height__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + 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, + ); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgIbcSend { + channel: channel__.unwrap_or_default(), + timeout_height: timeout_height__.unwrap_or_default(), + timeout_timestamp: timeout_timestamp__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgIBCSend", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgIbcSendResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.sequence != 0 { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCSendResponse", len)?; + if self.sequence != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgIbcSendResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sequence"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sequence, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = MsgIbcSendResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCSendResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sequence__ = 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, + ); + } + } + } + Ok(MsgIbcSendResponse { + sequence: sequence__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgIBCSendResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgInstantiateContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", "admin", "code_id", "codeId", "label", "msg", "funds", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Admin, + CodeId, + Label, + Msg, + Funds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgInstantiateContract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + } + } + Ok(MsgInstantiateContract { + sender: sender__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgInstantiateContract", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgInstantiateContract2 { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + if !self.salt.is_empty() { + len += 1; + } + if self.fix_msg { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + if !self.salt.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("salt", pbjson::private::base64::encode(&self.salt).as_str())?; + } + if self.fix_msg { + struct_ser.serialize_field("fixMsg", &self.fix_msg)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", "admin", "code_id", "codeId", "label", "msg", "funds", "salt", "fix_msg", + "fixMsg", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Admin, + CodeId, + Label, + Msg, + Funds, + Salt, + FixMsg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + "salt" => Ok(GeneratedField::Salt), + "fixMsg" | "fix_msg" => Ok(GeneratedField::FixMsg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgInstantiateContract2; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + let mut salt__ = None; + let mut fix_msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + GeneratedField::Salt => { + if salt__.is_some() { + return Err(serde::de::Error::duplicate_field("salt")); + } + salt__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::FixMsg => { + if fix_msg__.is_some() { + return Err(serde::de::Error::duplicate_field("fixMsg")); + } + fix_msg__ = Some(map_.next_value()?); + } + } + } + Ok(MsgInstantiateContract2 { + sender: sender__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + salt: salt__.unwrap_or_default(), + fix_msg: fix_msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgInstantiateContract2", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgInstantiateContract2Response { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2Response", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.data.is_empty() { + #[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 MsgInstantiateContract2Response { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "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 = MsgInstantiateContract2Response; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2Response") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = 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, + ); + } + } + } + Ok(MsgInstantiateContract2Response { + address: address__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgInstantiateContract2Response", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgInstantiateContractResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContractResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.data.is_empty() { + #[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 MsgInstantiateContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "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 = MsgInstantiateContractResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContractResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = 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, + ); + } + } + } + Ok(MsgInstantiateContractResponse { + address: address__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgInstantiateContractResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgMigrateContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgMigrateContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["sender", "contract", "code_id", "codeId", "msg"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Contract, + CodeId, + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "contract" => Ok(GeneratedField::Contract), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgMigrateContract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContract") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut contract__ = None; + let mut code_id__ = None; + let mut msg__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgMigrateContract { + sender: sender__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgMigrateContract", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgMigrateContractResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContractResponse", len)?; + if !self.data.is_empty() { + #[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 MsgMigrateContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "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 = MsgMigrateContractResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContractResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgMigrateContractResponse { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgMigrateContractResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgPinCodes { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.authority.is_empty() { + len += 1; + } + if !self.code_ids.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgPinCodes", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + if !self.code_ids.is_empty() { + struct_ser.serialize_field( + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgPinCodes { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["authority", "code_ids", "codeIds"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authority, + CodeIds, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authority" => Ok(GeneratedField::Authority), + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgPinCodes; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgPinCodes") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authority__ = None; + let mut code_ids__ = 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::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); + } + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + } + } + Ok(MsgPinCodes { + authority: authority__.unwrap_or_default(), + code_ids: code_ids__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgPinCodes", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgPinCodesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgPinCodesResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgPinCodesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgPinCodesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgPinCodesResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(MsgPinCodesResponse {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgPinCodesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgRemoveCodeUploadParamsAddresses { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.authority.is_empty() { + len += 1; + } + if !self.addresses.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + if !self.addresses.is_empty() { + struct_ser.serialize_field("addresses", &self.addresses)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgRemoveCodeUploadParamsAddresses { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["authority", "addresses"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authority, + Addresses, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authority" => Ok(GeneratedField::Authority), + "addresses" => Ok(GeneratedField::Addresses), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgRemoveCodeUploadParamsAddresses; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authority__ = None; + let mut addresses__ = 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::Addresses => { + if addresses__.is_some() { + return Err(serde::de::Error::duplicate_field("addresses")); + } + addresses__ = Some(map_.next_value()?); + } + } + } + Ok(MsgRemoveCodeUploadParamsAddresses { + authority: authority__.unwrap_or_default(), + addresses: addresses__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgRemoveCodeUploadParamsAddressesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct( + "cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", + len, + )?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgRemoveCodeUploadParamsAddressesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgRemoveCodeUploadParamsAddressesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(MsgRemoveCodeUploadParamsAddressesResponse {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgStoreAndInstantiateContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.authority.is_empty() { + len += 1; + } + if !self.wasm_byte_code.is_empty() { + len += 1; + } + if self.instantiate_permission.is_some() { + len += 1; + } + if self.unpin_code { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + if !self.source.is_empty() { + len += 1; + } + if !self.builder.is_empty() { + len += 1; + } + if !self.code_hash.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + if !self.wasm_byte_code.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "wasmByteCode", + pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; + } + if self.unpin_code { + struct_ser.serialize_field("unpinCode", &self.unpin_code)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + if !self.source.is_empty() { + struct_ser.serialize_field("source", &self.source)?; + } + if !self.builder.is_empty() { + struct_ser.serialize_field("builder", &self.builder)?; + } + if !self.code_hash.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "codeHash", + pbjson::private::base64::encode(&self.code_hash).as_str(), + )?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgStoreAndInstantiateContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "authority", + "wasm_byte_code", + "wasmByteCode", + "instantiate_permission", + "instantiatePermission", + "unpin_code", + "unpinCode", + "admin", + "label", + "msg", + "funds", + "source", + "builder", + "code_hash", + "codeHash", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authority, + WasmByteCode, + InstantiatePermission, + UnpinCode, + Admin, + Label, + Msg, + Funds, + Source, + Builder, + CodeHash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authority" => Ok(GeneratedField::Authority), + "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } + "unpinCode" | "unpin_code" => Ok(GeneratedField::UnpinCode), + "admin" => Ok(GeneratedField::Admin), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + "source" => Ok(GeneratedField::Source), + "builder" => Ok(GeneratedField::Builder), + "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgStoreAndInstantiateContract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreAndInstantiateContract") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut authority__ = None; + let mut wasm_byte_code__ = None; + let mut instantiate_permission__ = None; + let mut unpin_code__ = None; + let mut admin__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + let mut source__ = None; + let mut builder__ = None; + let mut code_hash__ = 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::WasmByteCode => { + if wasm_byte_code__.is_some() { + return Err(serde::de::Error::duplicate_field("wasmByteCode")); + } + wasm_byte_code__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; + } + GeneratedField::UnpinCode => { + if unpin_code__.is_some() { + return Err(serde::de::Error::duplicate_field("unpinCode")); + } + unpin_code__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + GeneratedField::Source => { + if source__.is_some() { + return Err(serde::de::Error::duplicate_field("source")); + } + source__ = Some(map_.next_value()?); + } + GeneratedField::Builder => { + if builder__.is_some() { + return Err(serde::de::Error::duplicate_field("builder")); + } + builder__ = Some(map_.next_value()?); + } + GeneratedField::CodeHash => { + if code_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("codeHash")); + } + code_hash__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } + } + Ok(MsgStoreAndInstantiateContract { + authority: authority__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, + unpin_code: unpin_code__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + source: source__.unwrap_or_default(), + builder: builder__.unwrap_or_default(), + code_hash: code_hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgStoreAndInstantiateContractResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct( + "cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", + len, + )?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.data.is_empty() { + #[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 MsgStoreAndInstantiateContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["address", "data"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "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 = MsgStoreAndInstantiateContractResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .write_str("struct cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = 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, + ); + } + } + } + Ok(MsgStoreAndInstantiateContractResponse { + address: address__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgStoreAndMigrateContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.authority.is_empty() { + len += 1; + } + if !self.wasm_byte_code.is_empty() { + len += 1; + } + if self.instantiate_permission.is_some() { + len += 1; + } + if !self.contract.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreAndMigrateContract", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + if !self.wasm_byte_code.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "wasmByteCode", + pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "authority", + "wasm_byte_code", + "wasmByteCode", + "instantiate_permission", + "instantiatePermission", + "contract", + "msg", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Authority, + WasmByteCode, + InstantiatePermission, + Contract, + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "authority" => Ok(GeneratedField::Authority), + "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } + "contract" => Ok(GeneratedField::Contract), + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgStoreAndMigrateContract; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreAndMigrateContract") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut title__ = None; - let mut description__ = None; + let mut authority__ = None; + let mut wasm_byte_code__ = None; + let mut instantiate_permission__ = None; let mut contract__ = None; - let mut code_id__ = None; let mut msg__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); + GeneratedField::Authority => { + if authority__.is_some() { + return Err(serde::de::Error::duplicate_field("authority")); } - title__ = Some(map_.next_value()?); + authority__ = Some(map_.next_value()?); } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); + GeneratedField::WasmByteCode => { + if wasm_byte_code__.is_some() { + return Err(serde::de::Error::duplicate_field("wasmByteCode")); } - description__ = Some(map_.next_value()?); + wasm_byte_code__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; } GeneratedField::Contract => { if contract__.is_some() { @@ -2607,15 +6822,6 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { } contract__ = Some(map_.next_value()?); } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } GeneratedField::Msg => { if msg__.is_some() { return Err(serde::de::Error::duplicate_field("msg")); @@ -2627,23 +6833,23 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { } } } - Ok(MigrateContractProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), + Ok(MsgStoreAndMigrateContract { + authority: authority__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, contract: contract__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), msg: msg__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MigrateContractProposal", + "cosmwasm.wasm.v1.MsgStoreAndMigrateContract", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for Model { +impl serde::Serialize for MsgStoreAndMigrateContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2651,40 +6857,49 @@ impl serde::Serialize for Model { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.key.is_empty() { + if self.code_id != 0 { len += 1; } - if !self.value.is_empty() { + if !self.checksum.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Model", len)?; - if !self.key.is_empty() { + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", len)?; + if self.code_id != 0 { #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; } - if !self.value.is_empty() { + if !self.checksum.is_empty() { #[allow(clippy::needless_borrow)] struct_ser.serialize_field( - "value", - pbjson::private::base64::encode(&self.value).as_str(), + "checksum", + pbjson::private::base64::encode(&self.checksum).as_str(), )?; } + if !self.data.is_empty() { + #[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 Model { +impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["key", "value"]; + const FIELDS: &[&str] = &["code_id", "codeId", "checksum", "data"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Key, - Value, + CodeId, + Checksum, + Data, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2709,8 +6924,9 @@ impl<'de> serde::Deserialize<'de> for Model { E: serde::de::Error, { match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "checksum" => Ok(GeneratedField::Checksum), + "data" => Ok(GeneratedField::Data), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2720,50 +6936,68 @@ impl<'de> serde::Deserialize<'de> for Model { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Model; + type Value = MsgStoreAndMigrateContractResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.Model") + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut key__ = None; - let mut value__ = None; + let mut code_id__ = None; + let mut checksum__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); } - key__ = Some( + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); + } + checksum__ = Some( map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - value__ = Some( + data__ = Some( map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } } } - Ok(Model { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), + Ok(MsgStoreAndMigrateContractResponse { + code_id: code_id__.unwrap_or_default(), + checksum: checksum__.unwrap_or_default(), + data: data__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.Model", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", + FIELDS, + GeneratedVisitor, + ) } } -impl serde::Serialize for MsgClearAdmin { +impl serde::Serialize for MsgStoreCode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2774,31 +7008,48 @@ impl serde::Serialize for MsgClearAdmin { if !self.sender.is_empty() { len += 1; } - if !self.contract.is_empty() { + if !self.wasm_byte_code.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", len)?; + if self.instantiate_permission.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCode", len)?; if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; + if !self.wasm_byte_code.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "wasmByteCode", + pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgClearAdmin { +impl<'de> serde::Deserialize<'de> for MsgStoreCode { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["sender", "contract"]; + const FIELDS: &[&str] = &[ + "sender", + "wasm_byte_code", + "wasmByteCode", + "instantiate_permission", + "instantiatePermission", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Sender, - Contract, + WasmByteCode, + InstantiatePermission, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2824,7 +7075,10 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdmin { { match value { "sender" => Ok(GeneratedField::Sender), - "contract" => Ok(GeneratedField::Contract), + "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2834,18 +7088,19 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdmin { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgClearAdmin; + type Value = MsgStoreCode; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdmin") + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCode") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut sender__ = None; - let mut contract__ = None; + let mut wasm_byte_code__ = None; + let mut instantiate_permission__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Sender => { @@ -2854,46 +7109,78 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdmin { } sender__ = Some(map_.next_value()?); } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); + GeneratedField::WasmByteCode => { + if wasm_byte_code__.is_some() { + return Err(serde::de::Error::duplicate_field("wasmByteCode")); } - contract__ = Some(map_.next_value()?); + wasm_byte_code__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; } } } - Ok(MsgClearAdmin { + Ok(MsgStoreCode { sender: sender__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgStoreCode", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgClearAdminResponse { +impl serde::Serialize for MsgStoreCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdminResponse", len)?; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + if !self.checksum.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCodeResponse", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.checksum.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "checksum", + pbjson::private::base64::encode(&self.checksum).as_str(), + )?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { +impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[]; + const FIELDS: &[&str] = &["code_id", "codeId", "checksum"]; #[allow(clippy::enum_variant_names)] - enum GeneratedField {} + enum GeneratedField { + CodeId, + Checksum, + } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2916,7 +7203,11 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { where E: serde::de::Error, { - Err(serde::de::Error::unknown_field(value, FIELDS)) + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "checksum" => Ok(GeneratedField::Checksum), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -2924,33 +7215,57 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgClearAdminResponse; + type Value = MsgStoreCodeResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdminResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCodeResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; + let mut code_id__ = None; + let mut checksum__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); + } + checksum__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } } - Ok(MsgClearAdminResponse {}) + Ok(MsgStoreCodeResponse { + code_id: code_id__.unwrap_or_default(), + checksum: checksum__.unwrap_or_default(), + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgClearAdminResponse", + "cosmwasm.wasm.v1.MsgStoreCodeResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgExecuteContract { +impl serde::Serialize for MsgSudoContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2958,7 +7273,7 @@ impl serde::Serialize for MsgExecuteContract { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sender.is_empty() { + if !self.authority.is_empty() { len += 1; } if !self.contract.is_empty() { @@ -2967,13 +7282,10 @@ impl serde::Serialize for MsgExecuteContract { if !self.msg.is_empty() { len += 1; } - if !self.funds.is_empty() { - len += 1; - } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContract", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgSudoContract", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; } if !self.contract.is_empty() { struct_ser.serialize_field("contract", &self.contract)?; @@ -2983,26 +7295,22 @@ impl serde::Serialize for MsgExecuteContract { struct_ser .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgExecuteContract { +impl<'de> serde::Deserialize<'de> for MsgSudoContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["sender", "contract", "msg", "funds"]; + const FIELDS: &[&str] = &["authority", "contract", "msg"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sender, + Authority, Contract, Msg, - Funds, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3027,10 +7335,9 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContract { E: serde::de::Error, { match value { - "sender" => Ok(GeneratedField::Sender), + "authority" => Ok(GeneratedField::Authority), "contract" => Ok(GeneratedField::Contract), "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3040,27 +7347,26 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContract { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgExecuteContract; + type Value = MsgSudoContract; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContract") + formatter.write_str("struct cosmwasm.wasm.v1.MsgSudoContract") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sender__ = None; + let mut authority__ = None; let mut contract__ = None; let mut msg__ = None; - let mut funds__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); + GeneratedField::Authority => { + if authority__.is_some() { + return Err(serde::de::Error::duplicate_field("authority")); } - sender__ = Some(map_.next_value()?); + authority__ = Some(map_.next_value()?); } GeneratedField::Contract => { if contract__.is_some() { @@ -3077,30 +7383,23 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContract { .0, ); } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } } } - Ok(MsgExecuteContract { - sender: sender__.unwrap_or_default(), + Ok(MsgSudoContract { + authority: authority__.unwrap_or_default(), contract: contract__.unwrap_or_default(), msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgExecuteContract", + "cosmwasm.wasm.v1.MsgSudoContract", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgExecuteContractResponse { +impl serde::Serialize for MsgSudoContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3112,7 +7411,7 @@ impl serde::Serialize for MsgExecuteContractResponse { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContractResponse", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgSudoContractResponse", len)?; if !self.data.is_empty() { #[allow(clippy::needless_borrow)] struct_ser @@ -3121,7 +7420,7 @@ impl serde::Serialize for MsgExecuteContractResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { +impl<'de> serde::Deserialize<'de> for MsgSudoContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -3166,16 +7465,16 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgExecuteContractResponse; + type Value = MsgSudoContractResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContractResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgSudoContractResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -3193,19 +7492,19 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { } } } - Ok(MsgExecuteContractResponse { + Ok(MsgSudoContractResponse { data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgExecuteContractResponse", + "cosmwasm.wasm.v1.MsgSudoContractResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgIbcCloseChannel { +impl serde::Serialize for MsgUnpinCodes { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3213,28 +7512,41 @@ impl serde::Serialize for MsgIbcCloseChannel { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.channel.is_empty() { + if !self.authority.is_empty() { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCCloseChannel", len)?; - if !self.channel.is_empty() { - struct_ser.serialize_field("channel", &self.channel)?; + if !self.code_ids.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgUnpinCodes", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; + } + if !self.code_ids.is_empty() { + struct_ser.serialize_field( + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), + )?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { +impl<'de> serde::Deserialize<'de> for MsgUnpinCodes { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["channel"]; + const FIELDS: &[&str] = &["authority", "code_ids", "codeIds"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Channel, + Authority, + CodeIds, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3259,7 +7571,8 @@ impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { E: serde::de::Error, { match value { - "channel" => Ok(GeneratedField::Channel), + "authority" => Ok(GeneratedField::Authority), + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3269,40 +7582,128 @@ impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgIbcCloseChannel; + type Value = MsgUnpinCodes; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCCloseChannel") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUnpinCodes") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut channel__ = None; + let mut authority__ = None; + let mut code_ids__ = 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::Authority => { + if authority__.is_some() { + return Err(serde::de::Error::duplicate_field("authority")); } - channel__ = Some(map_.next_value()?); + authority__ = Some(map_.next_value()?); + } + GeneratedField::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); + } + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); } } } - Ok(MsgIbcCloseChannel { - channel: channel__.unwrap_or_default(), + Ok(MsgUnpinCodes { + authority: authority__.unwrap_or_default(), + code_ids: code_ids__.unwrap_or_default(), }) } } + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUnpinCodes", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgUnpinCodesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUnpinCodesResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUnpinCodesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUnpinCodesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgUnpinCodesResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(MsgUnpinCodesResponse {}) + } + } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgIBCCloseChannel", + "cosmwasm.wasm.v1.MsgUnpinCodesResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgIbcSend { +impl serde::Serialize for MsgUpdateAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3310,65 +7711,41 @@ impl serde::Serialize for MsgIbcSend { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.channel.is_empty() { - len += 1; - } - if self.timeout_height != 0 { + if !self.sender.is_empty() { len += 1; } - if self.timeout_timestamp != 0 { + if !self.new_admin.is_empty() { len += 1; } - if !self.data.is_empty() { + if !self.contract.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCSend", len)?; - if !self.channel.is_empty() { - struct_ser.serialize_field("channel", &self.channel)?; - } - if self.timeout_height != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "timeoutHeight", - ToString::to_string(&self.timeout_height).as_str(), - )?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; } - if self.timeout_timestamp != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "timeoutTimestamp", - ToString::to_string(&self.timeout_timestamp).as_str(), - )?; + if !self.new_admin.is_empty() { + struct_ser.serialize_field("newAdmin", &self.new_admin)?; } - if !self.data.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgIbcSend { +impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "channel", - "timeout_height", - "timeoutHeight", - "timeout_timestamp", - "timeoutTimestamp", - "data", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Channel, - TimeoutHeight, - TimeoutTimestamp, - Data, + const FIELDS: &[&str] = &["sender", "new_admin", "newAdmin", "contract"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + NewAdmin, + Contract, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3393,12 +7770,9 @@ impl<'de> serde::Deserialize<'de> for MsgIbcSend { E: serde::de::Error, { match value { - "channel" => Ok(GeneratedField::Channel), - "timeoutHeight" | "timeout_height" => Ok(GeneratedField::TimeoutHeight), - "timeoutTimestamp" | "timeout_timestamp" => { - Ok(GeneratedField::TimeoutTimestamp) - } - "data" => Ok(GeneratedField::Data), + "sender" => Ok(GeneratedField::Sender), + "newAdmin" | "new_admin" => Ok(GeneratedField::NewAdmin), + "contract" => Ok(GeneratedField::Contract), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3408,139 +7782,74 @@ impl<'de> serde::Deserialize<'de> for MsgIbcSend { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgIbcSend; + type Value = MsgUpdateAdmin; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCSend") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdmin") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut channel__ = None; - let mut timeout_height__ = None; - let mut timeout_timestamp__ = None; - let mut data__ = None; + let mut sender__ = None; + let mut new_admin__ = None; + let mut contract__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Channel => { - if channel__.is_some() { - return Err(serde::de::Error::duplicate_field("channel")); - } - channel__ = Some(map_.next_value()?); - } - GeneratedField::TimeoutHeight => { - if timeout_height__.is_some() { - return Err(serde::de::Error::duplicate_field("timeoutHeight")); + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); } - timeout_height__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + sender__ = Some(map_.next_value()?); } - GeneratedField::TimeoutTimestamp => { - if timeout_timestamp__.is_some() { - return Err(serde::de::Error::duplicate_field("timeoutTimestamp")); + GeneratedField::NewAdmin => { + if new_admin__.is_some() { + return Err(serde::de::Error::duplicate_field("newAdmin")); } - timeout_timestamp__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + new_admin__ = Some(map_.next_value()?); } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + contract__ = Some(map_.next_value()?); } } } - Ok(MsgIbcSend { - channel: channel__.unwrap_or_default(), - timeout_height: timeout_height__.unwrap_or_default(), - timeout_timestamp: timeout_timestamp__.unwrap_or_default(), - data: data__.unwrap_or_default(), + Ok(MsgUpdateAdmin { + sender: sender__.unwrap_or_default(), + new_admin: new_admin__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgIBCSend", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgInstantiateContract { +impl serde::Serialize for MsgUpdateAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdminResponse", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { +impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "sender", "admin", "code_id", "codeId", "label", "msg", "funds", - ]; + const FIELDS: &[&str] = &[]; #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Admin, - CodeId, - Label, - Msg, - Funds, - } + enum GeneratedField {} impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3563,15 +7872,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { where E: serde::de::Error, { - match value { - "sender" => Ok(GeneratedField::Sender), - "admin" => Ok(GeneratedField::Admin), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "label" => Ok(GeneratedField::Label), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -3579,89 +7880,33 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgInstantiateContract; + type Value = MsgUpdateAdminResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdminResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sender__ = None; - let mut admin__ = None; - let mut code_id__ = None; - let mut label__ = None; - let mut msg__ = None; - let mut funds__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(MsgInstantiateContract { - sender: sender__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - label: label__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - }) + Ok(MsgUpdateAdminResponse {}) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgInstantiateContract", + "cosmwasm.wasm.v1.MsgUpdateAdminResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgInstantiateContract2 { +impl serde::Serialize for MsgUpdateContractLabel { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3669,85 +7914,42 @@ impl serde::Serialize for MsgInstantiateContract2 { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - if !self.salt.is_empty() { - len += 1; - } - if self.fix_msg { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + if !self.sender.is_empty() { + len += 1; } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; + if !self.new_label.is_empty() { + len += 1; } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + if !self.contract.is_empty() { + len += 1; } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateContractLabel", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; } - if !self.salt.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("salt", pbjson::private::base64::encode(&self.salt).as_str())?; + if !self.new_label.is_empty() { + struct_ser.serialize_field("newLabel", &self.new_label)?; } - if self.fix_msg { - struct_ser.serialize_field("fixMsg", &self.fix_msg)?; + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { +impl<'de> serde::Deserialize<'de> for MsgUpdateContractLabel { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "sender", "admin", "code_id", "codeId", "label", "msg", "funds", "salt", "fix_msg", - "fixMsg", - ]; + const FIELDS: &[&str] = &["sender", "new_label", "newLabel", "contract"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Sender, - Admin, - CodeId, - Label, - Msg, - Funds, - Salt, - FixMsg, + NewLabel, + Contract, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3773,13 +7975,8 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { { match value { "sender" => Ok(GeneratedField::Sender), - "admin" => Ok(GeneratedField::Admin), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "label" => Ok(GeneratedField::Label), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - "salt" => Ok(GeneratedField::Salt), - "fixMsg" | "fix_msg" => Ok(GeneratedField::FixMsg), + "newLabel" | "new_label" => Ok(GeneratedField::NewLabel), + "contract" => Ok(GeneratedField::Contract), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3789,27 +7986,22 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgInstantiateContract2; + type Value = MsgUpdateContractLabel; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateContractLabel") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut sender__ = None; - let mut admin__ = None; - let mut code_id__ = None; - let mut label__ = None; - let mut msg__ = None; - let mut funds__ = None; - let mut salt__ = None; - let mut fix_msg__ = None; + let mut new_label__ = None; + let mut contract__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Sender => { @@ -3818,79 +8010,114 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { } sender__ = Some(map_.next_value()?); } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - GeneratedField::Salt => { - if salt__.is_some() { - return Err(serde::de::Error::duplicate_field("salt")); + GeneratedField::NewLabel => { + if new_label__.is_some() { + return Err(serde::de::Error::duplicate_field("newLabel")); } - salt__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + new_label__ = Some(map_.next_value()?); } - GeneratedField::FixMsg => { - if fix_msg__.is_some() { - return Err(serde::de::Error::duplicate_field("fixMsg")); + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); } - fix_msg__ = Some(map_.next_value()?); + contract__ = Some(map_.next_value()?); } } } - Ok(MsgInstantiateContract2 { + Ok(MsgUpdateContractLabel { sender: sender__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - label: label__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - salt: salt__.unwrap_or_default(), - fix_msg: fix_msg__.unwrap_or_default(), + new_label: new_label__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgInstantiateContract2", + "cosmwasm.wasm.v1.MsgUpdateContractLabel", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgInstantiateContract2Response { +impl serde::Serialize for MsgUpdateContractLabelResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgUpdateContractLabelResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::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 = MsgUpdateContractLabelResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateContractLabelResponse") + } + + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(MsgUpdateContractLabelResponse {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", + FIELDS, + GeneratedVisitor, + ) + } +} +impl serde::Serialize for MsgUpdateInstantiateConfig { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3898,37 +8125,49 @@ impl serde::Serialize for MsgInstantiateContract2Response { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { + if !self.sender.is_empty() { len += 1; } - if !self.data.is_empty() { + if self.code_id != 0 { + len += 1; + } + if self.new_instantiate_permission.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2Response", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; } - if !self.data.is_empty() { + if self.code_id != 0 { #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if let Some(v) = self.new_instantiate_permission.as_ref() { + struct_ser.serialize_field("newInstantiatePermission", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { +impl<'de> serde::Deserialize<'de> for MsgUpdateInstantiateConfig { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "data"]; + const FIELDS: &[&str] = &[ + "sender", + "code_id", + "codeId", + "new_instantiate_permission", + "newInstantiatePermission", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, - Data, + Sender, + CodeId, + NewInstantiatePermission, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3953,8 +8192,11 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), - "data" => Ok(GeneratedField::Data), + "sender" => Ok(GeneratedField::Sender), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "newInstantiatePermission" | "new_instantiate_permission" => { + Ok(GeneratedField::NewInstantiatePermission) + } _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3964,93 +8206,86 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgInstantiateContract2Response; + type Value = MsgUpdateInstantiateConfig; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2Response") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateInstantiateConfig") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; - let mut data__ = None; + let mut sender__ = None; + let mut code_id__ = None; + let mut new_instantiate_permission__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); } - address__ = Some(map_.next_value()?); + sender__ = Some(map_.next_value()?); } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } - } - } - Ok(MsgInstantiateContract2Response { - address: address__.unwrap_or_default(), - data: data__.unwrap_or_default(), + GeneratedField::NewInstantiatePermission => { + if new_instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "newInstantiatePermission", + )); + } + new_instantiate_permission__ = map_.next_value()?; + } + } + } + Ok(MsgUpdateInstantiateConfig { + sender: sender__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + new_instantiate_permission: new_instantiate_permission__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgInstantiateContract2Response", + "cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgInstantiateContractResponse { +impl serde::Serialize for MsgUpdateInstantiateConfigResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContractResponse", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.data.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; - } + let len = 0; + let struct_ser = serializer + .serialize_struct("cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { +impl<'de> serde::Deserialize<'de> for MsgUpdateInstantiateConfigResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "data"]; + const FIELDS: &[&str] = &[]; #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Data, - } + enum GeneratedField {} impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4073,11 +8308,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { where E: serde::de::Error, { - match value { - "address" => Ok(GeneratedField::Address), - "data" => Ok(GeneratedField::Data), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -4085,54 +8316,33 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgInstantiateContractResponse; + type Value = MsgUpdateInstantiateConfigResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContractResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = 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, - ); - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(MsgInstantiateContractResponse { - address: address__.unwrap_or_default(), - data: data__.unwrap_or_default(), - }) + Ok(MsgUpdateInstantiateConfigResponse {}) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgInstantiateContractResponse", + "cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgMigrateContract { +impl serde::Serialize for MsgUpdateParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4140,52 +8350,35 @@ impl serde::Serialize for MsgMigrateContract { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.contract.is_empty() { - len += 1; - } - if self.code_id != 0 { + if !self.authority.is_empty() { len += 1; } - if !self.msg.is_empty() { + if self.params.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContract", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateParams", len)?; + if !self.authority.is_empty() { + struct_ser.serialize_field("authority", &self.authority)?; } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgMigrateContract { +impl<'de> serde::Deserialize<'de> for MsgUpdateParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["sender", "contract", "code_id", "codeId", "msg"]; + const FIELDS: &[&str] = &["authority", "params"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sender, - Contract, - CodeId, - Msg, + Authority, + Params, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4210,10 +8403,8 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContract { E: serde::de::Error, { match value { - "sender" => Ok(GeneratedField::Sender), - "contract" => Ok(GeneratedField::Contract), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "msg" => Ok(GeneratedField::Msg), + "authority" => Ok(GeneratedField::Authority), + "params" => Ok(GeneratedField::Params), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -4223,102 +8414,70 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContract { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgMigrateContract; + type Value = MsgUpdateParams; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContract") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateParams") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sender__ = None; - let mut contract__ = None; - let mut code_id__ = None; - let mut msg__ = None; + let mut authority__ = None; + let mut params__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); - } - contract__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); + GeneratedField::Authority => { + if authority__.is_some() { + return Err(serde::de::Error::duplicate_field("authority")); } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + authority__ = Some(map_.next_value()?); } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + params__ = map_.next_value()?; } } } - Ok(MsgMigrateContract { - sender: sender__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), + Ok(MsgUpdateParams { + authority: authority__.unwrap_or_default(), + params: params__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgMigrateContract", + "cosmwasm.wasm.v1.MsgUpdateParams", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgMigrateContractResponse { +impl serde::Serialize for MsgUpdateParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let mut len = 0; - if !self.data.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContractResponse", len)?; - if !self.data.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; - } + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateParamsResponse", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { +impl<'de> serde::Deserialize<'de> for MsgUpdateParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["data"]; + const FIELDS: &[&str] = &[]; #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Data, - } + enum GeneratedField {} impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4341,10 +8500,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { where E: serde::de::Error, { - match value { - "data" => Ok(GeneratedField::Data), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -4352,46 +8508,33 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgMigrateContractResponse; + type Value = MsgUpdateParamsResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContractResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateParamsResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(MsgMigrateContractResponse { - data: data__.unwrap_or_default(), - }) + Ok(MsgUpdateParamsResponse {}) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgMigrateContractResponse", + "cosmwasm.wasm.v1.MsgUpdateParamsResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgStoreCode { +impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4399,51 +8542,45 @@ impl serde::Serialize for MsgStoreCode { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.wasm_byte_code.is_empty() { + if self.code_upload_access.is_some() { len += 1; } - if self.instantiate_permission.is_some() { + if self.instantiate_default_permission != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCode", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.wasm_byte_code.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "wasmByteCode", - pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), - )?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Params", len)?; + if let Some(v) = self.code_upload_access.as_ref() { + struct_ser.serialize_field("codeUploadAccess", v)?; } - if let Some(v) = self.instantiate_permission.as_ref() { - struct_ser.serialize_field("instantiatePermission", v)?; + if self.instantiate_default_permission != 0 { + let v = AccessType::try_from(self.instantiate_default_permission).map_err(|_| { + serde::ser::Error::custom(format!( + "Invalid variant {}", + self.instantiate_default_permission + )) + })?; + struct_ser.serialize_field("instantiateDefaultPermission", &v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgStoreCode { +impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "sender", - "wasm_byte_code", - "wasmByteCode", - "instantiate_permission", - "instantiatePermission", + "code_upload_access", + "codeUploadAccess", + "instantiate_default_permission", + "instantiateDefaultPermission", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sender, - WasmByteCode, - InstantiatePermission, + CodeUploadAccess, + InstantiateDefaultPermission, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4468,10 +8605,11 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { E: serde::de::Error, { match value { - "sender" => Ok(GeneratedField::Sender), - "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), - "instantiatePermission" | "instantiate_permission" => { - Ok(GeneratedField::InstantiatePermission) + "codeUploadAccess" | "code_upload_access" => { + Ok(GeneratedField::CodeUploadAccess) + } + "instantiateDefaultPermission" | "instantiate_default_permission" => { + Ok(GeneratedField::InstantiateDefaultPermission) } _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -4482,57 +8620,48 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgStoreCode; + type Value = Params; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCode") + formatter.write_str("struct cosmwasm.wasm.v1.Params") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sender__ = None; - let mut wasm_byte_code__ = None; - let mut instantiate_permission__ = None; + let mut code_upload_access__ = None; + let mut instantiate_default_permission__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::WasmByteCode => { - if wasm_byte_code__.is_some() { - return Err(serde::de::Error::duplicate_field("wasmByteCode")); + GeneratedField::CodeUploadAccess => { + if code_upload_access__.is_some() { + return Err(serde::de::Error::duplicate_field("codeUploadAccess")); } - wasm_byte_code__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + code_upload_access__ = map_.next_value()?; } - GeneratedField::InstantiatePermission => { - if instantiate_permission__.is_some() { + GeneratedField::InstantiateDefaultPermission => { + if instantiate_default_permission__.is_some() { return Err(serde::de::Error::duplicate_field( - "instantiatePermission", + "instantiateDefaultPermission", )); } - instantiate_permission__ = map_.next_value()?; + instantiate_default_permission__ = + Some(map_.next_value::()? as i32); } } } - Ok(MsgStoreCode { - sender: sender__.unwrap_or_default(), - wasm_byte_code: wasm_byte_code__.unwrap_or_default(), - instantiate_permission: instantiate_permission__, + Ok(Params { + code_upload_access: code_upload_access__, + instantiate_default_permission: instantiate_default_permission__ + .unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgStoreCode", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("cosmwasm.wasm.v1.Params", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgStoreCodeResponse { +impl serde::Serialize for PinCodesProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4540,40 +8669,49 @@ impl serde::Serialize for MsgStoreCodeResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_id != 0 { + if !self.title.is_empty() { len += 1; } - if !self.checksum.is_empty() { + if !self.description.is_empty() { + len += 1; + } + if !self.code_ids.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCodeResponse", len)?; - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + serializer.serialize_struct("cosmwasm.wasm.v1.PinCodesProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; } - if !self.checksum.is_empty() { - #[allow(clippy::needless_borrow)] + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.code_ids.is_empty() { struct_ser.serialize_field( - "checksum", - pbjson::private::base64::encode(&self.checksum).as_str(), + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), )?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { +impl<'de> serde::Deserialize<'de> for PinCodesProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_id", "codeId", "checksum"]; + const FIELDS: &[&str] = &["title", "description", "code_ids", "codeIds"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeId, - Checksum, + Title, + Description, + CodeIds, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4598,8 +8736,9 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { E: serde::de::Error, { match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "checksum" => Ok(GeneratedField::Checksum), + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -4609,57 +8748,61 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgStoreCodeResponse; + type Value = PinCodesProposal; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCodeResponse") + formatter.write_str("struct cosmwasm.wasm.v1.PinCodesProposal") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; - let mut checksum__ = None; + let mut title__ = None; + let mut description__ = None; + let mut code_ids__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + title__ = Some(map_.next_value()?); } - GeneratedField::Checksum => { - if checksum__.is_some() { - return Err(serde::de::Error::duplicate_field("checksum")); + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); } - checksum__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, + description__ = Some(map_.next_value()?); + } + GeneratedField::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); + } + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), ); } } } - Ok(MsgStoreCodeResponse { - code_id: code_id__.unwrap_or_default(), - checksum: checksum__.unwrap_or_default(), + Ok(PinCodesProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + code_ids: code_ids__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgStoreCodeResponse", + "cosmwasm.wasm.v1.PinCodesProposal", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgUpdateAdmin { +impl serde::Serialize for QueryAllContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4667,41 +8810,35 @@ impl serde::Serialize for MsgUpdateAdmin { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.new_admin.is_empty() { + if !self.address.is_empty() { len += 1; } - if !self.contract.is_empty() { + if self.pagination.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.new_admin.is_empty() { - struct_ser.serialize_field("newAdmin", &self.new_admin)?; + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { +impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["sender", "new_admin", "newAdmin", "contract"]; + const FIELDS: &[&str] = &["address", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sender, - NewAdmin, - Contract, + Address, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4726,9 +8863,8 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { E: serde::de::Error, { match value { - "sender" => Ok(GeneratedField::Sender), - "newAdmin" | "new_admin" => Ok(GeneratedField::NewAdmin), - "contract" => Ok(GeneratedField::Contract), + "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -4738,74 +8874,88 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateAdmin; + type Value = QueryAllContractStateRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdmin") + formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sender__ = None; - let mut new_admin__ = None; - let mut contract__ = None; + let mut address__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::NewAdmin => { - if new_admin__.is_some() { - return Err(serde::de::Error::duplicate_field("newAdmin")); + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - new_admin__ = Some(map_.next_value()?); + address__ = Some(map_.next_value()?); } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - contract__ = Some(map_.next_value()?); + pagination__ = map_.next_value()?; } } } - Ok(MsgUpdateAdmin { - sender: sender__.unwrap_or_default(), - new_admin: new_admin__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), + Ok(QueryAllContractStateRequest { + address: address__.unwrap_or_default(), + pagination: pagination__, }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryAllContractStateRequest", + FIELDS, + GeneratedVisitor, + ) } } -impl serde::Serialize for MsgUpdateAdminResponse { +impl serde::Serialize for QueryAllContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdminResponse", len)?; + let mut len = 0; + if !self.models.is_empty() { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateResponse", len)?; + if !self.models.is_empty() { + struct_ser.serialize_field("models", &self.models)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { +impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[]; + const FIELDS: &[&str] = &["models", "pagination"]; #[allow(clippy::enum_variant_names)] - enum GeneratedField {} + enum GeneratedField { + Models, + Pagination, + } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4828,7 +8978,11 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { where E: serde::de::Error, { - Err(serde::de::Error::unknown_field(value, FIELDS)) + match value { + "models" => Ok(GeneratedField::Models), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -4836,33 +8990,51 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateAdminResponse; + type Value = QueryAllContractStateResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdminResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; + let mut models__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Models => { + if models__.is_some() { + return Err(serde::de::Error::duplicate_field("models")); + } + models__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } } - Ok(MsgUpdateAdminResponse {}) + Ok(QueryAllContractStateResponse { + models: models__.unwrap_or_default(), + pagination: pagination__, + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUpdateAdminResponse", + "cosmwasm.wasm.v1.QueryAllContractStateResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for Params { +impl serde::Serialize for QueryCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4870,45 +9042,29 @@ impl serde::Serialize for Params { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_upload_access.is_some() { - len += 1; - } - if self.instantiate_default_permission != 0 { + if self.code_id != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Params", len)?; - if let Some(v) = self.code_upload_access.as_ref() { - struct_ser.serialize_field("codeUploadAccess", v)?; - } - if self.instantiate_default_permission != 0 { - let v = AccessType::try_from(self.instantiate_default_permission).map_err(|_| { - serde::ser::Error::custom(format!( - "Invalid variant {}", - self.instantiate_default_permission - )) - })?; - struct_ser.serialize_field("instantiateDefaultPermission", &v)?; + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeRequest", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for Params { +impl<'de> serde::Deserialize<'de> for QueryCodeRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "code_upload_access", - "codeUploadAccess", - "instantiate_default_permission", - "instantiateDefaultPermission", - ]; + const FIELDS: &[&str] = &["code_id", "codeId"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeUploadAccess, - InstantiateDefaultPermission, + CodeId, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4933,12 +9089,7 @@ impl<'de> serde::Deserialize<'de> for Params { E: serde::de::Error, { match value { - "codeUploadAccess" | "code_upload_access" => { - Ok(GeneratedField::CodeUploadAccess) - } - "instantiateDefaultPermission" | "instantiate_default_permission" => { - Ok(GeneratedField::InstantiateDefaultPermission) - } + "codeId" | "code_id" => Ok(GeneratedField::CodeId), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -4948,48 +9099,43 @@ impl<'de> serde::Deserialize<'de> for Params { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Params; + type Value = QueryCodeRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.Params") + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_upload_access__ = None; - let mut instantiate_default_permission__ = None; + let mut code_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeUploadAccess => { - if code_upload_access__.is_some() { - return Err(serde::de::Error::duplicate_field("codeUploadAccess")); - } - code_upload_access__ = map_.next_value()?; - } - GeneratedField::InstantiateDefaultPermission => { - if instantiate_default_permission__.is_some() { - return Err(serde::de::Error::duplicate_field( - "instantiateDefaultPermission", - )); + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); } - instantiate_default_permission__ = - Some(map_.next_value::()? as i32); + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); } } } - Ok(Params { - code_upload_access: code_upload_access__, - instantiate_default_permission: instantiate_default_permission__ - .unwrap_or_default(), + Ok(QueryCodeRequest { + code_id: code_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.Params", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QueryCodeRequest", + FIELDS, + GeneratedVisitor, + ) } } -impl serde::Serialize for PinCodesProposal { +impl serde::Serialize for QueryCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4997,49 +9143,37 @@ impl serde::Serialize for PinCodesProposal { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.title.is_empty() { - len += 1; - } - if !self.description.is_empty() { + if self.code_info.is_some() { len += 1; } - if !self.code_ids.is_empty() { + if !self.data.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.PinCodesProposal", len)?; - if !self.title.is_empty() { - struct_ser.serialize_field("title", &self.title)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeResponse", len)?; + if let Some(v) = self.code_info.as_ref() { + struct_ser.serialize_field("codeInfo", v)?; } - if !self.code_ids.is_empty() { - struct_ser.serialize_field( - "codeIds", - &self - .code_ids - .iter() - .map(ToString::to_string) - .collect::>(), - )?; + if !self.data.is_empty() { + #[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 PinCodesProposal { +impl<'de> serde::Deserialize<'de> for QueryCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["title", "description", "code_ids", "codeIds"]; + const FIELDS: &[&str] = &["code_info", "codeInfo", "data"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Title, - Description, - CodeIds, + CodeInfo, + Data, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -5064,9 +9198,8 @@ impl<'de> serde::Deserialize<'de> for PinCodesProposal { E: serde::de::Error, { match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + "codeInfo" | "code_info" => Ok(GeneratedField::CodeInfo), + "data" => Ok(GeneratedField::Data), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -5076,61 +9209,51 @@ impl<'de> serde::Deserialize<'de> for PinCodesProposal { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PinCodesProposal; + type Value = QueryCodeResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.PinCodesProposal") + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut title__ = None; - let mut description__ = None; - let mut code_ids__ = None; + let mut code_info__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); + GeneratedField::CodeInfo => { + if code_info__.is_some() { + return Err(serde::de::Error::duplicate_field("codeInfo")); } - description__ = Some(map_.next_value()?); + code_info__ = map_.next_value()?; } - GeneratedField::CodeIds => { - if code_ids__.is_some() { - return Err(serde::de::Error::duplicate_field("codeIds")); + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - code_ids__ = Some( - map_.next_value::>>()? - .into_iter() - .map(|x| x.0) - .collect(), + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, ); } } } - Ok(PinCodesProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - code_ids: code_ids__.unwrap_or_default(), + Ok(QueryCodeResponse { + code_info: code_info__, + data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.PinCodesProposal", + "cosmwasm.wasm.v1.QueryCodeResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryAllContractStateRequest { +impl serde::Serialize for QueryCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5138,34 +9261,27 @@ impl serde::Serialize for QueryAllContractStateRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { - len += 1; - } if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesRequest", len)?; if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { +impl<'de> serde::Deserialize<'de> for QueryCodesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "pagination"]; + const FIELDS: &[&str] = &["pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5191,7 +9307,6 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -5202,29 +9317,19 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAllContractStateRequest; + type Value = QueryCodesRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesRequest") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); @@ -5233,20 +9338,19 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { } } } - Ok(QueryAllContractStateRequest { - address: address__.unwrap_or_default(), + Ok(QueryCodesRequest { pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryAllContractStateRequest", + "cosmwasm.wasm.v1.QueryCodesRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryAllContractStateResponse { +impl serde::Serialize for QueryCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5254,16 +9358,16 @@ impl serde::Serialize for QueryAllContractStateResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.models.is_empty() { + if !self.code_infos.is_empty() { len += 1; } if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateResponse", len)?; - if !self.models.is_empty() { - struct_ser.serialize_field("models", &self.models)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesResponse", len)?; + if !self.code_infos.is_empty() { + struct_ser.serialize_field("codeInfos", &self.code_infos)?; } if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; @@ -5271,17 +9375,17 @@ impl serde::Serialize for QueryAllContractStateResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { +impl<'de> serde::Deserialize<'de> for QueryCodesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["models", "pagination"]; + const FIELDS: &[&str] = &["code_infos", "codeInfos", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Models, + CodeInfos, Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5307,7 +9411,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { E: serde::de::Error, { match value { - "models" => Ok(GeneratedField::Models), + "codeInfos" | "code_infos" => Ok(GeneratedField::CodeInfos), "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -5318,28 +9422,25 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAllContractStateResponse; + type Value = QueryCodesResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesResponse") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut models__ = None; + let mut code_infos__ = None; let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Models => { - if models__.is_some() { - return Err(serde::de::Error::duplicate_field("models")); + GeneratedField::CodeInfos => { + if code_infos__.is_some() { + return Err(serde::de::Error::duplicate_field("codeInfos")); } - models__ = Some(map_.next_value()?); + code_infos__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { @@ -5349,20 +9450,20 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { } } } - Ok(QueryAllContractStateResponse { - models: models__.unwrap_or_default(), + Ok(QueryCodesResponse { + code_infos: code_infos__.unwrap_or_default(), pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryAllContractStateResponse", + "cosmwasm.wasm.v1.QueryCodesResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryCodeRequest { +impl serde::Serialize for QueryContractHistoryRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5370,29 +9471,35 @@ impl serde::Serialize for QueryCodeRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_id != 0 { + if !self.address.is_empty() { + len += 1; + } + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeRequest", len)?; - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryCodeRequest { +impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_id", "codeId"]; + const FIELDS: &[&str] = &["address", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeId, + Address, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -5417,7 +9524,8 @@ impl<'de> serde::Deserialize<'de> for QueryCodeRequest { E: serde::de::Error, { match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -5427,43 +9535,51 @@ impl<'de> serde::Deserialize<'de> for QueryCodeRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCodeRequest; + type Value = QueryContractHistoryRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; + let mut address__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + address__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; } } } - Ok(QueryCodeRequest { - code_id: code_id__.unwrap_or_default(), + Ok(QueryContractHistoryRequest { + address: address__.unwrap_or_default(), + pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryCodeRequest", + "cosmwasm.wasm.v1.QueryContractHistoryRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryCodeResponse { +impl serde::Serialize for QueryContractHistoryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5471,37 +9587,35 @@ impl serde::Serialize for QueryCodeResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_info.is_some() { + if !self.entries.is_empty() { len += 1; } - if !self.data.is_empty() { + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeResponse", len)?; - if let Some(v) = self.code_info.as_ref() { - struct_ser.serialize_field("codeInfo", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryResponse", len)?; + if !self.entries.is_empty() { + struct_ser.serialize_field("entries", &self.entries)?; } - if !self.data.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryCodeResponse { +impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_info", "codeInfo", "data"]; + const FIELDS: &[&str] = &["entries", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeInfo, - Data, + Entries, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -5526,8 +9640,8 @@ impl<'de> serde::Deserialize<'de> for QueryCodeResponse { E: serde::de::Error, { match value { - "codeInfo" | "code_info" => Ok(GeneratedField::CodeInfo), - "data" => Ok(GeneratedField::Data), + "entries" => Ok(GeneratedField::Entries), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -5537,51 +9651,51 @@ impl<'de> serde::Deserialize<'de> for QueryCodeResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCodeResponse; + type Value = QueryContractHistoryResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_info__ = None; - let mut data__ = None; + let mut entries__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeInfo => { - if code_info__.is_some() { - return Err(serde::de::Error::duplicate_field("codeInfo")); + GeneratedField::Entries => { + if entries__.is_some() { + return Err(serde::de::Error::duplicate_field("entries")); } - code_info__ = map_.next_value()?; + entries__ = Some(map_.next_value()?); } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + pagination__ = map_.next_value()?; } } } - Ok(QueryCodeResponse { - code_info: code_info__, - data: data__.unwrap_or_default(), + Ok(QueryContractHistoryResponse { + entries: entries__.unwrap_or_default(), + pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryCodeResponse", + "cosmwasm.wasm.v1.QueryContractHistoryResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryCodesRequest { +impl serde::Serialize for QueryContractInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5589,28 +9703,28 @@ impl serde::Serialize for QueryCodesRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.pagination.is_some() { + if !self.address.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesRequest", len)?; - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryCodesRequest { +impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["pagination"]; + const FIELDS: &[&str] = &["address"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Pagination, + Address, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -5635,7 +9749,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { E: serde::de::Error, { match value { - "pagination" => Ok(GeneratedField::Pagination), + "address" => Ok(GeneratedField::Address), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -5645,40 +9759,43 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCodesRequest; + type Value = QueryContractInfoRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut pagination__ = None; + let mut address__ = 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::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - pagination__ = map_.next_value()?; + address__ = Some(map_.next_value()?); } } } - Ok(QueryCodesRequest { - pagination: pagination__, + Ok(QueryContractInfoRequest { + address: address__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryCodesRequest", + "cosmwasm.wasm.v1.QueryContractInfoRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryCodesResponse { +impl serde::Serialize for QueryContractInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5686,35 +9803,35 @@ impl serde::Serialize for QueryCodesResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.code_infos.is_empty() { + if !self.address.is_empty() { len += 1; } - if self.pagination.is_some() { + if self.contract_info.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesResponse", len)?; - if !self.code_infos.is_empty() { - struct_ser.serialize_field("codeInfos", &self.code_infos)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + if let Some(v) = self.contract_info.as_ref() { + struct_ser.serialize_field("contractInfo", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryCodesResponse { +impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_infos", "codeInfos", "pagination"]; + const FIELDS: &[&str] = &["address", "contract_info", "contractInfo"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeInfos, - Pagination, + Address, + ContractInfo, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -5739,8 +9856,8 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { E: serde::de::Error, { match value { - "codeInfos" | "code_infos" => Ok(GeneratedField::CodeInfos), - "pagination" => Ok(GeneratedField::Pagination), + "address" => Ok(GeneratedField::Address), + "contractInfo" | "contract_info" => Ok(GeneratedField::ContractInfo), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -5750,48 +9867,51 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCodesResponse; + type Value = QueryContractInfoResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_infos__ = None; - let mut pagination__ = None; + let mut address__ = None; + let mut contract_info__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeInfos => { - if code_infos__.is_some() { - return Err(serde::de::Error::duplicate_field("codeInfos")); + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - code_infos__ = Some(map_.next_value()?); + address__ = Some(map_.next_value()?); } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::ContractInfo => { + if contract_info__.is_some() { + return Err(serde::de::Error::duplicate_field("contractInfo")); } - pagination__ = map_.next_value()?; + contract_info__ = map_.next_value()?; } } } - Ok(QueryCodesResponse { - code_infos: code_infos__.unwrap_or_default(), - pagination: pagination__, + Ok(QueryContractInfoResponse { + address: address__.unwrap_or_default(), + contract_info: contract_info__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryCodesResponse", + "cosmwasm.wasm.v1.QueryContractInfoResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractHistoryRequest { +impl serde::Serialize for QueryContractsByCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5799,16 +9919,17 @@ impl serde::Serialize for QueryContractHistoryRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { + if self.code_id != 0 { len += 1; } if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeRequest", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; } if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; @@ -5816,17 +9937,17 @@ impl serde::Serialize for QueryContractHistoryRequest { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { +impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "pagination"]; + const FIELDS: &[&str] = &["code_id", "codeId", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, + CodeId, Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5852,7 +9973,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -5863,28 +9984,31 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractHistoryRequest; + type Value = QueryContractsByCodeRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeRequest") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; + let mut code_id__ = None; let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); } - address__ = Some(map_.next_value()?); + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); } GeneratedField::Pagination => { if pagination__.is_some() { @@ -5894,20 +10018,20 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { } } } - Ok(QueryContractHistoryRequest { - address: address__.unwrap_or_default(), + Ok(QueryContractsByCodeRequest { + code_id: code_id__.unwrap_or_default(), pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractHistoryRequest", + "cosmwasm.wasm.v1.QueryContractsByCodeRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractHistoryResponse { +impl serde::Serialize for QueryContractsByCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5915,16 +10039,16 @@ impl serde::Serialize for QueryContractHistoryResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.entries.is_empty() { + if !self.contracts.is_empty() { len += 1; } if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryResponse", len)?; - if !self.entries.is_empty() { - struct_ser.serialize_field("entries", &self.entries)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeResponse", len)?; + if !self.contracts.is_empty() { + struct_ser.serialize_field("contracts", &self.contracts)?; } if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; @@ -5932,17 +10056,17 @@ impl serde::Serialize for QueryContractHistoryResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { +impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["entries", "pagination"]; + const FIELDS: &[&str] = &["contracts", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Entries, + Contracts, Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5968,7 +10092,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { E: serde::de::Error, { match value { - "entries" => Ok(GeneratedField::Entries), + "contracts" => Ok(GeneratedField::Contracts), "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -5979,28 +10103,28 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractHistoryResponse; + type Value = QueryContractsByCodeResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut entries__ = None; + let mut contracts__ = None; let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Entries => { - if entries__.is_some() { - return Err(serde::de::Error::duplicate_field("entries")); + GeneratedField::Contracts => { + if contracts__.is_some() { + return Err(serde::de::Error::duplicate_field("contracts")); } - entries__ = Some(map_.next_value()?); + contracts__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { @@ -6010,20 +10134,20 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { } } } - Ok(QueryContractHistoryResponse { - entries: entries__.unwrap_or_default(), + Ok(QueryContractsByCodeResponse { + contracts: contracts__.unwrap_or_default(), pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractHistoryResponse", + "cosmwasm.wasm.v1.QueryContractsByCodeResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractInfoRequest { +impl serde::Serialize for QueryContractsByCreatorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6031,28 +10155,35 @@ impl serde::Serialize for QueryContractInfoRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { + if !self.creator_address.is_empty() { + len += 1; + } + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCreatorRequest", len)?; + if !self.creator_address.is_empty() { + struct_ser.serialize_field("creatorAddress", &self.creator_address)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { +impl<'de> serde::Deserialize<'de> for QueryContractsByCreatorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address"]; + const FIELDS: &[&str] = &["creator_address", "creatorAddress", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, + CreatorAddress, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6077,7 +10208,10 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), + "creatorAddress" | "creator_address" => { + Ok(GeneratedField::CreatorAddress) + } + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6087,43 +10221,51 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractInfoRequest; + type Value = QueryContractsByCreatorRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCreatorRequest") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; + let mut creator_address__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); + GeneratedField::CreatorAddress => { + if creator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("creatorAddress")); } - address__ = Some(map_.next_value()?); + creator_address__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; } } } - Ok(QueryContractInfoRequest { - address: address__.unwrap_or_default(), + Ok(QueryContractsByCreatorRequest { + creator_address: creator_address__.unwrap_or_default(), + pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractInfoRequest", + "cosmwasm.wasm.v1.QueryContractsByCreatorRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractInfoResponse { +impl serde::Serialize for QueryContractsByCreatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6131,35 +10273,35 @@ impl serde::Serialize for QueryContractInfoResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { + if !self.contract_addresses.is_empty() { len += 1; } - if self.contract_info.is_some() { + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoResponse", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCreatorResponse", len)?; + if !self.contract_addresses.is_empty() { + struct_ser.serialize_field("contractAddresses", &self.contract_addresses)?; } - if let Some(v) = self.contract_info.as_ref() { - struct_ser.serialize_field("contractInfo", v)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { +impl<'de> serde::Deserialize<'de> for QueryContractsByCreatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "contract_info", "contractInfo"]; + const FIELDS: &[&str] = &["contract_addresses", "contractAddresses", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, - ContractInfo, + ContractAddresses, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6184,8 +10326,10 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), - "contractInfo" | "contract_info" => Ok(GeneratedField::ContractInfo), + "contractAddresses" | "contract_addresses" => { + Ok(GeneratedField::ContractAddresses) + } + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6195,89 +10339,72 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractInfoResponse; + type Value = QueryContractsByCreatorResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCreatorResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; - let mut contract_info__ = None; + let mut contract_addresses__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); + GeneratedField::ContractAddresses => { + if contract_addresses__.is_some() { + return Err(serde::de::Error::duplicate_field("contractAddresses")); } - address__ = Some(map_.next_value()?); + contract_addresses__ = Some(map_.next_value()?); } - GeneratedField::ContractInfo => { - if contract_info__.is_some() { - return Err(serde::de::Error::duplicate_field("contractInfo")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - contract_info__ = map_.next_value()?; + pagination__ = map_.next_value()?; } } } - Ok(QueryContractInfoResponse { - address: address__.unwrap_or_default(), - contract_info: contract_info__, + Ok(QueryContractsByCreatorResponse { + contract_addresses: contract_addresses__.unwrap_or_default(), + pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractInfoResponse", + "cosmwasm.wasm.v1.QueryContractsByCreatorResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractsByCodeRequest { +impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let mut len = 0; - if self.code_id != 0 { - len += 1; - } - if self.pagination.is_some() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeRequest", len)?; - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } + let len = 0; + let struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsRequest", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_id", "codeId", "pagination"]; + const FIELDS: &[&str] = &[]; #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CodeId, - Pagination, - } + enum GeneratedField {} impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6300,11 +10427,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { where E: serde::de::Error, { - match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -6312,54 +10435,30 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractsByCodeRequest; + type Value = QueryParamsRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsRequest") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(QueryContractsByCodeRequest { - code_id: code_id__.unwrap_or_default(), - pagination: pagination__, - }) + Ok(QueryParamsRequest {}) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractsByCodeRequest", + "cosmwasm.wasm.v1.QueryParamsRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractsByCodeResponse { +impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6367,35 +10466,28 @@ impl serde::Serialize for QueryContractsByCodeResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.contracts.is_empty() { - len += 1; - } - if self.pagination.is_some() { + if self.params.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeResponse", len)?; - if !self.contracts.is_empty() { - struct_ser.serialize_field("contracts", &self.contracts)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["contracts", "pagination"]; + const FIELDS: &[&str] = &["params"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Contracts, - Pagination, + Params, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6420,8 +10512,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { E: serde::de::Error, { match value { - "contracts" => Ok(GeneratedField::Contracts), - "pagination" => Ok(GeneratedField::Pagination), + "params" => Ok(GeneratedField::Params), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6431,72 +10522,68 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractsByCodeResponse; + type Value = QueryParamsResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsResponse") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut contracts__ = None; - let mut pagination__ = None; + let mut params__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Contracts => { - if contracts__.is_some() { - return Err(serde::de::Error::duplicate_field("contracts")); - } - contracts__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); } - pagination__ = map_.next_value()?; + params__ = map_.next_value()?; } } } - Ok(QueryContractsByCodeResponse { - contracts: contracts__.unwrap_or_default(), - pagination: pagination__, - }) + Ok(QueryParamsResponse { params: params__ }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractsByCodeResponse", + "cosmwasm.wasm.v1.QueryParamsResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryParamsRequest { +impl serde::Serialize for QueryPinnedCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsRequest", len)?; + let mut len = 0; + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryParamsRequest { +impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[]; + const FIELDS: &[&str] = &["pagination"]; #[allow(clippy::enum_variant_names)] - enum GeneratedField {} + enum GeneratedField { + Pagination, + } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6519,7 +10606,10 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { where E: serde::de::Error, { - Err(serde::de::Error::unknown_field(value, FIELDS)) + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -6527,30 +10617,43 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsRequest; + type Value = QueryPinnedCodesRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } } - Ok(QueryParamsRequest {}) + Ok(QueryPinnedCodesRequest { + pagination: pagination__, + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryParamsRequest", + "cosmwasm.wasm.v1.QueryPinnedCodesRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryParamsResponse { +impl serde::Serialize for QueryPinnedCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6558,28 +10661,42 @@ impl serde::Serialize for QueryParamsResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if self.params.is_some() { + if !self.code_ids.is_empty() { + len += 1; + } + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsResponse", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesResponse", len)?; + if !self.code_ids.is_empty() { + struct_ser.serialize_field( + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryParamsResponse { +impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["params"]; + const FIELDS: &[&str] = &["code_ids", "codeIds", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Params, + CodeIds, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6604,7 +10721,8 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { E: serde::de::Error, { match value { - "params" => Ok(GeneratedField::Params), + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6614,38 +10732,56 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsResponse; + type Value = QueryPinnedCodesResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut params__ = None; + let mut code_ids__ = None; + let mut pagination__ = 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::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); } - params__ = map_.next_value()?; + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; } } } - Ok(QueryParamsResponse { params: params__ }) + Ok(QueryPinnedCodesResponse { + code_ids: code_ids__.unwrap_or_default(), + pagination: pagination__, + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryParamsResponse", + "cosmwasm.wasm.v1.QueryPinnedCodesResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryPinnedCodesRequest { +impl serde::Serialize for QueryRawContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6653,28 +10789,39 @@ impl serde::Serialize for QueryPinnedCodesRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.pagination.is_some() { + if !self.address.is_empty() { + len += 1; + } + if !self.query_data.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesRequest", len)?; - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.query_data.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "queryData", + pbjson::private::base64::encode(&self.query_data).as_str(), + )?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { +impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["pagination"]; + const FIELDS: &[&str] = &["address", "query_data", "queryData"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Pagination, + Address, + QueryData, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6699,7 +10846,8 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { E: serde::de::Error, { match value { - "pagination" => Ok(GeneratedField::Pagination), + "address" => Ok(GeneratedField::Address), + "queryData" | "query_data" => Ok(GeneratedField::QueryData), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6709,43 +10857,54 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPinnedCodesRequest; + type Value = QueryRawContractStateRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateRequest") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut pagination__ = None; + let mut address__ = None; + let mut query_data__ = 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::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - pagination__ = map_.next_value()?; + address__ = Some(map_.next_value()?); + } + GeneratedField::QueryData => { + if query_data__.is_some() { + return Err(serde::de::Error::duplicate_field("queryData")); + } + query_data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); } } } - Ok(QueryPinnedCodesRequest { - pagination: pagination__, + Ok(QueryRawContractStateRequest { + address: address__.unwrap_or_default(), + query_data: query_data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryPinnedCodesRequest", + "cosmwasm.wasm.v1.QueryRawContractStateRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryPinnedCodesResponse { +impl serde::Serialize for QueryRawContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6753,42 +10912,30 @@ impl serde::Serialize for QueryPinnedCodesResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.code_ids.is_empty() { - len += 1; - } - if self.pagination.is_some() { + if !self.data.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesResponse", len)?; - if !self.code_ids.is_empty() { - struct_ser.serialize_field( - "codeIds", - &self - .code_ids - .iter() - .map(ToString::to_string) - .collect::>(), - )?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateResponse", len)?; + if !self.data.is_empty() { + #[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 QueryPinnedCodesResponse { +impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_ids", "codeIds", "pagination"]; + const FIELDS: &[&str] = &["data"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeIds, - Pagination, + Data, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6813,8 +10960,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { E: serde::de::Error, { match value { - "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), - "pagination" => Ok(GeneratedField::Pagination), + "data" => Ok(GeneratedField::Data), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6824,56 +10970,46 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPinnedCodesResponse; + type Value = QueryRawContractStateResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_ids__ = None; - let mut pagination__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeIds => { - if code_ids__.is_some() { - return Err(serde::de::Error::duplicate_field("codeIds")); + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - code_ids__ = Some( - map_.next_value::>>()? - .into_iter() - .map(|x| x.0) - .collect(), + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, ); } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } } } - Ok(QueryPinnedCodesResponse { - code_ids: code_ids__.unwrap_or_default(), - pagination: pagination__, + Ok(QueryRawContractStateResponse { + data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryPinnedCodesResponse", + "cosmwasm.wasm.v1.QueryRawContractStateResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryRawContractStateRequest { +impl serde::Serialize for QuerySmartContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6888,7 +11024,7 @@ impl serde::Serialize for QueryRawContractStateRequest { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateRequest", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateRequest", len)?; if !self.address.is_empty() { struct_ser.serialize_field("address", &self.address)?; } @@ -6902,7 +11038,7 @@ impl serde::Serialize for QueryRawContractStateRequest { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { +impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -6949,16 +11085,16 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryRawContractStateRequest; + type Value = QuerySmartContractStateRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateRequest") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -6983,20 +11119,20 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { } } } - Ok(QueryRawContractStateRequest { + Ok(QuerySmartContractStateRequest { address: address__.unwrap_or_default(), query_data: query_data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryRawContractStateRequest", + "cosmwasm.wasm.v1.QuerySmartContractStateRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryRawContractStateResponse { +impl serde::Serialize for QuerySmartContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7008,7 +11144,7 @@ impl serde::Serialize for QueryRawContractStateResponse { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateResponse", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateResponse", len)?; if !self.data.is_empty() { #[allow(clippy::needless_borrow)] struct_ser @@ -7017,7 +11153,7 @@ impl serde::Serialize for QueryRawContractStateResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { +impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -7062,16 +11198,16 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryRawContractStateResponse; + type Value = QuerySmartContractStateResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -7089,19 +11225,19 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { } } } - Ok(QueryRawContractStateResponse { + Ok(QuerySmartContractStateResponse { data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryRawContractStateResponse", + "cosmwasm.wasm.v1.QuerySmartContractStateResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QuerySmartContractStateRequest { +impl serde::Serialize for Sequence { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7109,39 +11245,39 @@ impl serde::Serialize for QuerySmartContractStateRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { + if !self.id_key.is_empty() { len += 1; } - if !self.query_data.is_empty() { + if self.value != 0 { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.query_data.is_empty() { + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Sequence", len)?; + if !self.id_key.is_empty() { #[allow(clippy::needless_borrow)] struct_ser.serialize_field( - "queryData", - pbjson::private::base64::encode(&self.query_data).as_str(), + "idKey", + pbjson::private::base64::encode(&self.id_key).as_str(), )?; } + if self.value != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("value", ToString::to_string(&self.value).as_str())?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { +impl<'de> serde::Deserialize<'de> for Sequence { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "query_data", "queryData"]; + const FIELDS: &[&str] = &["id_key", "idKey", "value"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, - QueryData, + IdKey, + Value, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7166,8 +11302,8 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), - "queryData" | "query_data" => Ok(GeneratedField::QueryData), + "idKey" | "id_key" => Ok(GeneratedField::IdKey), + "value" => Ok(GeneratedField::Value), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7177,54 +11313,50 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySmartContractStateRequest; + type Value = Sequence; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateRequest") + formatter.write_str("struct cosmwasm.wasm.v1.Sequence") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; - let mut query_data__ = None; + let mut id_key__ = None; + let mut value__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); + GeneratedField::IdKey => { + if id_key__.is_some() { + return Err(serde::de::Error::duplicate_field("idKey")); } - address__ = Some(map_.next_value()?); + id_key__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); } - GeneratedField::QueryData => { - if query_data__.is_some() { - return Err(serde::de::Error::duplicate_field("queryData")); + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); } - query_data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + value__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? .0, ); } } } - Ok(QuerySmartContractStateRequest { - address: address__.unwrap_or_default(), - query_data: query_data__.unwrap_or_default(), + Ok(Sequence { + id_key: id_key__.unwrap_or_default(), + value: value__.unwrap_or_default(), }) } } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QuerySmartContractStateRequest", - FIELDS, - GeneratedVisitor, - ) + deserializer.deserialize_struct("cosmwasm.wasm.v1.Sequence", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QuerySmartContractStateResponse { +impl serde::Serialize for StoreAndInstantiateContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7232,30 +11364,141 @@ impl serde::Serialize for QuerySmartContractStateResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.data.is_empty() { + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.run_as.is_empty() { + len += 1; + } + if !self.wasm_byte_code.is_empty() { + len += 1; + } + if self.instantiate_permission.is_some() { + len += 1; + } + if self.unpin_code { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + if !self.source.is_empty() { + len += 1; + } + if !self.builder.is_empty() { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateResponse", len)?; - if !self.data.is_empty() { + if !self.code_hash.is_empty() { + len += 1; + } + let mut struct_ser = serializer + .serialize_struct("cosmwasm.wasm.v1.StoreAndInstantiateContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.run_as.is_empty() { + struct_ser.serialize_field("runAs", &self.run_as)?; + } + if !self.wasm_byte_code.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "wasmByteCode", + pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; + } + if self.unpin_code { + struct_ser.serialize_field("unpinCode", &self.unpin_code)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } + if !self.source.is_empty() { + struct_ser.serialize_field("source", &self.source)?; + } + if !self.builder.is_empty() { + struct_ser.serialize_field("builder", &self.builder)?; + } + if !self.code_hash.is_empty() { #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + struct_ser.serialize_field( + "codeHash", + pbjson::private::base64::encode(&self.code_hash).as_str(), + )?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { +impl<'de> serde::Deserialize<'de> for StoreAndInstantiateContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["data"]; + const FIELDS: &[&str] = &[ + "title", + "description", + "run_as", + "runAs", + "wasm_byte_code", + "wasmByteCode", + "instantiate_permission", + "instantiatePermission", + "unpin_code", + "unpinCode", + "admin", + "label", + "msg", + "funds", + "source", + "builder", + "code_hash", + "codeHash", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Data, + Title, + Description, + RunAs, + WasmByteCode, + InstantiatePermission, + UnpinCode, + Admin, + Label, + Msg, + Funds, + Source, + Builder, + CodeHash, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7280,7 +11523,21 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { E: serde::de::Error, { match value { - "data" => Ok(GeneratedField::Data), + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "runAs" | "run_as" => Ok(GeneratedField::RunAs), + "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) + } + "unpinCode" | "unpin_code" => Ok(GeneratedField::UnpinCode), + "admin" => Ok(GeneratedField::Admin), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + "source" => Ok(GeneratedField::Source), + "builder" => Ok(GeneratedField::Builder), + "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7290,46 +11547,150 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySmartContractStateResponse; + type Value = StoreAndInstantiateContractProposal; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateResponse") + formatter.write_str("struct cosmwasm.wasm.v1.StoreAndInstantiateContractProposal") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut data__ = None; + let mut title__ = None; + let mut description__ = None; + let mut run_as__ = None; + let mut wasm_byte_code__ = None; + let mut instantiate_permission__ = None; + let mut unpin_code__ = None; + let mut admin__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + let mut source__ = None; + let mut builder__ = None; + let mut code_hash__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); } - data__ = Some( + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::RunAs => { + if run_as__.is_some() { + return Err(serde::de::Error::duplicate_field("runAs")); + } + run_as__ = Some(map_.next_value()?); + } + GeneratedField::WasmByteCode => { + if wasm_byte_code__.is_some() { + return Err(serde::de::Error::duplicate_field("wasmByteCode")); + } + wasm_byte_code__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiatePermission", + )); + } + instantiate_permission__ = map_.next_value()?; + } + GeneratedField::UnpinCode => { + if unpin_code__.is_some() { + return Err(serde::de::Error::duplicate_field("unpinCode")); + } + unpin_code__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + GeneratedField::Source => { + if source__.is_some() { + return Err(serde::de::Error::duplicate_field("source")); + } + source__ = Some(map_.next_value()?); + } + GeneratedField::Builder => { + if builder__.is_some() { + return Err(serde::de::Error::duplicate_field("builder")); + } + builder__ = Some(map_.next_value()?); + } + GeneratedField::CodeHash => { + if code_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("codeHash")); + } + code_hash__ = Some( map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } } } - Ok(QuerySmartContractStateResponse { - data: data__.unwrap_or_default(), + Ok(StoreAndInstantiateContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + run_as: run_as__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, + unpin_code: unpin_code__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + source: source__.unwrap_or_default(), + builder: builder__.unwrap_or_default(), + code_hash: code_hash__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QuerySmartContractStateResponse", + "cosmwasm.wasm.v1.StoreAndInstantiateContractProposal", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for Sequence { +impl serde::Serialize for StoreCodeAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7337,39 +11698,28 @@ impl serde::Serialize for Sequence { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.id_key.is_empty() { + if !self.grants.is_empty() { len += 1; } - if self.value != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Sequence", len)?; - if !self.id_key.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "idKey", - pbjson::private::base64::encode(&self.id_key).as_str(), - )?; - } - if self.value != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", ToString::to_string(&self.value).as_str())?; + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.StoreCodeAuthorization", len)?; + if !self.grants.is_empty() { + struct_ser.serialize_field("grants", &self.grants)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for Sequence { +impl<'de> serde::Deserialize<'de> for StoreCodeAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["id_key", "idKey", "value"]; + const FIELDS: &[&str] = &["grants"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - IdKey, - Value, + Grants, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7394,8 +11744,7 @@ impl<'de> serde::Deserialize<'de> for Sequence { E: serde::de::Error, { match value { - "idKey" | "id_key" => Ok(GeneratedField::IdKey), - "value" => Ok(GeneratedField::Value), + "grants" => Ok(GeneratedField::Grants), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7405,47 +11754,40 @@ impl<'de> serde::Deserialize<'de> for Sequence { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Sequence; + type Value = StoreCodeAuthorization; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.Sequence") + formatter.write_str("struct cosmwasm.wasm.v1.StoreCodeAuthorization") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut id_key__ = None; - let mut value__ = None; + let mut grants__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::IdKey => { - if id_key__.is_some() { - return Err(serde::de::Error::duplicate_field("idKey")); - } - id_key__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); + GeneratedField::Grants => { + if grants__.is_some() { + return Err(serde::de::Error::duplicate_field("grants")); } - value__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + grants__ = Some(map_.next_value()?); } } } - Ok(Sequence { - id_key: id_key__.unwrap_or_default(), - value: value__.unwrap_or_default(), + Ok(StoreCodeAuthorization { + grants: grants__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.Sequence", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.StoreCodeAuthorization", + FIELDS, + GeneratedVisitor, + ) } } impl serde::Serialize for StoreCodeProposal { @@ -7474,6 +11816,15 @@ impl serde::Serialize for StoreCodeProposal { if self.unpin_code { len += 1; } + if !self.source.is_empty() { + len += 1; + } + if !self.builder.is_empty() { + len += 1; + } + if !self.code_hash.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.StoreCodeProposal", len)?; if !self.title.is_empty() { @@ -7498,6 +11849,19 @@ impl serde::Serialize for StoreCodeProposal { if self.unpin_code { struct_ser.serialize_field("unpinCode", &self.unpin_code)?; } + if !self.source.is_empty() { + struct_ser.serialize_field("source", &self.source)?; + } + if !self.builder.is_empty() { + struct_ser.serialize_field("builder", &self.builder)?; + } + if !self.code_hash.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "codeHash", + pbjson::private::base64::encode(&self.code_hash).as_str(), + )?; + } struct_ser.end() } } @@ -7518,6 +11882,10 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { "instantiatePermission", "unpin_code", "unpinCode", + "source", + "builder", + "code_hash", + "codeHash", ]; #[allow(clippy::enum_variant_names)] @@ -7528,6 +11896,9 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { WasmByteCode, InstantiatePermission, UnpinCode, + Source, + Builder, + CodeHash, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7560,6 +11931,9 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { Ok(GeneratedField::InstantiatePermission) } "unpinCode" | "unpin_code" => Ok(GeneratedField::UnpinCode), + "source" => Ok(GeneratedField::Source), + "builder" => Ok(GeneratedField::Builder), + "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7585,6 +11959,9 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { let mut wasm_byte_code__ = None; let mut instantiate_permission__ = None; let mut unpin_code__ = None; + let mut source__ = None; + let mut builder__ = None; + let mut code_hash__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Title => { @@ -7628,6 +12005,27 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { } unpin_code__ = Some(map_.next_value()?); } + GeneratedField::Source => { + if source__.is_some() { + return Err(serde::de::Error::duplicate_field("source")); + } + source__ = Some(map_.next_value()?); + } + GeneratedField::Builder => { + if builder__.is_some() { + return Err(serde::de::Error::duplicate_field("builder")); + } + builder__ = Some(map_.next_value()?); + } + GeneratedField::CodeHash => { + if code_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("codeHash")); + } + code_hash__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } } } Ok(StoreCodeProposal { @@ -7637,6 +12035,9 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { wasm_byte_code: wasm_byte_code__.unwrap_or_default(), instantiate_permission: instantiate_permission__, unpin_code: unpin_code__.unwrap_or_default(), + source: source__.unwrap_or_default(), + builder: builder__.unwrap_or_default(), + code_hash: code_hash__.unwrap_or_default(), }) } } diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs index 8393eea9..54bf671d 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs @@ -1,16 +1,16 @@ // @generated /// Generated client implementations. #[cfg(feature = "grpc")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -21,7 +21,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -36,7 +36,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -49,7 +52,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -82,10 +85,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn store_code( + pub async fn contract_info( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -94,19 +97,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/StoreCode"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractInfo"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "StoreCode")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractInfo")); self.inner.unary(req, path, codec).await } - pub async fn instantiate_contract( + pub async fn contract_history( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -115,19 +116,78 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractHistory"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractHistory")); + self.inner.unary(req, path, codec).await + } + pub async fn contracts_by_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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("/cosmwasm.wasm.v1.Query/ContractsByCode"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractsByCode")); + self.inner.unary(req, path, codec).await + } + pub async fn all_contract_state( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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("/cosmwasm.wasm.v1.Query/AllContractState"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "InstantiateContract", + "cosmwasm.wasm.v1.Query", + "AllContractState", )); self.inner.unary(req, path, codec).await } - pub async fn instantiate_contract2( + pub async fn raw_contract_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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("/cosmwasm.wasm.v1.Query/RawContractState"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Query", + "RawContractState", + )); + self.inner.unary(req, path, codec).await + } + pub async fn smart_contract_state( + &mut self, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -138,19 +198,18 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract2"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/SmartContractState"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "InstantiateContract2", + "cosmwasm.wasm.v1.Query", + "SmartContractState", )); self.inner.unary(req, path, codec).await } - pub async fn execute_contract( + pub async fn code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -158,17 +217,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ExecuteContract"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Code"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ExecuteContract")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Code")); self.inner.unary(req, path, codec).await } - pub async fn migrate_contract( + pub async fn codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -177,17 +235,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/MigrateContract"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Codes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "MigrateContract")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Codes")); self.inner.unary(req, path, codec).await } - pub async fn update_admin( + pub async fn pinned_codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -196,16 +253,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateAdmin"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/PinnedCodes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateAdmin")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "PinnedCodes")); self.inner.unary(req, path, codec).await } - pub async fn clear_admin( + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -214,26 +271,49 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ClearAdmin"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Params"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ClearAdmin")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Params")); + self.inner.unary(req, path, codec).await + } + pub async fn contracts_by_creator( + &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("/cosmwasm.wasm.v1.Query/ContractsByCreator"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Query", + "ContractsByCreator", + )); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "grpc")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -244,7 +324,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -259,10 +339,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -275,7 +352,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -308,10 +385,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn contract_info( + pub async fn store_code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -320,16 +397,62 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractInfo"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/StoreCode"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractInfo")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "StoreCode")); self.inner.unary(req, path, codec).await } - pub async fn contract_history( + pub async fn instantiate_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + 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("/cosmwasm.wasm.v1.Msg/InstantiateContract"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "InstantiateContract", + )); + self.inner.unary(req, path, codec).await + } + pub async fn instantiate_contract2( + &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("/cosmwasm.wasm.v1.Msg/InstantiateContract2"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "InstantiateContract2", + )); + self.inner.unary(req, path, codec).await + } + pub async fn execute_contract( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -339,16 +462,16 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractHistory"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ExecuteContract"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractHistory")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ExecuteContract")); self.inner.unary(req, path, codec).await } - pub async fn contracts_by_code( + pub async fn migrate_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -358,16 +481,16 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCode"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/MigrateContract"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractsByCode")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "MigrateContract")); self.inner.unary(req, path, codec).await } - pub async fn all_contract_state( + pub async fn update_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -376,19 +499,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/AllContractState"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateAdmin"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "AllContractState", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateAdmin")); self.inner.unary(req, path, codec).await } - pub async fn raw_contract_state( + pub async fn clear_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -397,20 +517,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/RawContractState"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ClearAdmin"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "RawContractState", - )); + req.extensions_mut() + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ClearAdmin")); self.inner.unary(req, path, codec).await } - pub async fn smart_contract_state( + pub async fn update_instantiate_config( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -420,19 +537,21 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/SmartContractState"); + let path = http::uri::PathAndQuery::from_static( + "/cosmwasm.wasm.v1.Msg/UpdateInstantiateConfig", + ); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "SmartContractState", + "cosmwasm.wasm.v1.Msg", + "UpdateInstantiateConfig", )); self.inner.unary(req, path, codec).await } - pub async fn code( + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -440,16 +559,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Code"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateParams"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Code")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateParams")); self.inner.unary(req, path, codec).await } - pub async fn codes( + pub async fn sudo_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -458,16 +577,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Codes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/SudoContract"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Codes")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "SudoContract")); self.inner.unary(req, path, codec).await } - pub async fn pinned_codes( + pub async fn pin_codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -476,16 +595,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/PinnedCodes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/PinCodes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "PinnedCodes")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "PinCodes")); self.inner.unary(req, path, codec).await } - pub async fn params( + pub async fn unpin_codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -494,10 +613,129 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Params"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UnpinCodes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Params")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UnpinCodes")); + self.inner.unary(req, path, codec).await + } + pub async fn store_and_instantiate_contract( + &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( + "/cosmwasm.wasm.v1.Msg/StoreAndInstantiateContract", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "StoreAndInstantiateContract", + )); + self.inner.unary(req, path, codec).await + } + pub async fn remove_code_upload_params_addresses( + &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( + "/cosmwasm.wasm.v1.Msg/RemoveCodeUploadParamsAddresses", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "RemoveCodeUploadParamsAddresses", + )); + self.inner.unary(req, path, codec).await + } + pub async fn add_code_upload_params_addresses( + &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( + "/cosmwasm.wasm.v1.Msg/AddCodeUploadParamsAddresses", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "AddCodeUploadParamsAddresses", + )); + self.inner.unary(req, path, codec).await + } + pub async fn store_and_migrate_contract( + &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( + "/cosmwasm.wasm.v1.Msg/StoreAndMigrateContract", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "StoreAndMigrateContract", + )); + self.inner.unary(req, path, codec).await + } + pub async fn update_contract_label( + &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("/cosmwasm.wasm.v1.Msg/UpdateContractLabel"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Msg", + "UpdateContractLabel", + )); self.inner.unary(req, path, codec).await } } diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index e4634862..20f90468 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -20,13 +20,13 @@ use walkdir::WalkDir; static QUIET: AtomicBool = AtomicBool::new(false); /// The Cosmos SDK commit or tag to be cloned and used to build the proto files -const COSMOS_SDK_REV: &str = "v0.46.15"; +const COSMOS_SDK_REV: &str = "v0.47.10"; /// The Cosmos ibc-go commit or tag to be cloned and used to build the proto files const IBC_REV: &str = "v3.0.0"; /// The wasmd commit or tag to be cloned and used to build the proto files -const WASMD_REV: &str = "v0.29.2"; +const WASMD_REV: &str = "v0.45.0"; // All paths must end with a / and either be absolute or include a ./ to reference the current // working directory. diff --git a/wasmd b/wasmd index e4a2bfb5..7165e41c 160000 --- a/wasmd +++ b/wasmd @@ -1 +1 @@ -Subproject commit e4a2bfb5616c4ce3ddbc994a17c20b6de5fccad1 +Subproject commit 7165e41cbf14d60a9fef4fb1e04c2c2e5e4e0cf4 From 89cc500c9345c7c1d29a3814590aa525182b1651 Mon Sep 17 00:00:00 2001 From: Ash Date: Sat, 1 Jun 2024 17:31:38 -0700 Subject: [PATCH 06/31] patch validators policy for serde --- .../prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs | 10 +++++----- proto-build/src/main.rs | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs index c8d8c3a9..ad662f85 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs @@ -7432,7 +7432,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { ) } } -impl serde::Serialize for stake_authorization::Validators { +impl serde::Serialize for stake_authorization::Policy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7451,7 +7451,7 @@ impl serde::Serialize for stake_authorization::Validators { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { +impl<'de> serde::Deserialize<'de> for stake_authorization::Policy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -7496,7 +7496,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = stake_authorization::Validators; + type Value = stake_authorization::Policy; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { formatter.write_str("struct cosmos.staking.v1beta1.StakeAuthorization.Validators") @@ -7505,7 +7505,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -7520,7 +7520,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { } } } - Ok(stake_authorization::Validators { + Ok(stake_authorization::Policy { address: address__.unwrap_or_default(), }) } diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index 20f90468..990c966c 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -419,5 +419,11 @@ fn apply_patches(proto_dir: &Path) { replacement, ) .expect("error patching cosmos.staking.v1beta1.rs"); + patch_file( + &proto_dir.join("cosmos-sdk/cosmos.staking.v1beta1.serde.rs"), + &Regex::new(pattern).unwrap(), + replacement, + ) + .expect("error patching cosmos.staking.v1beta1.serde.rs"); } } From 69dd4c9b7bd69539d9cf424627d74daa4e2a7b4e Mon Sep 17 00:00:00 2001 From: Ash Date: Sat, 1 Jun 2024 18:33:03 -0700 Subject: [PATCH 07/31] different patch for serde --- .../prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs | 10 +++++----- proto-build/src/main.rs | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs index ad662f85..c8d8c3a9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs @@ -7432,7 +7432,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { ) } } -impl serde::Serialize for stake_authorization::Policy { +impl serde::Serialize for stake_authorization::Validators { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7451,7 +7451,7 @@ impl serde::Serialize for stake_authorization::Policy { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for stake_authorization::Policy { +impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -7496,7 +7496,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Policy { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = stake_authorization::Policy; + type Value = stake_authorization::Validators; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { formatter.write_str("struct cosmos.staking.v1beta1.StakeAuthorization.Validators") @@ -7505,7 +7505,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Policy { fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -7520,7 +7520,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Policy { } } } - Ok(stake_authorization::Policy { + Ok(stake_authorization::Validators { address: address__.unwrap_or_default(), }) } diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index 990c966c..23872451 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -419,6 +419,12 @@ fn apply_patches(proto_dir: &Path) { replacement, ) .expect("error patching cosmos.staking.v1beta1.rs"); + } + + for (pattern, replacement) in [ + ("stake_authorization::Validators::AllowList", "stake_authorization::Policy::AllowList"), + ("stake_authorization::Validators::DenyList", "stake_authorization::Policy::DenyList"), + ] { patch_file( &proto_dir.join("cosmos-sdk/cosmos.staking.v1beta1.serde.rs"), &Regex::new(pattern).unwrap(), From 5ebab1c7b986b71036a220de2e912beca43d3019 Mon Sep 17 00:00:00 2001 From: Ash Date: Mon, 3 Jun 2024 11:08:32 -0700 Subject: [PATCH 08/31] add more name definitions for authorizations --- cosmos-sdk-proto/src/type_names.rs | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/cosmos-sdk-proto/src/type_names.rs b/cosmos-sdk-proto/src/type_names.rs index e555f162..f7746d88 100644 --- a/cosmos-sdk-proto/src/type_names.rs +++ b/cosmos-sdk-proto/src/type_names.rs @@ -300,6 +300,11 @@ impl_name!( "cosmos.staking.v1beta1", "Validator" ); +impl_name!( + cosmos::staking::v1beta1::StakeAuthorization, + "cosmos.staking.v1beta1", + "StakeAuthorization" +); impl_name!( cosmos::base::abci::v1beta1::MsgData, @@ -333,6 +338,21 @@ impl_name!( "cosmos.authz.v1beta1", "MsgExec" ); +impl_name!( + cosmos::authz::v1beta1::GenericAuthorization, + "cosmos.authz.v1beta1", + "GenericAuthorization" +); +impl_name!( + cosmos::authz::v1beta1::GrantAuthorization, + "cosmos.authz.v1beta1", + "GrantAuthorization" +); +impl_name!( + cosmos::authz::v1beta1::Grant, + "cosmos.authz.v1beta1", + "Grant" +); impl_name!(cosmos::tx::v1beta1::Tx, "cosmos.tx.v1beta1", "Tx"); impl_name!( @@ -484,4 +504,19 @@ mod wasm { COSMWASM_PACKAGE, "MsgClearAdminResponse" ); + impl_name!( + cosmwasm::wasm::v1::ContractExecutionAuthorization, + COSMWASM_PACKAGE, + "ContractExecutionAuthorization" + ); + impl_name!( + cosmwasm::wasm::v1::StoreCodeAuthorization, + COSMWASM_PACKAGE, + "StoreCodeAuthorization" + ); + impl_name!( + cosmwasm::wasm::v1::ContractMigrationAuthorization, + COSMWASM_PACKAGE, + "ContractMigrationAuthorization" + ); } From 4b1332e6d8258ac845cef71589c8d362a669675a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 13 Jun 2024 16:33:41 +0200 Subject: [PATCH 09/31] cosmrs: basic parsing of `msg_responses` field inside `TxMsgData` (#472) --- cosmrs/.idea/workspace.xml | 66 +++++++++++++++++++++++++++++++++++++ cosmrs/src/abci.rs | 2 +- cosmrs/src/abci/msg_data.rs | 61 ++++++++++++++++++++++++++++++---- 3 files changed, 121 insertions(+), 8 deletions(-) create mode 100644 cosmrs/.idea/workspace.xml diff --git a/cosmrs/.idea/workspace.xml b/cosmrs/.idea/workspace.xml new file mode 100644 index 00000000..5f0fccb3 --- /dev/null +++ b/cosmrs/.idea/workspace.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + { + "associatedIndex": 7 +} + + + + { + "keyToString": { + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.rust.reset.selective.auto.import": "true", + "last_opened_file_path": "/Users/jedrzej/workspace/cosmos-rust-fork/cosmos-rust/cosmrs", + "node.js.detected.package.eslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true", + "org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "", + "org.rust.first.attach.projects": "true", + "settings.editor.selected.configurable": "language.rust.cargo.check" + } +} + + + + + + + + + 1718192228740 + + + + + + \ No newline at end of file diff --git a/cosmrs/src/abci.rs b/cosmrs/src/abci.rs index c26daa32..6fad5b75 100644 --- a/cosmrs/src/abci.rs +++ b/cosmrs/src/abci.rs @@ -5,7 +5,7 @@ mod msg_data; pub use self::{ gas_info::GasInfo, - msg_data::{MsgData, TxMsgData}, + msg_data::{MsgData, MsgResponse, TxMsgData}, }; /// Transaction data. diff --git a/cosmrs/src/abci/msg_data.rs b/cosmrs/src/abci/msg_data.rs index 22706546..17f4f1a2 100644 --- a/cosmrs/src/abci/msg_data.rs +++ b/cosmrs/src/abci/msg_data.rs @@ -1,13 +1,14 @@ use super::Data; use crate::{ - proto::{self, traits::Message}, + proto::{self, traits::Message, Any}, tx::Msg, ErrorReport, Result, }; use eyre::eyre; +use serde::{Deserialize, Serialize}; /// MsgData defines the data returned in a Result object during message execution. -#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)] pub struct MsgData { /// Incoming message type that emitted this result data, for example `"/cosmos.bank.v1beta1.MsgSend"`. pub msg_type: String, @@ -50,13 +51,52 @@ impl From for proto::cosmos::base::abci::v1beta1::MsgData { } } +/// The messages responses of the TxMsgData. Corresponds to `Any` +#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)] +pub struct MsgResponse { + /// Response message type that emitted this result data, for example `"/cosmwasm.wasm.v1.MsgExecuteContractResponse"`. + pub type_url: String, + + /// Binary data emitted by this response. + pub value: Vec, +} + +impl MsgResponse { + /// Attempts to decode the `data` field of this result into the specified `Msg` type. + pub fn try_decode_as(&self) -> Result { + M::Proto::decode(&*self.value)?.try_into() + } +} + +impl From for MsgResponse { + fn from(any: Any) -> Self { + MsgResponse { + type_url: any.type_url, + value: any.value, + } + } +} + +impl From for Any { + fn from(msg_response: MsgResponse) -> Self { + Any { + type_url: msg_response.type_url, + value: msg_response.value, + } + } +} + /// TxMsgData defines a list of MsgData. A transaction will have a MsgData object for each message. -#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)] pub struct TxMsgData { /// Data emitted by the messages in a particular transaction. // Note: this field will be deprecated and not populated as of cosmos-sdk 0.46. // It will be superseded by `msg_responses` field of type Vec pub data: Vec, + + /// This field contains the Msg handler responses packed into Anys. + // Note: this field is an empty vec for chains running cosmos-sdk < 0.46. + pub msg_responses: Vec, } impl TryFrom for TxMsgData { @@ -76,9 +116,11 @@ impl TryFrom for TxMsgData { #[allow(deprecated)] fn try_from(proto: proto::cosmos::base::abci::v1beta1::TxMsgData) -> Result { - // TODO(tarcieri): parse `msg_responses` - if !proto.msg_responses.is_empty() { - return Err(eyre!("TxMsgData::msg_responses unsupported")); + // this case should be impossible as with the switch in cosmos-sdk 0.46 only one of those should contain any data + if !proto.msg_responses.is_empty() && !proto.data.is_empty() { + return Err(eyre!( + "TxMsgData: both msg_responses and data fields are populated" + )); } Ok(TxMsgData { @@ -87,6 +129,7 @@ impl TryFrom for TxMsgData { .into_iter() .map(TryFrom::try_from) .collect::>()?, + msg_responses: proto.msg_responses.into_iter().map(Into::into).collect(), }) } } @@ -96,7 +139,11 @@ impl From for proto::cosmos::base::abci::v1beta1::TxMsgData { fn from(tx_msg_data: TxMsgData) -> Self { proto::cosmos::base::abci::v1beta1::TxMsgData { data: tx_msg_data.data.into_iter().map(Into::into).collect(), - msg_responses: vec![], // TODO(tarcieri): serialize responses + msg_responses: tx_msg_data + .msg_responses + .into_iter() + .map(Into::into) + .collect(), } } } From 17838ddeb77caac2f68b67285eb44bd4f799d8e4 Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Thu, 27 Jun 2024 14:52:33 -0600 Subject: [PATCH 10/31] cosmos-sdk-proto v0.22.0 (#473) --- Cargo.lock | 2 +- cosmos-sdk-proto/CHANGELOG.md | 6 ++++++ cosmos-sdk-proto/Cargo.toml | 2 +- cosmrs/Cargo.toml | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bcf3a095..dec89ff6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,7 +264,7 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cosmos-sdk-proto" -version = "0.22.0-pre" +version = "0.22.0" dependencies = [ "prost", "prost-types", diff --git a/cosmos-sdk-proto/CHANGELOG.md b/cosmos-sdk-proto/CHANGELOG.md index 4e6f84bf..49829cb2 100644 --- a/cosmos-sdk-proto/CHANGELOG.md +++ b/cosmos-sdk-proto/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.22.0 (2024-06-27) +### Changed +- Bump `tendermint-proto` dependency to v0.37 ([#469]) + +[#469]: https://github.com/cosmos/cosmos-rust/pull/469 + ## 0.21.1 (2024-03-15) ### Removed - Deprecated `MessageExt` methods: missed from v0.21.0, technically a breaking diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 621746f2..0c4d9e0e 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmos-sdk-proto" -version = "0.22.0-pre" +version = "0.22.0" authors = [ "Justin Kilpatrick ", "Greg Szabo ", diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index 6bbd103c..d90528d6 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" rust-version = "1.72" [dependencies] -cosmos-sdk-proto = { version = "=0.22.0-pre", default-features = false, path = "../cosmos-sdk-proto" } +cosmos-sdk-proto = { version = "0.22", default-features = false, path = "../cosmos-sdk-proto" } ecdsa = "0.16" eyre = "0.6" k256 = { version = "0.13", default-features = false, features = ["ecdsa", "sha256"] } From 64f4839196858c34127ec7402110ea56b0b5b2b2 Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Thu, 27 Jun 2024 16:36:45 -0600 Subject: [PATCH 11/31] cosmrs v0.17.0 (#474) --- Cargo.lock | 2 +- cosmrs/CHANGELOG.md | 15 +++++++++++++++ cosmrs/Cargo.toml | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dec89ff6..58b10aa7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,7 +274,7 @@ dependencies = [ [[package]] name = "cosmrs" -version = "0.17.0-pre" +version = "0.17.0" dependencies = [ "bip32", "cosmos-sdk-proto", diff --git a/cosmrs/CHANGELOG.md b/cosmrs/CHANGELOG.md index 30f75617..84a4d01d 100644 --- a/cosmrs/CHANGELOG.md +++ b/cosmrs/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.17.0 (2024-06-27) +### Added +- Basic parsing of `msg_responses` field inside `TxMsgData` ([#472]) + +### Changed +- Bump tendermint-rs dependencies to v0.37 ([#469]) +- Match upstream Cosmos SDK's Denom validation logic ([#468], [#470]) +- Bump `cosmos-sdk-proto` to v0.22 ([#473]) + +[#468]: https://github.com/cosmos/cosmos-rust/pull/468 +[#469]: https://github.com/cosmos/cosmos-rust/pull/469 +[#470]: https://github.com/cosmos/cosmos-rust/pull/470 +[#472]: https://github.com/cosmos/cosmos-rust/pull/472 +[#473]: https://github.com/cosmos/cosmos-rust/pull/473 + ## 0.16.0 (2024-03-15) ### Added - Support for uppercase Bech32 ([#444]) diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index d90528d6..0dbaca6d 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmrs" -version = "0.17.0-pre" +version = "0.17.0" authors = ["Tony Arcieri "] license = "Apache-2.0" repository = "https://github.com/cosmos/cosmos-rust/tree/main/cosmrs" From ae003db68e7b3579bea3a0d9f45f267a07e3ad70 Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Thu, 18 Jul 2024 14:49:39 -0600 Subject: [PATCH 12/31] Bump tendermint-rs dependencies to v0.38 (#476) This additionally bumps `prost` to v0.13 and `tonic` to v0.12 --- Cargo.lock | 431 ++++++++++++++++++------- cosmos-sdk-proto/Cargo.toml | 10 +- cosmrs/Cargo.toml | 8 +- cosmrs/src/feegrant/basic_allowance.rs | 6 +- proto-build/Cargo.toml | 8 +- 5 files changed, 328 insertions(+), 135 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58b10aa7..199f361b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,6 +65,12 @@ dependencies = [ "syn", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.1.0" @@ -73,18 +79,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "itoa", "matchit", "memchr", @@ -93,7 +98,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", + "sync_wrapper 1.0.1", "tower", "tower-layer", "tower-service", @@ -101,17 +106,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] @@ -143,6 +151,12 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64ct" version = "1.6.0" @@ -264,17 +278,17 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cosmos-sdk-proto" -version = "0.22.0" +version = "0.23.0-pre" dependencies = [ - "prost", - "prost-types", + "prost 0.13.1", + "prost-types 0.13.1", "tendermint-proto", "tonic", ] [[package]] name = "cosmrs" -version = "0.17.0" +version = "0.18.0-pre" dependencies = [ "bip32", "cosmos-sdk-proto", @@ -459,7 +473,7 @@ checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -655,7 +669,26 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.9", + "indexmap 2.0.2", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", "indexmap 2.0.2", "slab", "tokio", @@ -709,19 +742,21 @@ dependencies = [ ] [[package]] -name = "home" -version = "0.5.5" +name = "http" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "windows-sys", + "bytes", + "fnv", + "itoa", ] [[package]] name = "http" -version = "0.2.9" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -735,7 +770,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.9", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -761,9 +819,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.24", + "http 0.2.9", + "http-body 0.4.5", "httparse", "httpdate", "itoa", @@ -775,6 +833,27 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.1" @@ -782,8 +861,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.9", + "hyper 0.14.27", "rustls", "tokio", "tokio-rustls", @@ -791,14 +870,35 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper", + "hyper 1.4.1", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -881,9 +981,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.148" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "linux-raw-sys" @@ -926,13 +1026,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1110,14 +1210,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.3", +] + +[[package]] +name = "prost" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +dependencies = [ + "bytes", + "prost-derive 0.13.1", ] [[package]] name = "prost-build" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" dependencies = [ "bytes", "heck", @@ -1127,12 +1237,11 @@ dependencies = [ "once_cell", "petgraph", "prettyplease", - "prost", - "prost-types", + "prost 0.13.1", + "prost-types 0.13.1", "regex", "syn", "tempfile", - "which", ] [[package]] @@ -1148,20 +1257,42 @@ dependencies = [ "syn", ] +[[package]] +name = "prost-derive" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "prost-types" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" dependencies = [ - "prost", + "prost 0.12.3", +] + +[[package]] +name = "prost-types" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" +dependencies = [ + "prost 0.13.1", ] [[package]] name = "proto-build" version = "0.1.0" dependencies = [ - "prost", + "prost 0.13.1", "prost-build", "regex", "tonic", @@ -1252,15 +1383,15 @@ version = "0.11.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78fdbab6a7e1d7b13cc8ff10197f47986b41c639300cc3c8158cac7847c9bbef" dependencies = [ - "base64", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.24", + "http 0.2.9", + "http-body 0.4.5", + "hyper 0.14.27", "hyper-rustls", "ipnet", "js-sys", @@ -1336,7 +1467,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1369,7 +1500,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64", + "base64 0.21.4", ] [[package]] @@ -1409,7 +1540,7 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1580,6 +1711,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + [[package]] name = "socket2" version = "0.4.9" @@ -1592,12 +1729,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1654,6 +1791,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "system-configuration" version = "0.5.1" @@ -1685,14 +1828,14 @@ dependencies = [ "fastrand", "redox_syscall", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tendermint" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "954496fbc9716eb4446cdd6d00c071a3e2f22578d62aa03b40c7e5b4fda3ed42" +checksum = "e662ae0a3a5fa3c8f4347e5635b63066bdd9db591e9e17169d99e8ae77eb80cf" dependencies = [ "bytes", "digest 0.10.7", @@ -1703,8 +1846,8 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost", - "prost-types", + "prost 0.12.3", + "prost-types 0.12.3", "ripemd", "serde", "serde_bytes", @@ -1721,9 +1864,9 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84b11b57d20ee4492a1452faff85f5c520adc36ca9fe5e701066935255bb89f" +checksum = "6830b90f6eca3eca86a3dc40da863b3855b417d1a92d54befe6f2ff4e4572b41" dependencies = [ "flex-error", "serde", @@ -1735,14 +1878,14 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc87024548c7f3da479885201e3da20ef29e85a3b13d04606b380ac4c7120d87" +checksum = "0d4fb3c04c9ceff97b4f4a96351bf6ec20a3656eff9df2ad908f63da6c67e7da" dependencies = [ "bytes", "flex-error", - "prost", - "prost-types", + "prost 0.13.1", + "prost-types 0.13.1", "serde", "serde_bytes", "subtle-encoding", @@ -1751,9 +1894,9 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdc2281e271277fda184d96d874a6fe59f569b130b634289257baacfc95aa85" +checksum = "6b9900ff9d51d7d6cd0855bf92944e4e8980eb6da028efd4d46259b928acd7f8" dependencies = [ "async-trait", "bytes", @@ -1846,9 +1989,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", @@ -1856,26 +1999,16 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.4", + "socket2 0.5.7", "tokio-macros", - "windows-sys", -] - -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", @@ -1953,23 +2086,26 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401" dependencies = [ "async-stream", "async-trait", "axum", - "base64", + "base64 0.22.1", "bytes", - "h2", - "http", - "http-body", - "hyper", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", - "prost", + "prost 0.13.1", + "socket2 0.5.7", "tokio", "tokio-stream", "tower", @@ -1980,9 +2116,9 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "568392c5a2bd0020723e3f387891176aabafe36fd9fcd074ad309dfa0c8eb964" dependencies = [ "prettyplease", "proc-macro2", @@ -2218,18 +2354,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" @@ -2267,7 +2391,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -2276,13 +2409,29 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2291,42 +2440,90 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winnow" version = "0.6.5" @@ -2343,7 +2540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 0c4d9e0e..2c66ba03 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmos-sdk-proto" -version = "0.22.0" +version = "0.23.0-pre" authors = [ "Justin Kilpatrick ", "Greg Szabo ", @@ -16,12 +16,12 @@ edition = "2021" rust-version = "1.72" [dependencies] -prost = "0.12.3" -prost-types = "0.12" -tendermint-proto = "0.37" +prost = "0.13" +prost-types = "0.13" +tendermint-proto = "0.38" # Optional dependencies -tonic = { version = "0.11", optional = true, default-features = false, features = ["codegen", "prost"] } +tonic = { version = "0.12", optional = true, default-features = false, features = ["codegen", "prost"] } [features] default = ["grpc-transport"] diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index 0dbaca6d..01b6bf5a 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmrs" -version = "0.17.0" +version = "0.18.0-pre" authors = ["Tony Arcieri "] license = "Apache-2.0" repository = "https://github.com/cosmos/cosmos-rust/tree/main/cosmrs" @@ -12,7 +12,7 @@ edition = "2021" rust-version = "1.72" [dependencies] -cosmos-sdk-proto = { version = "0.22", default-features = false, path = "../cosmos-sdk-proto" } +cosmos-sdk-proto = { version = "=0.23.0-pre", default-features = false, path = "../cosmos-sdk-proto" } ecdsa = "0.16" eyre = "0.6" k256 = { version = "0.13", default-features = false, features = ["ecdsa", "sha256"] } @@ -21,12 +21,12 @@ serde = { version = "1", features = ["serde_derive"] } serde_json = "1" signature = { version = "2", features = ["std"] } subtle-encoding = { version = "0.5", features = ["bech32-preview"] } -tendermint = { version = "0.37", features = ["secp256k1"] } +tendermint = { version = "0.38", features = ["secp256k1"] } thiserror = "1" # optional dependencies bip32 = { version = "0.5", optional = true, default-features = false, features = ["alloc", "secp256k1"] } -tendermint-rpc = { version = "0.37", optional = true, features = ["http-client"] } +tendermint-rpc = { version = "0.38", optional = true, features = ["http-client"] } tokio = { version = "1", optional = true } [dev-dependencies] diff --git a/cosmrs/src/feegrant/basic_allowance.rs b/cosmrs/src/feegrant/basic_allowance.rs index 30cf5f9c..00b9c108 100644 --- a/cosmrs/src/feegrant/basic_allowance.rs +++ b/cosmrs/src/feegrant/basic_allowance.rs @@ -38,11 +38,7 @@ impl TryFrom<&proto::cosmos::feegrant::v1beta1::BasicAllowance> for BasicAllowan .iter() .map(TryFrom::try_from) .collect::>()?, - expiration: proto - .expiration - .clone() - .map(TryFrom::try_from) - .transpose()?, + expiration: proto.expiration.map(TryFrom::try_from).transpose()?, }) } } diff --git a/proto-build/Cargo.toml b/proto-build/Cargo.toml index a043287b..79013376 100644 --- a/proto-build/Cargo.toml +++ b/proto-build/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" publish = false [dependencies] -prost = "0.12" -prost-build = "0.12.3" -tonic = "0.11" -tonic-build = "0.11" +prost = "0.13" +prost-build = "0.13" +tonic = "0.12" +tonic-build = "0.12" regex = "1" walkdir = "2" From c5db4e5ad6a6ad2b5879cb88976f8a2d3e868902 Mon Sep 17 00:00:00 2001 From: Jeeyong Um Date: Thu, 1 Aug 2024 03:46:04 +0900 Subject: [PATCH 13/31] cosmos-sdk-proto: add support for `no_std` (#478) --- cosmos-sdk-proto/Cargo.toml | 7 ++++--- cosmos-sdk-proto/src/lib.rs | 3 +++ cosmos-sdk-proto/src/traits.rs | 3 ++- cosmrs/Cargo.toml | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 2c66ba03..329e404d 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -16,8 +16,8 @@ edition = "2021" rust-version = "1.72" [dependencies] -prost = "0.13" -prost-types = "0.13" +prost = { version = "0.13", default-features = false } +prost-types = { version = "0.13", default-features = false } tendermint-proto = "0.38" # Optional dependencies @@ -25,7 +25,8 @@ tonic = { version = "0.12", optional = true, default-features = false, features [features] default = ["grpc-transport"] -grpc = ["tonic"] +std = ["prost/std", "prost-types/std"] +grpc = ["std", "tonic"] grpc-transport = ["grpc", "tonic/transport"] cosmwasm = [] diff --git a/cosmos-sdk-proto/src/lib.rs b/cosmos-sdk-proto/src/lib.rs index 53246eaa..f866a5ff 100644 --- a/cosmos-sdk-proto/src/lib.rs +++ b/cosmos-sdk-proto/src/lib.rs @@ -10,6 +10,9 @@ )] #![forbid(unsafe_code)] #![warn(trivial_casts, trivial_numeric_casts, unused_import_braces)] +#![cfg_attr(not(feature = "std"), no_std)] + +extern crate alloc; pub mod traits; mod type_names; diff --git a/cosmos-sdk-proto/src/traits.rs b/cosmos-sdk-proto/src/traits.rs index 1484fa50..a9ac8722 100644 --- a/cosmos-sdk-proto/src/traits.rs +++ b/cosmos-sdk-proto/src/traits.rs @@ -2,8 +2,9 @@ pub use prost::{Message, Name}; +use alloc::{string::String, vec::Vec}; +use core::str::FromStr; use prost::EncodeError; -use std::str::FromStr; /// Extension trait for [`Message`]. pub trait MessageExt: Message { diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index 01b6bf5a..081b2dd3 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" rust-version = "1.72" [dependencies] -cosmos-sdk-proto = { version = "=0.23.0-pre", default-features = false, path = "../cosmos-sdk-proto" } +cosmos-sdk-proto = { version = "=0.23.0-pre", default-features = false, features = ["std"], path = "../cosmos-sdk-proto" } ecdsa = "0.16" eyre = "0.6" k256 = { version = "0.13", default-features = false, features = ["ecdsa", "sha256"] } From 871e5140db18e98386f5c34d0d63fb76fc4f372b Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Wed, 31 Jul 2024 19:46:01 -0600 Subject: [PATCH 14/31] cosmrs: support coins with amount `0`, empty denom (#479) These can be used when the gas fee is zero, for example Fixes #477 --- cosmrs/src/base/coin.rs | 26 +++++++++++++++++++++----- cosmrs/src/base/denom.rs | 2 +- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/cosmrs/src/base/coin.rs b/cosmrs/src/base/coin.rs index fe6e6e52..a524e0fb 100644 --- a/cosmrs/src/base/coin.rs +++ b/cosmrs/src/base/coin.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; use std::fmt; /// Coin defines a token with a denomination and an amount. -#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)] pub struct Coin { /// Denomination pub denom: Denom, @@ -35,10 +35,15 @@ impl TryFrom<&proto::cosmos::base::v1beta1::Coin> for Coin { type Error = ErrorReport; fn try_from(proto: &proto::cosmos::base::v1beta1::Coin) -> Result { - Ok(Coin { - denom: proto.denom.parse()?, - amount: proto.amount.parse()?, - }) + // Support an empty denom when the amount is `0`. See cosmos/cosmos-rust#477 + if proto.denom.is_empty() && proto.amount == "0" { + Ok(Coin::default()) + } else { + Ok(Coin { + denom: proto.denom.parse()?, + amount: proto.amount.parse()?, + }) + } } } @@ -67,9 +72,20 @@ impl fmt::Display for Coin { #[cfg(test)] mod tests { use super::Coin; + use crate::proto; #[test] fn new() { Coin::new(1000, "uatom").unwrap(); } + + #[test] + fn zero_value_coin_with_empty_denom() { + let zero_proto = proto::cosmos::base::v1beta1::Coin::from(Coin::default()); + assert_eq!(&zero_proto.denom, ""); + assert_eq!(&zero_proto.amount, "0"); + + let zero_coin = Coin::try_from(zero_proto).unwrap(); + assert_eq!(zero_coin, Coin::default()) + } } diff --git a/cosmrs/src/base/denom.rs b/cosmrs/src/base/denom.rs index a5c13dc5..d432da2b 100644 --- a/cosmrs/src/base/denom.rs +++ b/cosmrs/src/base/denom.rs @@ -3,7 +3,7 @@ use serde::{de, de::Error as _, ser, Deserialize, Serialize}; use std::{fmt, str::FromStr}; /// Denomination. -#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Ord)] pub struct Denom(String); impl Denom { From d94d08b7894613153be3731c663d080998e03c75 Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Fri, 2 Aug 2024 19:49:33 -0600 Subject: [PATCH 15/31] cosmos-sdk-proto v0.23.0 (#480) --- Cargo.lock | 2 +- cosmos-sdk-proto/CHANGELOG.md | 10 ++++++++++ cosmos-sdk-proto/Cargo.toml | 2 +- cosmrs/Cargo.toml | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 199f361b..382ed81e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,7 +278,7 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cosmos-sdk-proto" -version = "0.23.0-pre" +version = "0.23.0" dependencies = [ "prost 0.13.1", "prost-types 0.13.1", diff --git a/cosmos-sdk-proto/CHANGELOG.md b/cosmos-sdk-proto/CHANGELOG.md index 49829cb2..0b48588d 100644 --- a/cosmos-sdk-proto/CHANGELOG.md +++ b/cosmos-sdk-proto/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.23.0 (2024-08-02) +### Added +- Support for `no_std` ([#478]) + +### Changed +- Bump `tendermint-proto` dependency to v0.38 ([#476]) + +[#476]: https://github.com/cosmos/cosmos-rust/pull/476 +[#478]: https://github.com/cosmos/cosmos-rust/pull/478 + ## 0.22.0 (2024-06-27) ### Changed - Bump `tendermint-proto` dependency to v0.37 ([#469]) diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 329e404d..ff22a7e9 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmos-sdk-proto" -version = "0.23.0-pre" +version = "0.23.0" authors = [ "Justin Kilpatrick ", "Greg Szabo ", diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index 081b2dd3..bafcd9fd 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" rust-version = "1.72" [dependencies] -cosmos-sdk-proto = { version = "=0.23.0-pre", default-features = false, features = ["std"], path = "../cosmos-sdk-proto" } +cosmos-sdk-proto = { version = "0.23", default-features = false, features = ["std"], path = "../cosmos-sdk-proto" } ecdsa = "0.16" eyre = "0.6" k256 = { version = "0.13", default-features = false, features = ["ecdsa", "sha256"] } From eba698bc9c1cabc195a8d8c01d99a75bcbe0236b Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Fri, 2 Aug 2024 20:17:18 -0600 Subject: [PATCH 16/31] cosmrs v0.18.0 (#481) --- Cargo.lock | 2 +- cosmrs/CHANGELOG.md | 15 ++++++++++++++- cosmrs/Cargo.toml | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 382ed81e..fb506614 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -288,7 +288,7 @@ dependencies = [ [[package]] name = "cosmrs" -version = "0.18.0-pre" +version = "0.18.0" dependencies = [ "bip32", "cosmos-sdk-proto", diff --git a/cosmrs/CHANGELOG.md b/cosmrs/CHANGELOG.md index 84a4d01d..ac03efd2 100644 --- a/cosmrs/CHANGELOG.md +++ b/cosmrs/CHANGELOG.md @@ -4,13 +4,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.18.0 (2024-08-02) +### Added +- Support `Coin` with amount `0` and empty denom ([#479]) +- Impl `Default` for `Coin` and `Denom` ([#479]) + +### Changed +- Bump tendermint-rs dependencies to v0.38 ([#476]) +- Bump `cosmos-sdk-proto` to 0.23 ([#480]) + +[#476]: https://github.com/cosmos/cosmos-rust/pull/476 +[#479]: https://github.com/cosmos/cosmos-rust/pull/479 +[#480]: https://github.com/cosmos/cosmos-rust/pull/480 + ## 0.17.0 (2024-06-27) ### Added - Basic parsing of `msg_responses` field inside `TxMsgData` ([#472]) ### Changed - Bump tendermint-rs dependencies to v0.37 ([#469]) -- Match upstream Cosmos SDK's Denom validation logic ([#468], [#470]) +- Match upstream Cosmos SDK's `Denom` validation logic ([#468], [#470]) - Bump `cosmos-sdk-proto` to v0.22 ([#473]) [#468]: https://github.com/cosmos/cosmos-rust/pull/468 diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index bafcd9fd..7939f2ce 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmrs" -version = "0.18.0-pre" +version = "0.18.0" authors = ["Tony Arcieri "] license = "Apache-2.0" repository = "https://github.com/cosmos/cosmos-rust/tree/main/cosmrs" From 9e1b3d6179fc514e52fc76788c8169770d7c1321 Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Thu, 8 Aug 2024 13:39:08 -0600 Subject: [PATCH 17/31] Bump tendermint-rs dependencies to v0.39 (#482) Also regenerates protos. This notably switches from sourcing the `google.protobuf` well-known types from the `prost-types` crate and using `tendermint-proto`'s definitions instead. --- Cargo.lock | 76 ++--- Cargo.toml | 3 + cosmos-sdk-proto/Cargo.toml | 7 +- cosmos-sdk-proto/src/lib.rs | 2 +- .../cosmos-sdk/cosmos.app.module.v1alpha1.rs | 1 + .../prost/cosmos-sdk/cosmos.app.v1alpha1.rs | 9 +- .../prost/cosmos-sdk/cosmos.auth.v1beta1.rs | 34 +- .../prost/cosmos-sdk/cosmos.authz.v1beta1.rs | 29 +- .../prost/cosmos-sdk/cosmos.bank.v1beta1.rs | 33 ++ .../cosmos-sdk/cosmos.base.abci.v1beta1.rs | 16 +- .../cosmos-sdk/cosmos.base.kv.v1beta1.rs | 2 + .../cosmos-sdk/cosmos.base.node.v1beta1.rs | 2 + .../cosmos-sdk/cosmos.base.query.v1beta1.rs | 2 + .../cosmos.base.reflection.v1beta1.rs | 4 + .../cosmos.base.reflection.v2alpha1.rs | 26 ++ .../cosmos.base.snapshots.v1beta1.rs | 10 + .../cosmos-sdk/cosmos.base.store.v1beta1.rs | 6 + .../cosmos.base.tendermint.v1beta1.rs | 25 +- .../prost/cosmos-sdk/cosmos.base.v1beta1.rs | 4 + .../cosmos-sdk/cosmos.capability.v1beta1.rs | 5 + .../prost/cosmos-sdk/cosmos.crisis.v1beta1.rs | 3 + .../prost/cosmos-sdk/cosmos.crypto.ed25519.rs | 2 + .../prost/cosmos-sdk/cosmos.crypto.hd.v1.rs | 1 + .../cosmos-sdk/cosmos.crypto.keyring.v1.rs | 10 +- .../cosmos-sdk/cosmos.crypto.multisig.rs | 3 +- .../cosmos.crypto.multisig.v1beta1.rs | 2 + .../cosmos-sdk/cosmos.crypto.secp256k1.rs | 2 + .../cosmos-sdk/cosmos.crypto.secp256r1.rs | 2 + .../cosmos-sdk/cosmos.distribution.v1beta1.rs | 46 +++ .../cosmos-sdk/cosmos.evidence.v1beta1.rs | 18 +- .../cosmos-sdk/cosmos.feegrant.v1beta1.rs | 27 +- .../cosmos-sdk/cosmos.genutil.v1beta1.rs | 1 + .../src/prost/cosmos-sdk/cosmos.gov.v1.rs | 76 ++++- .../prost/cosmos-sdk/cosmos.gov.v1beta1.rs | 73 ++++- .../src/prost/cosmos-sdk/cosmos.group.v1.rs | 150 ++++++++- .../prost/cosmos-sdk/cosmos.mint.v1beta1.rs | 9 + .../prost/cosmos-sdk/cosmos.nft.v1beta1.rs | 27 +- .../cosmos-sdk/cosmos.orm.module.v1alpha1.rs | 1 + .../src/prost/cosmos-sdk/cosmos.orm.v1.rs | 4 + .../prost/cosmos-sdk/cosmos.orm.v1alpha1.rs | 13 + .../prost/cosmos-sdk/cosmos.params.v1beta1.rs | 7 + .../cosmos-sdk/cosmos.slashing.v1beta1.rs | 19 +- .../cosmos-sdk/cosmos.staking.v1beta1.rs | 103 ++++++- .../cosmos-sdk/cosmos.tx.signing.v1beta1.rs | 20 +- .../src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs | 54 +++- .../cosmos-sdk/cosmos.upgrade.v1beta1.rs | 22 +- .../cosmos-sdk/cosmos.vesting.v1beta1.rs | 12 + .../src/prost/cosmos-sdk/cosmos_proto.rs | 11 + .../src/prost/ibc-go/cosmos.auth.v1beta1.rs | 20 +- .../prost/ibc-go/cosmos.base.query.v1beta1.rs | 11 +- .../src/prost/ibc-go/cosmos.base.v1beta1.rs | 21 +- .../prost/ibc-go/cosmos.upgrade.v1beta1.rs | 18 +- ...tions.interchain_accounts.controller.v1.rs | 31 +- ...pplications.interchain_accounts.host.v1.rs | 27 +- ...ibc.applications.interchain_accounts.v1.rs | 48 ++- .../ibc-go/ibc.applications.transfer.v1.rs | 74 ++++- .../ibc-go/ibc.applications.transfer.v2.rs | 6 +- .../src/prost/ibc-go/ibc.core.channel.v1.rs | 291 ++++++++++++++---- .../src/prost/ibc-go/ibc.core.client.v1.rs | 213 +++++++++---- .../prost/ibc-go/ibc.core.commitment.v1.rs | 21 +- .../prost/ibc-go/ibc.core.connection.v1.rs | 147 +++++++-- .../src/prost/ibc-go/ibc.core.types.v1.rs | 6 +- .../ibc-go/ibc.lightclients.localhost.v1.rs | 6 +- .../ibc-go/ibc.lightclients.solomachine.v1.rs | 91 ++++-- .../ibc-go/ibc.lightclients.solomachine.v2.rs | 91 ++++-- .../ibc-go/ibc.lightclients.tendermint.v1.rs | 36 ++- cosmos-sdk-proto/src/prost/ibc-go/ics23.rs | 66 +++- .../prost/wasmd/cosmos.base.query.v1beta1.rs | 2 + .../src/prost/wasmd/cosmos.base.v1beta1.rs | 4 + .../src/prost/wasmd/cosmos_proto.rs | 11 + .../src/prost/wasmd/cosmwasm.wasm.v1.rs | 85 ++++- cosmrs/Cargo.toml | 8 +- proto-build/buf.sdk.gen.yaml | 4 +- proto-build/buf.wasmd.gen.yaml | 4 +- proto-build/src/main.rs | 4 + 75 files changed, 1914 insertions(+), 446 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb506614..20f8cf17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,17 +278,16 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cosmos-sdk-proto" -version = "0.23.0" +version = "0.24.0-pre" dependencies = [ - "prost 0.13.1", - "prost-types 0.13.1", + "prost", "tendermint-proto", "tonic", ] [[package]] name = "cosmrs" -version = "0.18.0" +version = "0.19.0-pre" dependencies = [ "bip32", "cosmos-sdk-proto", @@ -1203,16 +1202,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" -dependencies = [ - "bytes", - "prost-derive 0.12.3", -] - [[package]] name = "prost" version = "0.13.1" @@ -1220,7 +1209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" dependencies = [ "bytes", - "prost-derive 0.13.1", + "prost-derive", ] [[package]] @@ -1237,26 +1226,13 @@ dependencies = [ "once_cell", "petgraph", "prettyplease", - "prost 0.13.1", - "prost-types 0.13.1", + "prost", + "prost-types", "regex", "syn", "tempfile", ] -[[package]] -name = "prost-derive" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "prost-derive" version = "0.13.1" @@ -1270,29 +1246,20 @@ dependencies = [ "syn", ] -[[package]] -name = "prost-types" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" -dependencies = [ - "prost 0.12.3", -] - [[package]] name = "prost-types" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" dependencies = [ - "prost 0.13.1", + "prost", ] [[package]] name = "proto-build" version = "0.1.0" dependencies = [ - "prost 0.13.1", + "prost", "prost-build", "regex", "tonic", @@ -1833,9 +1800,9 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e662ae0a3a5fa3c8f4347e5635b63066bdd9db591e9e17169d99e8ae77eb80cf" +checksum = "5a80791cbd52540b05798837bf2d07cb53bd7b59eaffc2e5181196361926daec" dependencies = [ "bytes", "digest 0.10.7", @@ -1846,8 +1813,8 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost 0.12.3", - "prost-types 0.12.3", + "prost", + "prost-types", "ripemd", "serde", "serde_bytes", @@ -1864,9 +1831,9 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6830b90f6eca3eca86a3dc40da863b3855b417d1a92d54befe6f2ff4e4572b41" +checksum = "7a61aff4a3fc93807f5a38d10c3abbf26f3260eda376360307ccad30c34ce4d7" dependencies = [ "flex-error", "serde", @@ -1878,14 +1845,13 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4fb3c04c9ceff97b4f4a96351bf6ec20a3656eff9df2ad908f63da6c67e7da" +version = "0.39.0" +source = "git+https://github.com/informalsystems/tendermint-rs#f1ebab84321de74d7770672d54f4bdf28a9ac65c" dependencies = [ "bytes", "flex-error", - "prost 0.13.1", - "prost-types 0.13.1", + "prost", + "prost-types", "serde", "serde_bytes", "subtle-encoding", @@ -1894,9 +1860,9 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9900ff9d51d7d6cd0855bf92944e4e8980eb6da028efd4d46259b928acd7f8" +checksum = "fc330a25442d7f6b64e94029de18f4cf4f1e408aa129ef07eca9a5afd33cbb2f" dependencies = [ "async-trait", "bytes", @@ -2104,7 +2070,7 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost 0.13.1", + "prost", "socket2 0.5.7", "tokio", "tokio-stream", diff --git a/Cargo.toml b/Cargo.toml index 8f6cd616..7a19b098 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,3 +5,6 @@ members = [ "cosmos-sdk-proto", "cosmrs" ] + +[patch.crates-io] +tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs" } diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index ff22a7e9..40a51377 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmos-sdk-proto" -version = "0.23.0" +version = "0.24.0-pre" authors = [ "Justin Kilpatrick ", "Greg Szabo ", @@ -17,15 +17,14 @@ rust-version = "1.72" [dependencies] prost = { version = "0.13", default-features = false } -prost-types = { version = "0.13", default-features = false } -tendermint-proto = "0.38" +tendermint-proto = "0.39" # Optional dependencies tonic = { version = "0.12", optional = true, default-features = false, features = ["codegen", "prost"] } [features] default = ["grpc-transport"] -std = ["prost/std", "prost-types/std"] +std = ["prost/std", "tendermint-proto/std"] grpc = ["std", "tonic"] grpc-transport = ["grpc", "tonic/transport"] cosmwasm = [] diff --git a/cosmos-sdk-proto/src/lib.rs b/cosmos-sdk-proto/src/lib.rs index f866a5ff..8b7ad2e7 100644 --- a/cosmos-sdk-proto/src/lib.rs +++ b/cosmos-sdk-proto/src/lib.rs @@ -18,8 +18,8 @@ pub mod traits; mod type_names; pub use prost; -pub use prost_types::{Any, Timestamp}; pub use tendermint_proto as tendermint; +pub use tendermint_proto::google::protobuf::{Any, Timestamp}; /// The version (commit hash) of the Cosmos SDK used when generating this library. pub const COSMOS_SDK_VERSION: &str = include_str!("prost/cosmos-sdk/COSMOS_SDK_COMMIT"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs index c37f344f..a8ae8fd3 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.rs @@ -1,5 +1,6 @@ // @generated /// Module is the module config object for the cosmos.app v1 app module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module {} // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs index e857bec1..b23fe176 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs @@ -1,5 +1,6 @@ // @generated /// ModuleDescriptor describes an app module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleDescriptor { /// go_import names the package that should be imported by an app to load the @@ -24,6 +25,7 @@ pub struct ModuleDescriptor { pub can_migrate_from: ::prost::alloc::vec::Vec, } /// PackageReference is a reference to a protobuf package used by a module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PackageReference { /// name is the fully-qualified name of the package. @@ -69,6 +71,7 @@ pub struct PackageReference { } /// MigrateFromInfo is information on a module version that a newer module /// can migrate from. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateFromInfo { /// module is the fully-qualified protobuf name of the module config object @@ -83,6 +86,7 @@ pub struct MigrateFromInfo { /// allow a mixture of declarative and imperative app wiring, however, apps /// that strive for the maximum ease of maintainability should be able to describe /// their state machine with a config object alone. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Config { /// modules are the module configurations for the app. @@ -90,6 +94,7 @@ pub struct Config { pub modules: ::prost::alloc::vec::Vec, } /// ModuleConfig is a module configuration for an app. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleConfig { /// name is the unique name of the module within the app. It should be a name @@ -107,12 +112,14 @@ pub struct ModuleConfig { /// config is the config object for the module. Module config messages should /// define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. #[prost(message, optional, tag = "2")] - pub config: ::core::option::Option<::prost_types::Any>, + pub config: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// QueryConfigRequest is the Query/Config request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryConfigRequest {} /// QueryConfigRequest is the Query/Config response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryConfigResponse { /// config is the current app config. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs index e14153ef..47429f32 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs @@ -2,18 +2,20 @@ /// BaseAccount defines a base account type. It contains all the necessary fields /// for basic account functionality. Any custom account type should extend this /// type for additional functionality (e.g. vesting). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BaseAccount { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::prost_types::Any>, + pub pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(uint64, tag = "3")] pub account_number: u64, #[prost(uint64, tag = "4")] pub sequence: u64, } /// ModuleAccount defines an account for modules that holds coins on a pool. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleAccount { #[prost(message, optional, tag = "1")] @@ -24,6 +26,7 @@ pub struct ModuleAccount { pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Params defines the parameters for the auth module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(uint64, tag = "1")] @@ -38,6 +41,7 @@ pub struct Params { pub sig_verify_cost_secp256k1: u64, } /// GenesisState defines the auth module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of the module. @@ -45,11 +49,12 @@ pub struct GenesisState { pub params: ::core::option::Option, /// accounts are the accounts present at genesis. #[prost(message, repeated, tag = "2")] - pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// QueryAccountsRequest is the request type for the Query/Accounts RPC method. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountsRequest { /// pagination defines an optional pagination for the request. @@ -59,16 +64,18 @@ pub struct QueryAccountsRequest { /// QueryAccountsResponse is the response type for the Query/Accounts RPC method. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountsResponse { /// accounts are the existing accounts #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// QueryAccountRequest is the request type for the Query/Account RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountRequest { /// address defines the address to query for. @@ -76,16 +83,19 @@ pub struct QueryAccountRequest { pub address: ::prost::alloc::string::String, } /// QueryAccountResponse is the response type for the Query/Account RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountResponse { /// account defines the account of the corresponding address. #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option<::prost_types::Any>, + pub account: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. @@ -95,36 +105,42 @@ pub struct QueryParamsResponse { /// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountsRequest {} /// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountsResponse { #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountByNameRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } /// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountByNameResponse { #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option<::prost_types::Any>, + pub account: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Bech32PrefixRequest {} /// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Bech32PrefixResponse { #[prost(string, tag = "1")] @@ -133,6 +149,7 @@ pub struct Bech32PrefixResponse { /// AddressBytesToStringRequest is the request type for AddressString rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddressBytesToStringRequest { #[prost(bytes = "vec", tag = "1")] @@ -141,6 +158,7 @@ pub struct AddressBytesToStringRequest { /// AddressBytesToStringResponse is the response type for AddressString rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddressBytesToStringResponse { #[prost(string, tag = "1")] @@ -149,6 +167,7 @@ pub struct AddressBytesToStringResponse { /// AddressStringToBytesRequest is the request type for AccountBytes rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddressStringToBytesRequest { #[prost(string, tag = "1")] @@ -157,6 +176,7 @@ pub struct AddressStringToBytesRequest { /// AddressStringToBytesResponse is the response type for AddressBytes rpc method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddressStringToBytesResponse { #[prost(bytes = "vec", tag = "1")] @@ -165,6 +185,7 @@ pub struct AddressStringToBytesResponse { /// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method /// /// Since: cosmos-sdk 0.46.2 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountAddressByIdRequest { /// id is the account number of the address to be queried. This field @@ -176,6 +197,7 @@ pub struct QueryAccountAddressByIdRequest { /// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method /// /// Since: cosmos-sdk 0.46.2 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAccountAddressByIdResponse { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs index 8d38d9f9..2dc300b6 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// GenericAuthorization gives the grantee unrestricted permissions to execute /// the provided method on behalf of the granter's account. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenericAuthorization { /// Msg, identified by it's type URL, to grant unrestricted permissions to execute @@ -9,18 +10,20 @@ pub struct GenericAuthorization { } /// Grant gives permissions to execute /// the provide method with expiration time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Grant { #[prost(message, optional, tag = "1")] - pub authorization: ::core::option::Option<::prost_types::Any>, + pub authorization: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// time when the grant will expire and will be pruned. If null, then the grant /// doesn't have a time expiration (other conditions in `authorization` /// may apply to invalidate the grant) #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, + pub expiration: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// GrantAuthorization extends a grant with both the addresses of the grantee and granter. /// It is used in genesis.proto and query.proto +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GrantAuthorization { #[prost(string, tag = "1")] @@ -28,11 +31,12 @@ pub struct GrantAuthorization { #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] - pub authorization: ::core::option::Option<::prost_types::Any>, + pub authorization: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, optional, tag = "4")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, + pub expiration: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// GrantQueueItem contains the list of TypeURL of a sdk.Msg. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GrantQueueItem { /// msg_type_urls contains the list of TypeURL of a sdk.Msg. @@ -40,6 +44,7 @@ pub struct GrantQueueItem { pub msg_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// EventGrant is emitted on Msg/Grant +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventGrant { /// Msg type URL for which an autorization is granted @@ -53,6 +58,7 @@ pub struct EventGrant { pub grantee: ::prost::alloc::string::String, } /// EventRevoke is emitted on Msg/Revoke +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventRevoke { /// Msg type URL for which an autorization is revoked @@ -66,12 +72,14 @@ pub struct EventRevoke { pub grantee: ::prost::alloc::string::String, } /// GenesisState defines the authz module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, repeated, tag = "1")] pub authorization: ::prost::alloc::vec::Vec, } /// QueryGrantsRequest is the request type for the Query/Grants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGrantsRequest { #[prost(string, tag = "1")] @@ -86,6 +94,7 @@ pub struct QueryGrantsRequest { pub pagination: ::core::option::Option, } /// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGrantsResponse { /// authorizations is a list of grants granted for grantee by granter. @@ -96,6 +105,7 @@ pub struct QueryGrantsResponse { pub pagination: ::core::option::Option, } /// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGranterGrantsRequest { #[prost(string, tag = "1")] @@ -105,6 +115,7 @@ pub struct QueryGranterGrantsRequest { pub pagination: ::core::option::Option, } /// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGranterGrantsResponse { /// grants is a list of grants granted by the granter. @@ -115,6 +126,7 @@ pub struct QueryGranterGrantsResponse { pub pagination: ::core::option::Option, } /// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGranteeGrantsRequest { #[prost(string, tag = "1")] @@ -124,6 +136,7 @@ pub struct QueryGranteeGrantsRequest { pub pagination: ::core::option::Option, } /// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGranteeGrantsResponse { /// grants is a list of grants granted to the grantee. @@ -135,6 +148,7 @@ pub struct QueryGranteeGrantsResponse { } /// MsgGrant is a request type for Grant method. It declares authorization to the grantee /// on behalf of the granter with the provided expiration time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrant { #[prost(string, tag = "1")] @@ -145,6 +159,7 @@ pub struct MsgGrant { pub grant: ::core::option::Option, } /// MsgExecResponse defines the Msg/MsgExecResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecResponse { #[prost(bytes = "vec", repeated, tag = "1")] @@ -153,6 +168,7 @@ pub struct MsgExecResponse { /// MsgExec attempts to execute the provided messages using /// authorizations granted to the grantee. Each message should have only /// one signer corresponding to the granter of the authorization. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExec { #[prost(string, tag = "1")] @@ -161,13 +177,15 @@ pub struct MsgExec { /// The x/authz will try to find a grant matching (msg.signers\[0\], grantee, MsgTypeURL(msg)) /// triple and validate it. #[prost(message, repeated, tag = "2")] - pub msgs: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub msgs: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// MsgGrantResponse defines the Msg/MsgGrant response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrantResponse {} /// MsgRevoke revokes any authorization with the provided sdk.Msg type on the /// granter's account with that has been granted to the grantee. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevoke { #[prost(string, tag = "1")] @@ -178,6 +196,7 @@ pub struct MsgRevoke { pub msg_type_url: ::prost::alloc::string::String, } /// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeResponse {} include!("cosmos.authz.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs index 4574722a..f9872902 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs @@ -3,12 +3,14 @@ /// the granter's account. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SendAuthorization { #[prost(message, repeated, tag = "1")] pub spend_limit: ::prost::alloc::vec::Vec, } /// Params defines the parameters for the bank module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(message, repeated, tag = "1")] @@ -18,6 +20,7 @@ pub struct Params { } /// SendEnabled maps coin denom to a send_enabled status (whether a denom is /// sendable). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SendEnabled { #[prost(string, tag = "1")] @@ -26,6 +29,7 @@ pub struct SendEnabled { pub enabled: bool, } /// Input models transaction input. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Input { #[prost(string, tag = "1")] @@ -34,6 +38,7 @@ pub struct Input { pub coins: ::prost::alloc::vec::Vec, } /// Output models transaction outputs. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Output { #[prost(string, tag = "1")] @@ -44,6 +49,7 @@ pub struct Output { /// Supply represents a struct that passively keeps track of the total supply /// amounts in the network. /// This message is deprecated now that supply is indexed by denom. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Supply { #[prost(message, repeated, tag = "1")] @@ -51,6 +57,7 @@ pub struct Supply { } /// DenomUnit represents a struct that describes a given /// denomination unit of the basic token. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DenomUnit { /// denom represents the string name of the given denom unit (e.g uatom). @@ -69,6 +76,7 @@ pub struct DenomUnit { } /// Metadata represents a struct that describes /// a basic token. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Metadata { #[prost(string, tag = "1")] @@ -107,6 +115,7 @@ pub struct Metadata { pub uri_hash: ::prost::alloc::string::String, } /// GenesisState defines the bank module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of the module. @@ -125,6 +134,7 @@ pub struct GenesisState { } /// Balance defines an account address and balance pair used in the bank module's /// genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Balance { /// address is the address of the balance holder. @@ -135,6 +145,7 @@ pub struct Balance { pub coins: ::prost::alloc::vec::Vec, } /// QueryBalanceRequest is the request type for the Query/Balance RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBalanceRequest { /// address is the address to query balances for. @@ -145,6 +156,7 @@ pub struct QueryBalanceRequest { pub denom: ::prost::alloc::string::String, } /// QueryBalanceResponse is the response type for the Query/Balance RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBalanceResponse { /// balance is the balance of the coin. @@ -152,6 +164,7 @@ pub struct QueryBalanceResponse { pub balance: ::core::option::Option, } /// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllBalancesRequest { /// address is the address to query balances for. @@ -163,6 +176,7 @@ pub struct QueryAllBalancesRequest { } /// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllBalancesResponse { /// balances is the balances of all the coins. @@ -176,6 +190,7 @@ pub struct QueryAllBalancesResponse { /// an account's spendable balances. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySpendableBalancesRequest { /// address is the address to query spendable balances for. @@ -189,6 +204,7 @@ pub struct QuerySpendableBalancesRequest { /// an account's spendable balances. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySpendableBalancesResponse { /// balances is the spendable balances of all the coins. @@ -200,6 +216,7 @@ pub struct QuerySpendableBalancesResponse { } /// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalSupplyRequest { /// pagination defines an optional pagination for the request. @@ -210,6 +227,7 @@ pub struct QueryTotalSupplyRequest { } /// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalSupplyResponse { /// supply is the supply of the coins @@ -222,6 +240,7 @@ pub struct QueryTotalSupplyResponse { pub pagination: ::core::option::Option, } /// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySupplyOfRequest { /// denom is the coin denom to query balances for. @@ -229,6 +248,7 @@ pub struct QuerySupplyOfRequest { pub denom: ::prost::alloc::string::String, } /// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySupplyOfResponse { /// amount is the supply of the coin. @@ -236,15 +256,18 @@ pub struct QuerySupplyOfResponse { pub amount: ::core::option::Option, } /// QueryParamsRequest defines the request type for querying x/bank parameters. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse defines the response type for querying x/bank parameters. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } /// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomsMetadataRequest { /// pagination defines an optional pagination for the request. @@ -253,6 +276,7 @@ pub struct QueryDenomsMetadataRequest { } /// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomsMetadataResponse { /// metadata provides the client information for all the registered tokens. @@ -263,6 +287,7 @@ pub struct QueryDenomsMetadataResponse { pub pagination: ::core::option::Option, } /// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomMetadataRequest { /// denom is the coin denom to query the metadata for. @@ -271,6 +296,7 @@ pub struct QueryDenomMetadataRequest { } /// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomMetadataResponse { /// metadata describes and provides all the client information for the requested token. @@ -280,6 +306,7 @@ pub struct QueryDenomMetadataResponse { /// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, /// which queries for a paginated set of all account holders of a particular /// denomination. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomOwnersRequest { /// denom defines the coin denomination to query all account holders for. @@ -294,6 +321,7 @@ pub struct QueryDenomOwnersRequest { /// balance of the denominated token. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DenomOwner { /// address defines the address that owns a particular denomination. @@ -306,6 +334,7 @@ pub struct DenomOwner { /// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDenomOwnersResponse { #[prost(message, repeated, tag = "1")] @@ -315,6 +344,7 @@ pub struct QueryDenomOwnersResponse { pub pagination: ::core::option::Option, } /// MsgSend represents a message to send coins from one account to another. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSend { #[prost(string, tag = "1")] @@ -325,9 +355,11 @@ pub struct MsgSend { pub amount: ::prost::alloc::vec::Vec, } /// MsgSendResponse defines the Msg/Send response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSendResponse {} /// MsgMultiSend represents an arbitrary multi-in, multi-out send message. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMultiSend { #[prost(message, repeated, tag = "1")] @@ -336,6 +368,7 @@ pub struct MsgMultiSend { pub outputs: ::prost::alloc::vec::Vec, } /// MsgMultiSendResponse defines the Msg/MultiSend response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMultiSendResponse {} include!("cosmos.bank.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs index 6f3ec0c9..61d10824 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// TxResponse defines a structure containing relevant tx data and metadata. The /// tags are stringified and the log is JSON decoded. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxResponse { /// The block height @@ -36,7 +37,7 @@ pub struct TxResponse { pub gas_used: i64, /// The request transaction bytes. #[prost(message, optional, tag = "11")] - pub tx: ::core::option::Option<::prost_types::Any>, + pub tx: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// Time of the previous block. For heights > 1, it's the weighted median of /// the timestamps of the valid votes in the block.LastCommit. For height == 1, /// it's genesis time. @@ -52,6 +53,7 @@ pub struct TxResponse { pub events: ::prost::alloc::vec::Vec<::tendermint_proto::v0_34::abci::Event>, } /// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbciMessageLog { #[prost(uint32, tag = "1")] @@ -65,6 +67,7 @@ pub struct AbciMessageLog { } /// StringEvent defines en Event object wrapper where all the attributes /// contain key/value pairs that are strings instead of raw bytes. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StringEvent { #[prost(string, tag = "1")] @@ -74,6 +77,7 @@ pub struct StringEvent { } /// Attribute defines an attribute wrapper where the key and value are /// strings instead of raw bytes. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Attribute { #[prost(string, tag = "1")] @@ -82,6 +86,7 @@ pub struct Attribute { pub value: ::prost::alloc::string::String, } /// GasInfo defines tx execution gas context. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GasInfo { /// GasWanted is the maximum units of work we allow this tx to perform. @@ -92,6 +97,7 @@ pub struct GasInfo { pub gas_used: u64, } /// Result is the union of ResponseFormat and ResponseCheckTx. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { /// Data is any data returned from message or handler execution. It MUST be @@ -112,10 +118,11 @@ pub struct Result { /// /// Since: cosmos-sdk 0.46 #[prost(message, repeated, tag = "4")] - pub msg_responses: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub msg_responses: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// SimulationResponse defines the response generated when a transaction is /// successfully simulated. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulationResponse { #[prost(message, optional, tag = "1")] @@ -125,6 +132,7 @@ pub struct SimulationResponse { } /// MsgData defines the data returned in a Result object during message /// execution. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgData { #[prost(string, tag = "1")] @@ -134,6 +142,7 @@ pub struct MsgData { } /// TxMsgData defines a list of MsgData. A transaction will have a MsgData object /// for each message. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxMsgData { /// data field is deprecated and not populated. @@ -144,9 +153,10 @@ pub struct TxMsgData { /// /// Since: cosmos-sdk 0.46 #[prost(message, repeated, tag = "2")] - pub msg_responses: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub msg_responses: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// SearchTxsResult defines a structure for querying txs pageable +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchTxsResult { /// Count of all txs diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs index ac1906db..f4667040 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.rs @@ -1,11 +1,13 @@ // @generated /// Pairs defines a repeated slice of Pair objects. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pairs { #[prost(message, repeated, tag = "1")] pub pairs: ::prost::alloc::vec::Vec, } /// Pair defines a key/value bytes tuple. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pair { #[prost(bytes = "vec", tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs index 20a2cbf8..c0b5c72c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.rs @@ -1,8 +1,10 @@ // @generated /// ConfigRequest defines the request structure for the Config gRPC query. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConfigRequest {} /// ConfigResponse defines the response structure for the Config gRPC query. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConfigResponse { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs index f37d3872..86f391b5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs @@ -6,6 +6,7 @@ /// Foo some_parameter = 1; /// PageRequest pagination = 2; /// } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PageRequest { /// key is a value returned in PageResponse.next_key to begin @@ -41,6 +42,7 @@ pub struct PageRequest { /// repeated Bar results = 1; /// PageResponse page = 2; /// } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PageResponse { /// next_key is the key to be passed to PageRequest.key to diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs index d640d9f6..e238c3a9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.rs @@ -1,8 +1,10 @@ // @generated /// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAllInterfacesRequest {} /// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAllInterfacesResponse { /// interface_names is an array of all the registered interfaces. @@ -11,6 +13,7 @@ pub struct ListAllInterfacesResponse { } /// ListImplementationsRequest is the request type of the ListImplementations /// RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListImplementationsRequest { /// interface_name defines the interface to query the implementations for. @@ -19,6 +22,7 @@ pub struct ListImplementationsRequest { } /// ListImplementationsResponse is the response type of the ListImplementations /// RPC. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListImplementationsResponse { #[prost(string, repeated, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs index e50492c5..583c0f0d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.rs @@ -1,5 +1,6 @@ // @generated /// AppDescriptor describes a cosmos-sdk based application +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AppDescriptor { /// AuthnDescriptor provides information on how to authenticate transactions on the application @@ -23,6 +24,7 @@ pub struct AppDescriptor { pub tx: ::core::option::Option, } /// TxDescriptor describes the accepted transaction type +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxDescriptor { /// fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) @@ -36,6 +38,7 @@ pub struct TxDescriptor { } /// AuthnDescriptor provides information on how to sign transactions without relying /// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuthnDescriptor { /// sign_modes defines the supported signature algorithm @@ -46,6 +49,7 @@ pub struct AuthnDescriptor { /// NOTE(fdymylja): here we could go as far as providing an entire flow on how /// to sign a message given a SigningModeDescriptor, but it's better to think about /// this another time +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SigningModeDescriptor { /// name defines the unique name of the signing mode @@ -60,6 +64,7 @@ pub struct SigningModeDescriptor { pub authn_info_provider_method_fullname: ::prost::alloc::string::String, } /// ChainDescriptor describes chain information of the application +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChainDescriptor { /// id is the chain id @@ -67,6 +72,7 @@ pub struct ChainDescriptor { pub id: ::prost::alloc::string::String, } /// CodecDescriptor describes the registered interfaces and provides metadata information on the types +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CodecDescriptor { /// interfaces is a list of the registerted interfaces descriptors @@ -74,6 +80,7 @@ pub struct CodecDescriptor { pub interfaces: ::prost::alloc::vec::Vec, } /// InterfaceDescriptor describes the implementation of an interface +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceDescriptor { /// fullname is the name of the interface @@ -88,6 +95,7 @@ pub struct InterfaceDescriptor { pub interface_implementers: ::prost::alloc::vec::Vec, } /// InterfaceImplementerDescriptor describes an interface implementer +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceImplementerDescriptor { /// fullname is the protobuf queryable name of the interface implementer @@ -102,6 +110,7 @@ pub struct InterfaceImplementerDescriptor { } /// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains /// an interface represented as a google.protobuf.Any +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceAcceptingMessageDescriptor { /// fullname is the protobuf fullname of the type containing the interface @@ -114,6 +123,7 @@ pub struct InterfaceAcceptingMessageDescriptor { pub field_descriptor_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// ConfigurationDescriptor contains metadata information on the sdk.Config +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConfigurationDescriptor { /// bech32_account_address_prefix is the account address prefix @@ -121,6 +131,7 @@ pub struct ConfigurationDescriptor { pub bech32_account_address_prefix: ::prost::alloc::string::String, } /// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDescriptor { /// msg_type_url contains the TypeURL of a sdk.Msg. @@ -128,9 +139,11 @@ pub struct MsgDescriptor { pub msg_type_url: ::prost::alloc::string::String, } /// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAuthnDescriptorRequest {} /// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAuthnDescriptorResponse { /// authn describes how to authenticate to the application when sending transactions @@ -138,9 +151,11 @@ pub struct GetAuthnDescriptorResponse { pub authn: ::core::option::Option, } /// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetChainDescriptorRequest {} /// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetChainDescriptorResponse { /// chain describes application chain information @@ -148,9 +163,11 @@ pub struct GetChainDescriptorResponse { pub chain: ::core::option::Option, } /// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetCodecDescriptorRequest {} /// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetCodecDescriptorResponse { /// codec describes the application codec such as registered interfaces and implementations @@ -158,9 +175,11 @@ pub struct GetCodecDescriptorResponse { pub codec: ::core::option::Option, } /// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetConfigurationDescriptorRequest {} /// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetConfigurationDescriptorResponse { /// config describes the application's sdk.Config @@ -168,9 +187,11 @@ pub struct GetConfigurationDescriptorResponse { pub config: ::core::option::Option, } /// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetQueryServicesDescriptorRequest {} /// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetQueryServicesDescriptorResponse { /// queries provides information on the available queryable services @@ -178,9 +199,11 @@ pub struct GetQueryServicesDescriptorResponse { pub queries: ::core::option::Option, } /// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxDescriptorRequest {} /// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxDescriptorResponse { /// tx provides information on msgs that can be forwarded to the application @@ -189,6 +212,7 @@ pub struct GetTxDescriptorResponse { pub tx: ::core::option::Option, } /// QueryServicesDescriptor contains the list of cosmos-sdk queriable services +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryServicesDescriptor { /// query_services is a list of cosmos-sdk QueryServiceDescriptor @@ -196,6 +220,7 @@ pub struct QueryServicesDescriptor { pub query_services: ::prost::alloc::vec::Vec, } /// QueryServiceDescriptor describes a cosmos-sdk queryable service +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryServiceDescriptor { /// fullname is the protobuf fullname of the service descriptor @@ -211,6 +236,7 @@ pub struct QueryServiceDescriptor { /// QueryMethodDescriptor describes a queryable method of a query service /// no other info is provided beside method name and tendermint queryable path /// because it would be redundant with the grpc reflection service +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryMethodDescriptor { /// name is the protobuf name (not fullname) of the method diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs index 8d80a25d..50faee3c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Snapshot contains Tendermint state sync snapshot info. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Snapshot { #[prost(uint64, tag = "1")] @@ -14,6 +15,7 @@ pub struct Snapshot { pub metadata: ::core::option::Option, } /// Metadata contains SDK-specific snapshot metadata. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Metadata { /// SHA-256 chunk hashes @@ -23,6 +25,7 @@ pub struct Metadata { /// SnapshotItem is an item contained in a rootmulti.Store snapshot. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotItem { /// item is the specific type of snapshot item. @@ -32,6 +35,7 @@ pub struct SnapshotItem { /// Nested message and enum types in `SnapshotItem`. pub mod snapshot_item { /// item is the specific type of snapshot item. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Item { #[prost(message, tag = "1")] @@ -51,6 +55,7 @@ pub mod snapshot_item { /// SnapshotStoreItem contains metadata about a snapshotted store. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotStoreItem { #[prost(string, tag = "1")] @@ -59,6 +64,7 @@ pub struct SnapshotStoreItem { /// SnapshotIAVLItem is an exported IAVL node. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotIavlItem { #[prost(bytes = "vec", tag = "1")] @@ -75,6 +81,7 @@ pub struct SnapshotIavlItem { /// SnapshotExtensionMeta contains metadata about an external snapshotter. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotExtensionMeta { #[prost(string, tag = "1")] @@ -85,6 +92,7 @@ pub struct SnapshotExtensionMeta { /// SnapshotExtensionPayload contains payloads of an external snapshotter. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotExtensionPayload { #[prost(bytes = "vec", tag = "1")] @@ -93,6 +101,7 @@ pub struct SnapshotExtensionPayload { /// SnapshotKVItem is an exported Key/Value Pair /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotKvItem { #[prost(bytes = "vec", tag = "1")] @@ -103,6 +112,7 @@ pub struct SnapshotKvItem { /// SnapshotSchema is an exported schema of smt store /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotSchema { #[prost(bytes = "vec", repeated, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs index 63f94a6d..d2983ea0 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// CommitInfo defines commit information used by the multi-store when committing /// a version/height. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitInfo { #[prost(int64, tag = "1")] @@ -10,6 +11,7 @@ pub struct CommitInfo { } /// StoreInfo defines store-specific commit information. It contains a reference /// between a store name and the commit ID. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreInfo { #[prost(string, tag = "1")] @@ -19,6 +21,7 @@ pub struct StoreInfo { } /// CommitID defines the committment information when a specific store is /// committed. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitId { #[prost(int64, tag = "1")] @@ -31,6 +34,7 @@ pub struct CommitId { /// Deletes /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreKvPair { /// the store key for the KVStore this pair originates from @@ -46,6 +50,7 @@ pub struct StoreKvPair { } /// BlockMetadata contains all the abci event data of a block /// the file streamer dump them into files together with the state changes. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlockMetadata { #[prost(message, optional, tag = "1")] @@ -67,6 +72,7 @@ pub struct BlockMetadata { /// Nested message and enum types in `BlockMetadata`. pub mod block_metadata { /// DeliverTx encapulate deliver tx request and response. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeliverTx { #[prost(message, optional, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs index e6de1499..0f547622 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// Block is tendermint type Block, with the Header proposer address /// field converted to bech32 string. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { #[prost(message, optional, tag = "1")] @@ -13,6 +14,7 @@ pub struct Block { pub last_commit: ::core::option::Option<::tendermint_proto::v0_34::types::Commit>, } /// Header defines the structure of a Tendermint block header. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Header { /// basic block info @@ -23,7 +25,7 @@ pub struct Header { #[prost(int64, tag = "3")] pub height: i64, #[prost(message, optional, tag = "4")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// prev block info #[prost(message, optional, tag = "5")] pub last_block_id: ::core::option::Option<::tendermint_proto::v0_34::types::BlockId>, @@ -67,6 +69,7 @@ pub struct Header { } /// GetValidatorSetByHeightRequest is the request type for the /// Query/GetValidatorSetByHeight RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetValidatorSetByHeightRequest { #[prost(int64, tag = "1")] @@ -77,6 +80,7 @@ pub struct GetValidatorSetByHeightRequest { } /// GetValidatorSetByHeightResponse is the response type for the /// Query/GetValidatorSetByHeight RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetValidatorSetByHeightResponse { #[prost(int64, tag = "1")] @@ -89,6 +93,7 @@ pub struct GetValidatorSetByHeightResponse { } /// GetLatestValidatorSetRequest is the request type for the /// Query/GetValidatorSetByHeight RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestValidatorSetRequest { /// pagination defines an pagination for the request. @@ -97,6 +102,7 @@ pub struct GetLatestValidatorSetRequest { } /// GetLatestValidatorSetResponse is the response type for the /// Query/GetValidatorSetByHeight RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestValidatorSetResponse { #[prost(int64, tag = "1")] @@ -108,12 +114,13 @@ pub struct GetLatestValidatorSetResponse { pub pagination: ::core::option::Option, } /// Validator is the type for the validator-set. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Validator { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::prost_types::Any>, + pub pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(int64, tag = "3")] pub voting_power: i64, #[prost(int64, tag = "4")] @@ -121,6 +128,7 @@ pub struct Validator { } /// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockByHeightRequest { #[prost(int64, tag = "1")] @@ -128,6 +136,7 @@ pub struct GetBlockByHeightRequest { } /// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockByHeightResponse { #[prost(message, optional, tag = "1")] @@ -141,10 +150,12 @@ pub struct GetBlockByHeightResponse { } /// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestBlockRequest {} /// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestBlockResponse { #[prost(message, optional, tag = "1")] @@ -157,19 +168,23 @@ pub struct GetLatestBlockResponse { pub sdk_block: ::core::option::Option, } /// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSyncingRequest {} /// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSyncingResponse { #[prost(bool, tag = "1")] pub syncing: bool, } /// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetNodeInfoRequest {} /// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetNodeInfoResponse { #[prost(message, optional, tag = "1")] @@ -178,6 +193,7 @@ pub struct GetNodeInfoResponse { pub application_version: ::core::option::Option, } /// VersionInfo is the type for the GetNodeInfoResponse message. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VersionInfo { #[prost(string, tag = "1")] @@ -199,6 +215,7 @@ pub struct VersionInfo { pub cosmos_sdk_version: ::prost::alloc::string::String, } /// Module is the type for VersionInfo +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module { /// module path @@ -212,6 +229,7 @@ pub struct Module { pub sum: ::prost::alloc::string::String, } /// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbciQueryRequest { #[prost(bytes = "vec", tag = "1")] @@ -228,6 +246,7 @@ pub struct AbciQueryRequest { /// /// Note: This type is a duplicate of the ResponseQuery proto type defined in /// Tendermint. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbciQueryResponse { #[prost(uint32, tag = "1")] @@ -257,6 +276,7 @@ pub struct AbciQueryResponse { /// /// Note: This type is a duplicate of the ProofOp proto type defined in /// Tendermint. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProofOp { #[prost(string, tag = "1")] @@ -270,6 +290,7 @@ pub struct ProofOp { /// /// Note: This type is a duplicate of the ProofOps proto type defined in /// Tendermint. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProofOps { #[prost(message, repeated, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs index cc4421b2..3701a1a8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.rs @@ -3,6 +3,7 @@ /// /// NOTE: The amount field is an Int which implements the custom method /// signatures required by gogoproto. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Coin { #[prost(string, tag = "1")] @@ -14,6 +15,7 @@ pub struct Coin { /// /// NOTE: The amount field is an Dec which implements the custom method /// signatures required by gogoproto. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecCoin { #[prost(string, tag = "1")] @@ -22,12 +24,14 @@ pub struct DecCoin { pub amount: ::prost::alloc::string::String, } /// IntProto defines a Protobuf wrapper around an Int object. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IntProto { #[prost(string, tag = "1")] pub int: ::prost::alloc::string::String, } /// DecProto defines a Protobuf wrapper around a Dec object. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecProto { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs index b1c83050..3b08dbef 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// Capability defines an implementation of an object capability. The index /// provided to a Capability must be globally unique. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Capability { #[prost(uint64, tag = "1")] @@ -8,6 +9,7 @@ pub struct Capability { } /// Owner defines a single capability owner. An owner is defined by the name of /// capability and the module name. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Owner { #[prost(string, tag = "1")] @@ -17,12 +19,14 @@ pub struct Owner { } /// CapabilityOwners defines a set of owners of a single Capability. The set of /// owners must be unique. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CapabilityOwners { #[prost(message, repeated, tag = "1")] pub owners: ::prost::alloc::vec::Vec, } /// GenesisOwners defines the capability owners with their corresponding index. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisOwners { /// index is the index of the capability owner. @@ -33,6 +37,7 @@ pub struct GenesisOwners { pub index_owners: ::core::option::Option, } /// GenesisState defines the capability module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// index is the capability global index. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs index b26eda40..02c77950 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// GenesisState defines the crisis module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// constant_fee is the fee used to verify the invariant in the crisis @@ -8,6 +9,7 @@ pub struct GenesisState { pub constant_fee: ::core::option::Option, } /// MsgVerifyInvariant represents a message to verify a particular invariance. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVerifyInvariant { #[prost(string, tag = "1")] @@ -18,6 +20,7 @@ pub struct MsgVerifyInvariant { pub invariant_route: ::prost::alloc::string::String, } /// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVerifyInvariantResponse {} include!("cosmos.crisis.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs index 238b361a..ffe81581 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.rs @@ -4,6 +4,7 @@ /// It must not be used in a non Tendermint key context because it doesn't implement /// ADR-28. Nevertheless, you will like to use ed25519 in app user level /// then you must create a new proto message and follow ADR-28 for Address construction. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubKey { #[prost(bytes = "vec", tag = "1")] @@ -11,6 +12,7 @@ pub struct PubKey { } /// Deprecated: PrivKey defines a ed25519 private key. /// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs index 1ff415b4..012f1ec2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.rs @@ -1,5 +1,6 @@ // @generated /// BIP44Params is used as path field in ledger item in Record. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Bip44Params { /// purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs index 6f72e275..6c9bcfe2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs @@ -1,5 +1,6 @@ // @generated /// Record is used for representing a key in the keyring. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Record { /// name represents a name of Record @@ -7,7 +8,7 @@ pub struct Record { pub name: ::prost::alloc::string::String, /// pub_key represents a public key in any format #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::prost_types::Any>, + pub pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// Record contains one of the following items #[prost(oneof = "record::Item", tags = "3, 4, 5, 6")] pub item: ::core::option::Option, @@ -16,24 +17,29 @@ pub struct Record { pub mod record { /// Item is a keyring item stored in a keyring backend. /// Local item + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Local { #[prost(message, optional, tag = "1")] - pub priv_key: ::core::option::Option<::prost_types::Any>, + pub priv_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// Ledger item + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Ledger { #[prost(message, optional, tag = "1")] pub path: ::core::option::Option, } /// Multi item + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Multi {} /// Offline item + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Offline {} /// Record contains one of the following items + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Item { /// local stores the private key locally. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs index 974b4bc0..5bb6c242 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs @@ -2,11 +2,12 @@ /// LegacyAminoPubKey specifies a public key type /// which nests multiple public keys and a threshold, /// it uses legacy amino address rules. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LegacyAminoPubKey { #[prost(uint32, tag = "1")] pub threshold: u32, #[prost(message, repeated, tag = "2")] - pub public_keys: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub public_keys: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs index 9898f38e..b02457f2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.rs @@ -2,6 +2,7 @@ /// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. /// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers /// signed and with which modes. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiSignature { #[prost(bytes = "vec", repeated, tag = "1")] @@ -11,6 +12,7 @@ pub struct MultiSignature { /// This is used to ensure that the encoded data takes up a minimal amount of /// space after proto encoding. /// This is not thread safe, and is not intended for concurrent usage. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompactBitArray { #[prost(uint32, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs index 1f145b3c..fcc15624 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.rs @@ -4,12 +4,14 @@ /// if the y-coordinate is the lexicographically largest of the two associated with /// the x-coordinate. Otherwise the first byte is a 0x03. /// This prefix is followed with the x-coordinate. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubKey { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, } /// PrivKey defines a secp256k1 private key. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs index ec7fc762..b5078d8c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.rs @@ -1,5 +1,6 @@ // @generated /// PubKey defines a secp256r1 ECDSA public key. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubKey { /// Point on secp256r1 curve in a compressed representation as specified in section @@ -8,6 +9,7 @@ pub struct PubKey { pub key: ::prost::alloc::vec::Vec, } /// PrivKey defines a secp256r1 ECDSA private key. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrivKey { /// secret number serialized using big-endian encoding diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs index 85d64736..7364d071 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Params defines the set of params for the distribution module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(string, tag = "1")] @@ -23,6 +24,7 @@ pub struct Params { /// + number of slashes which ended the associated period (and might need to /// read that record) /// + one per validator for the zeroeth period, set on initialization +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorHistoricalRewards { #[prost(message, repeated, tag = "1")] @@ -33,6 +35,7 @@ pub struct ValidatorHistoricalRewards { /// ValidatorCurrentRewards represents current rewards and current /// period for a validator kept as a running counter and incremented /// each block as long as the validator's tokens remain constant. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorCurrentRewards { #[prost(message, repeated, tag = "1")] @@ -42,6 +45,7 @@ pub struct ValidatorCurrentRewards { } /// ValidatorAccumulatedCommission represents accumulated commission /// for a validator kept as a running counter, can be withdrawn at any time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorAccumulatedCommission { #[prost(message, repeated, tag = "1")] @@ -49,6 +53,7 @@ pub struct ValidatorAccumulatedCommission { } /// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards /// for a validator inexpensive to track, allows simple sanity checks. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorOutstandingRewards { #[prost(message, repeated, tag = "1")] @@ -58,6 +63,7 @@ pub struct ValidatorOutstandingRewards { /// Height is implicit within the store key. /// This is needed to calculate appropriate amount of staking tokens /// for delegations which are withdrawn after a slash has occurred. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorSlashEvent { #[prost(uint64, tag = "1")] @@ -66,12 +72,14 @@ pub struct ValidatorSlashEvent { pub fraction: ::prost::alloc::string::String, } /// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorSlashEvents { #[prost(message, repeated, tag = "1")] pub validator_slash_events: ::prost::alloc::vec::Vec, } /// FeePool is the global fee pool for distribution. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FeePool { #[prost(message, repeated, tag = "1")] @@ -80,6 +88,7 @@ pub struct FeePool { /// CommunityPoolSpendProposal details a proposal for use of community funds, /// together with how many coins are proposed to be spent, and to which /// recipient account. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommunityPoolSpendProposal { #[prost(string, tag = "1")] @@ -97,6 +106,7 @@ pub struct CommunityPoolSpendProposal { /// occurred). NOTE: Even though validators are slashed to whole staking tokens, /// the delegators within the validator may be left with less than a full token, /// thus sdk.Dec is used. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegatorStartingInfo { #[prost(uint64, tag = "1")] @@ -108,6 +118,7 @@ pub struct DelegatorStartingInfo { } /// DelegationDelegatorReward represents the properties /// of a delegator's delegation reward. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegationDelegatorReward { #[prost(string, tag = "1")] @@ -117,6 +128,7 @@ pub struct DelegationDelegatorReward { } /// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal /// with a deposit +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommunityPoolSpendProposalWithDeposit { #[prost(string, tag = "1")] @@ -133,6 +145,7 @@ pub struct CommunityPoolSpendProposalWithDeposit { /// DelegatorWithdrawInfo is the address for where distributions rewards are /// withdrawn to by default this struct is only used at genesis to feed in /// default withdraw addresses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegatorWithdrawInfo { /// delegator_address is the address of the delegator. @@ -143,6 +156,7 @@ pub struct DelegatorWithdrawInfo { pub withdraw_address: ::prost::alloc::string::String, } /// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorOutstandingRewardsRecord { /// validator_address is the address of the validator. @@ -154,6 +168,7 @@ pub struct ValidatorOutstandingRewardsRecord { } /// ValidatorAccumulatedCommissionRecord is used for import / export via genesis /// json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorAccumulatedCommissionRecord { /// validator_address is the address of the validator. @@ -165,6 +180,7 @@ pub struct ValidatorAccumulatedCommissionRecord { } /// ValidatorHistoricalRewardsRecord is used for import / export via genesis /// json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorHistoricalRewardsRecord { /// validator_address is the address of the validator. @@ -178,6 +194,7 @@ pub struct ValidatorHistoricalRewardsRecord { pub rewards: ::core::option::Option, } /// ValidatorCurrentRewardsRecord is used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorCurrentRewardsRecord { /// validator_address is the address of the validator. @@ -188,6 +205,7 @@ pub struct ValidatorCurrentRewardsRecord { pub rewards: ::core::option::Option, } /// DelegatorStartingInfoRecord used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegatorStartingInfoRecord { /// delegator_address is the address of the delegator. @@ -201,6 +219,7 @@ pub struct DelegatorStartingInfoRecord { pub starting_info: ::core::option::Option, } /// ValidatorSlashEventRecord is used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorSlashEventRecord { /// validator_address is the address of the validator. @@ -217,6 +236,7 @@ pub struct ValidatorSlashEventRecord { pub validator_slash_event: ::core::option::Option, } /// GenesisState defines the distribution module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of the module. @@ -252,9 +272,11 @@ pub struct GenesisState { pub validator_slash_events: ::prost::alloc::vec::Vec, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. @@ -263,6 +285,7 @@ pub struct QueryParamsResponse { } /// QueryValidatorOutstandingRewardsRequest is the request type for the /// Query/ValidatorOutstandingRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorOutstandingRewardsRequest { /// validator_address defines the validator address to query for. @@ -271,6 +294,7 @@ pub struct QueryValidatorOutstandingRewardsRequest { } /// QueryValidatorOutstandingRewardsResponse is the response type for the /// Query/ValidatorOutstandingRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorOutstandingRewardsResponse { #[prost(message, optional, tag = "1")] @@ -278,6 +302,7 @@ pub struct QueryValidatorOutstandingRewardsResponse { } /// QueryValidatorCommissionRequest is the request type for the /// Query/ValidatorCommission RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorCommissionRequest { /// validator_address defines the validator address to query for. @@ -286,6 +311,7 @@ pub struct QueryValidatorCommissionRequest { } /// QueryValidatorCommissionResponse is the response type for the /// Query/ValidatorCommission RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorCommissionResponse { /// commission defines the commision the validator received. @@ -294,6 +320,7 @@ pub struct QueryValidatorCommissionResponse { } /// QueryValidatorSlashesRequest is the request type for the /// Query/ValidatorSlashes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorSlashesRequest { /// validator_address defines the validator address to query for. @@ -311,6 +338,7 @@ pub struct QueryValidatorSlashesRequest { } /// QueryValidatorSlashesResponse is the response type for the /// Query/ValidatorSlashes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorSlashesResponse { /// slashes defines the slashes the validator received. @@ -322,6 +350,7 @@ pub struct QueryValidatorSlashesResponse { } /// QueryDelegationRewardsRequest is the request type for the /// Query/DelegationRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationRewardsRequest { /// delegator_address defines the delegator address to query for. @@ -333,6 +362,7 @@ pub struct QueryDelegationRewardsRequest { } /// QueryDelegationRewardsResponse is the response type for the /// Query/DelegationRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationRewardsResponse { /// rewards defines the rewards accrued by a delegation. @@ -341,6 +371,7 @@ pub struct QueryDelegationRewardsResponse { } /// QueryDelegationTotalRewardsRequest is the request type for the /// Query/DelegationTotalRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationTotalRewardsRequest { /// delegator_address defines the delegator address to query for. @@ -349,6 +380,7 @@ pub struct QueryDelegationTotalRewardsRequest { } /// QueryDelegationTotalRewardsResponse is the response type for the /// Query/DelegationTotalRewards RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationTotalRewardsResponse { /// rewards defines all the rewards accrued by a delegator. @@ -360,6 +392,7 @@ pub struct QueryDelegationTotalRewardsResponse { } /// QueryDelegatorValidatorsRequest is the request type for the /// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorsRequest { /// delegator_address defines the delegator address to query for. @@ -368,6 +401,7 @@ pub struct QueryDelegatorValidatorsRequest { } /// QueryDelegatorValidatorsResponse is the response type for the /// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorsResponse { /// validators defines the validators a delegator is delegating for. @@ -376,6 +410,7 @@ pub struct QueryDelegatorValidatorsResponse { } /// QueryDelegatorWithdrawAddressRequest is the request type for the /// Query/DelegatorWithdrawAddress RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorWithdrawAddressRequest { /// delegator_address defines the delegator address to query for. @@ -384,6 +419,7 @@ pub struct QueryDelegatorWithdrawAddressRequest { } /// QueryDelegatorWithdrawAddressResponse is the response type for the /// Query/DelegatorWithdrawAddress RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorWithdrawAddressResponse { /// withdraw_address defines the delegator address to query for. @@ -392,10 +428,12 @@ pub struct QueryDelegatorWithdrawAddressResponse { } /// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCommunityPoolRequest {} /// QueryCommunityPoolResponse is the response type for the Query/CommunityPool /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCommunityPoolResponse { /// pool defines community pool's coins. @@ -404,6 +442,7 @@ pub struct QueryCommunityPoolResponse { } /// MsgSetWithdrawAddress sets the withdraw address for /// a delegator (or validator self-delegation). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSetWithdrawAddress { #[prost(string, tag = "1")] @@ -412,10 +451,12 @@ pub struct MsgSetWithdrawAddress { pub withdraw_address: ::prost::alloc::string::String, } /// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSetWithdrawAddressResponse {} /// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator /// from a single validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawDelegatorReward { #[prost(string, tag = "1")] @@ -424,6 +465,7 @@ pub struct MsgWithdrawDelegatorReward { pub validator_address: ::prost::alloc::string::String, } /// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawDelegatorRewardResponse { /// Since: cosmos-sdk 0.46 @@ -432,12 +474,14 @@ pub struct MsgWithdrawDelegatorRewardResponse { } /// MsgWithdrawValidatorCommission withdraws the full commission to the validator /// address. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawValidatorCommission { #[prost(string, tag = "1")] pub validator_address: ::prost::alloc::string::String, } /// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawValidatorCommissionResponse { /// Since: cosmos-sdk 0.46 @@ -446,6 +490,7 @@ pub struct MsgWithdrawValidatorCommissionResponse { } /// MsgFundCommunityPool allows an account to directly /// fund the community pool. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgFundCommunityPool { #[prost(message, repeated, tag = "1")] @@ -454,6 +499,7 @@ pub struct MsgFundCommunityPool { pub depositor: ::prost::alloc::string::String, } /// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgFundCommunityPoolResponse {} include!("cosmos.distribution.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs index 6ef949d0..5ef5851a 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs @@ -1,25 +1,28 @@ // @generated /// Equivocation implements the Evidence interface and defines evidence of double /// signing misbehavior. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Equivocation { #[prost(int64, tag = "1")] pub height: i64, #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(int64, tag = "3")] pub power: i64, #[prost(string, tag = "4")] pub consensus_address: ::prost::alloc::string::String, } /// GenesisState defines the evidence module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// evidence defines all the evidence at genesis. #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub evidence: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryEvidenceRequest { /// evidence_hash defines the hash of the requested evidence. @@ -27,14 +30,16 @@ pub struct QueryEvidenceRequest { pub evidence_hash: ::prost::alloc::vec::Vec, } /// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryEvidenceResponse { /// evidence returns the requested evidence. #[prost(message, optional, tag = "1")] - pub evidence: ::core::option::Option<::prost_types::Any>, + pub evidence: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllEvidenceRequest { /// pagination defines an optional pagination for the request. @@ -43,25 +48,28 @@ pub struct QueryAllEvidenceRequest { } /// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllEvidenceResponse { /// evidence returns all evidences. #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub evidence: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// MsgSubmitEvidence represents a message that supports submitting arbitrary /// Evidence of misbehavior such as equivocation or counterfactual signing. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitEvidence { #[prost(string, tag = "1")] pub submitter: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option<::prost_types::Any>, + pub evidence: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitEvidenceResponse { /// hash defines the hash of the evidence. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs index 6715da41..03a750c9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// BasicAllowance implements Allowance with a one-time grant of coins /// that optionally expires. The grantee can use up to SpendLimit to cover fees. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BasicAllowance { /// spend_limit specifies the maximum amount of coins that can be spent @@ -10,10 +11,11 @@ pub struct BasicAllowance { pub spend_limit: ::prost::alloc::vec::Vec, /// expiration specifies an optional time when this allowance expires #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option<::prost_types::Timestamp>, + pub expiration: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// PeriodicAllowance extends Allowance to allow for both a maximum cap, /// as well as a limit per time period. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeriodicAllowance { /// basic specifies a struct of `BasicAllowance` @@ -22,7 +24,7 @@ pub struct PeriodicAllowance { /// period specifies the time duration in which period_spend_limit coins can /// be spent before that allowance is reset #[prost(message, optional, tag = "2")] - pub period: ::core::option::Option<::prost_types::Duration>, + pub period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// period_spend_limit specifies the maximum number of coins that can be spent /// in the period #[prost(message, repeated, tag = "3")] @@ -34,19 +36,21 @@ pub struct PeriodicAllowance { /// it is calculated from the start time of the first transaction after the /// last period ended #[prost(message, optional, tag = "5")] - pub period_reset: ::core::option::Option<::prost_types::Timestamp>, + pub period_reset: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// AllowedMsgAllowance creates allowance only for specified message types. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AllowedMsgAllowance { /// allowance can be any of basic and periodic fee allowance. #[prost(message, optional, tag = "1")] - pub allowance: ::core::option::Option<::prost_types::Any>, + pub allowance: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// allowed_messages are the messages for which the grantee has the access. #[prost(string, repeated, tag = "2")] pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Grant is stored in the KVStore to record a grant with full context +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Grant { /// granter is the address of the user granting an allowance of their funds. @@ -57,15 +61,17 @@ pub struct Grant { pub grantee: ::prost::alloc::string::String, /// allowance can be any of basic, periodic, allowed fee allowance. #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::prost_types::Any>, + pub allowance: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// GenesisState contains a set of fee allowances, persisted from the store +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, repeated, tag = "1")] pub allowances: ::prost::alloc::vec::Vec, } /// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowanceRequest { /// granter is the address of the user granting an allowance of their funds. @@ -76,6 +82,7 @@ pub struct QueryAllowanceRequest { pub grantee: ::prost::alloc::string::String, } /// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowanceResponse { /// allowance is a allowance granted for grantee by granter. @@ -83,6 +90,7 @@ pub struct QueryAllowanceResponse { pub allowance: ::core::option::Option, } /// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesRequest { #[prost(string, tag = "1")] @@ -92,6 +100,7 @@ pub struct QueryAllowancesRequest { pub pagination: ::core::option::Option, } /// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesResponse { /// allowances are allowance's granted for grantee by granter. @@ -104,6 +113,7 @@ pub struct QueryAllowancesResponse { /// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesByGranterRequest { #[prost(string, tag = "1")] @@ -115,6 +125,7 @@ pub struct QueryAllowancesByGranterRequest { /// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesByGranterResponse { /// allowances that have been issued by the granter. @@ -126,6 +137,7 @@ pub struct QueryAllowancesByGranterResponse { } /// MsgGrantAllowance adds permission for Grantee to spend up to Allowance /// of fees from the account of Granter. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrantAllowance { /// granter is the address of the user granting an allowance of their funds. @@ -136,12 +148,14 @@ pub struct MsgGrantAllowance { pub grantee: ::prost::alloc::string::String, /// allowance can be any of basic, periodic, allowed fee allowance. #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::prost_types::Any>, + pub allowance: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrantAllowanceResponse {} /// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeAllowance { /// granter is the address of the user granting an allowance of their funds. @@ -152,6 +166,7 @@ pub struct MsgRevokeAllowance { pub grantee: ::prost::alloc::string::String, } /// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeAllowanceResponse {} include!("cosmos.feegrant.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs index 2527f9e4..254fdd91 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// GenesisState defines the raw genesis transaction in JSON. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// gen_txs defines the genesis transactions. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs index 97baf541..7ff33edd 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs @@ -1,5 +1,6 @@ // @generated /// WeightedVoteOption defines a unit of vote for vote split. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WeightedVoteOption { #[prost(enumeration = "VoteOption", tag = "1")] @@ -9,6 +10,7 @@ pub struct WeightedVoteOption { } /// Deposit defines an amount deposited by an account address to an active /// proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Deposit { #[prost(uint64, tag = "1")] @@ -19,12 +21,13 @@ pub struct Deposit { pub amount: ::prost::alloc::vec::Vec, } /// Proposal defines the core field members of a governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Proposal { #[prost(uint64, tag = "1")] pub id: u64, #[prost(message, repeated, tag = "2")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, #[prost(enumeration = "ProposalStatus", tag = "3")] pub status: i32, /// final_tally_result is the final tally result of the proposal. When @@ -33,20 +36,21 @@ pub struct Proposal { #[prost(message, optional, tag = "4")] pub final_tally_result: ::core::option::Option, #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, + pub submit_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option<::prost_types::Timestamp>, + pub deposit_end_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, repeated, tag = "7")] pub total_deposit: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option<::prost_types::Timestamp>, + pub voting_start_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option<::prost_types::Timestamp>, + pub voting_end_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// metadata is any arbitrary metadata attached to the proposal. #[prost(string, tag = "10")] pub metadata: ::prost::alloc::string::String, } /// TallyResult defines a standard tally for a governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyResult { #[prost(string, tag = "1")] @@ -60,6 +64,7 @@ pub struct TallyResult { } /// Vote defines a vote on a governance proposal. /// A Vote consists of a proposal ID, the voter, and the vote option. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vote { #[prost(uint64, tag = "1")] @@ -73,6 +78,7 @@ pub struct Vote { pub metadata: ::prost::alloc::string::String, } /// DepositParams defines the params for deposits on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DepositParams { /// Minimum deposit for a proposal to enter voting period. @@ -81,16 +87,18 @@ pub struct DepositParams { /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 /// months. #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option<::prost_types::Duration>, + pub max_deposit_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } /// VotingParams defines the params for voting on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VotingParams { /// Length of the voting period. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, + pub voting_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } /// TallyParams defines the params for tallying votes on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyParams { /// Minimum percentage of total stake needed to vote for a result to be @@ -134,6 +142,17 @@ impl VoteOption { VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), + "VOTE_OPTION_YES" => Some(Self::Yes), + "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), + "VOTE_OPTION_NO" => Some(Self::No), + "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), + _ => None, + } + } } /// ProposalStatus enumerates the valid statuses of a proposal. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -172,8 +191,21 @@ impl ProposalStatus { ProposalStatus::Failed => "PROPOSAL_STATUS_FAILED", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Some(Self::DepositPeriod), + "PROPOSAL_STATUS_VOTING_PERIOD" => Some(Self::VotingPeriod), + "PROPOSAL_STATUS_PASSED" => Some(Self::Passed), + "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), + "PROPOSAL_STATUS_FAILED" => Some(Self::Failed), + _ => None, + } + } } /// GenesisState defines the gov module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// starting_proposal_id is the ID of the starting proposal. @@ -199,6 +231,7 @@ pub struct GenesisState { pub tally_params: ::core::option::Option, } /// QueryProposalRequest is the request type for the Query/Proposal RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalRequest { /// proposal_id defines the unique id of the proposal. @@ -206,12 +239,14 @@ pub struct QueryProposalRequest { pub proposal_id: u64, } /// QueryProposalResponse is the response type for the Query/Proposal RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalResponse { #[prost(message, optional, tag = "1")] pub proposal: ::core::option::Option, } /// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsRequest { /// proposal_status defines the status of the proposals. @@ -229,6 +264,7 @@ pub struct QueryProposalsRequest { } /// QueryProposalsResponse is the response type for the Query/Proposals RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsResponse { #[prost(message, repeated, tag = "1")] @@ -238,6 +274,7 @@ pub struct QueryProposalsResponse { pub pagination: ::core::option::Option, } /// QueryVoteRequest is the request type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteRequest { /// proposal_id defines the unique id of the proposal. @@ -248,6 +285,7 @@ pub struct QueryVoteRequest { pub voter: ::prost::alloc::string::String, } /// QueryVoteResponse is the response type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteResponse { /// vote defined the queried vote. @@ -255,6 +293,7 @@ pub struct QueryVoteResponse { pub vote: ::core::option::Option, } /// QueryVotesRequest is the request type for the Query/Votes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesRequest { /// proposal_id defines the unique id of the proposal. @@ -265,6 +304,7 @@ pub struct QueryVotesRequest { pub pagination: ::core::option::Option, } /// QueryVotesResponse is the response type for the Query/Votes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesResponse { /// votes defined the queried votes. @@ -275,6 +315,7 @@ pub struct QueryVotesResponse { pub pagination: ::core::option::Option, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest { /// params_type defines which parameters to query for, can be one of "voting", @@ -283,6 +324,7 @@ pub struct QueryParamsRequest { pub params_type: ::prost::alloc::string::String, } /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// voting_params defines the parameters related to voting. @@ -296,6 +338,7 @@ pub struct QueryParamsResponse { pub tally_params: ::core::option::Option, } /// QueryDepositRequest is the request type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositRequest { /// proposal_id defines the unique id of the proposal. @@ -306,6 +349,7 @@ pub struct QueryDepositRequest { pub depositor: ::prost::alloc::string::String, } /// QueryDepositResponse is the response type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositResponse { /// deposit defines the requested deposit. @@ -313,6 +357,7 @@ pub struct QueryDepositResponse { pub deposit: ::core::option::Option, } /// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositsRequest { /// proposal_id defines the unique id of the proposal. @@ -323,6 +368,7 @@ pub struct QueryDepositsRequest { pub pagination: ::core::option::Option, } /// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositsResponse { #[prost(message, repeated, tag = "1")] @@ -332,6 +378,7 @@ pub struct QueryDepositsResponse { pub pagination: ::core::option::Option, } /// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultRequest { /// proposal_id defines the unique id of the proposal. @@ -339,6 +386,7 @@ pub struct QueryTallyResultRequest { pub proposal_id: u64, } /// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultResponse { /// tally defines the requested tally. @@ -347,10 +395,11 @@ pub struct QueryTallyResultResponse { } /// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary /// proposal Content. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, #[prost(message, repeated, tag = "2")] pub initial_deposit: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] @@ -360,6 +409,7 @@ pub struct MsgSubmitProposal { pub metadata: ::prost::alloc::string::String, } /// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposalResponse { #[prost(uint64, tag = "1")] @@ -367,19 +417,22 @@ pub struct MsgSubmitProposalResponse { } /// MsgExecLegacyContent is used to wrap the legacy content field into a message. /// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecLegacyContent { /// content is the proposal's content. #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::prost_types::Any>, + pub content: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// authority must be the gov module address. #[prost(string, tag = "2")] pub authority: ::prost::alloc::string::String, } /// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecLegacyContentResponse {} /// MsgVote defines a message to cast a vote. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVote { #[prost(uint64, tag = "1")] @@ -392,9 +445,11 @@ pub struct MsgVote { pub metadata: ::prost::alloc::string::String, } /// MsgVoteResponse defines the Msg/Vote response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteResponse {} /// MsgVoteWeighted defines a message to cast a vote. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteWeighted { #[prost(uint64, tag = "1")] @@ -407,9 +462,11 @@ pub struct MsgVoteWeighted { pub metadata: ::prost::alloc::string::String, } /// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteWeightedResponse {} /// MsgDeposit defines a message to submit a deposit to an existing proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDeposit { #[prost(uint64, tag = "1")] @@ -420,6 +477,7 @@ pub struct MsgDeposit { pub amount: ::prost::alloc::vec::Vec, } /// MsgDepositResponse defines the Msg/Deposit response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDepositResponse {} include!("cosmos.gov.v1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs index ede6c2bc..ed1897f5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs @@ -2,6 +2,7 @@ /// WeightedVoteOption defines a unit of vote for vote split. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WeightedVoteOption { #[prost(enumeration = "VoteOption", tag = "1")] @@ -11,6 +12,7 @@ pub struct WeightedVoteOption { } /// TextProposal defines a standard text proposal whose changes need to be /// manually updated in case of approval. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TextProposal { #[prost(string, tag = "1")] @@ -20,6 +22,7 @@ pub struct TextProposal { } /// Deposit defines an amount deposited by an account address to an active /// proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Deposit { #[prost(uint64, tag = "1")] @@ -30,12 +33,13 @@ pub struct Deposit { pub amount: ::prost::alloc::vec::Vec, } /// Proposal defines the core field members of a governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Proposal { #[prost(uint64, tag = "1")] pub proposal_id: u64, #[prost(message, optional, tag = "2")] - pub content: ::core::option::Option<::prost_types::Any>, + pub content: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(enumeration = "ProposalStatus", tag = "3")] pub status: i32, /// final_tally_result is the final tally result of the proposal. When @@ -44,17 +48,18 @@ pub struct Proposal { #[prost(message, optional, tag = "4")] pub final_tally_result: ::core::option::Option, #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, + pub submit_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option<::prost_types::Timestamp>, + pub deposit_end_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, repeated, tag = "7")] pub total_deposit: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option<::prost_types::Timestamp>, + pub voting_start_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option<::prost_types::Timestamp>, + pub voting_end_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// TallyResult defines a standard tally for a governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyResult { #[prost(string, tag = "1")] @@ -68,6 +73,7 @@ pub struct TallyResult { } /// Vote defines a vote on a governance proposal. /// A Vote consists of a proposal ID, the voter, and the vote option. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vote { #[prost(uint64, tag = "1")] @@ -85,6 +91,7 @@ pub struct Vote { pub options: ::prost::alloc::vec::Vec, } /// DepositParams defines the params for deposits on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DepositParams { /// Minimum deposit for a proposal to enter voting period. @@ -93,16 +100,18 @@ pub struct DepositParams { /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 /// months. #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option<::prost_types::Duration>, + pub max_deposit_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } /// VotingParams defines the params for voting on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VotingParams { /// Length of the voting period. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, + pub voting_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } /// TallyParams defines the params for tallying votes on governance proposals. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyParams { /// Minimum percentage of total stake needed to vote for a result to be @@ -146,6 +155,17 @@ impl VoteOption { VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), + "VOTE_OPTION_YES" => Some(Self::Yes), + "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), + "VOTE_OPTION_NO" => Some(Self::No), + "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), + _ => None, + } + } } /// ProposalStatus enumerates the valid statuses of a proposal. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -184,8 +204,21 @@ impl ProposalStatus { ProposalStatus::Failed => "PROPOSAL_STATUS_FAILED", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Some(Self::DepositPeriod), + "PROPOSAL_STATUS_VOTING_PERIOD" => Some(Self::VotingPeriod), + "PROPOSAL_STATUS_PASSED" => Some(Self::Passed), + "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), + "PROPOSAL_STATUS_FAILED" => Some(Self::Failed), + _ => None, + } + } } /// GenesisState defines the gov module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// starting_proposal_id is the ID of the starting proposal. @@ -211,6 +244,7 @@ pub struct GenesisState { pub tally_params: ::core::option::Option, } /// QueryProposalRequest is the request type for the Query/Proposal RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalRequest { /// proposal_id defines the unique id of the proposal. @@ -218,12 +252,14 @@ pub struct QueryProposalRequest { pub proposal_id: u64, } /// QueryProposalResponse is the response type for the Query/Proposal RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalResponse { #[prost(message, optional, tag = "1")] pub proposal: ::core::option::Option, } /// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsRequest { /// proposal_status defines the status of the proposals. @@ -241,6 +277,7 @@ pub struct QueryProposalsRequest { } /// QueryProposalsResponse is the response type for the Query/Proposals RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsResponse { #[prost(message, repeated, tag = "1")] @@ -250,6 +287,7 @@ pub struct QueryProposalsResponse { pub pagination: ::core::option::Option, } /// QueryVoteRequest is the request type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteRequest { /// proposal_id defines the unique id of the proposal. @@ -260,6 +298,7 @@ pub struct QueryVoteRequest { pub voter: ::prost::alloc::string::String, } /// QueryVoteResponse is the response type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteResponse { /// vote defined the queried vote. @@ -267,6 +306,7 @@ pub struct QueryVoteResponse { pub vote: ::core::option::Option, } /// QueryVotesRequest is the request type for the Query/Votes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesRequest { /// proposal_id defines the unique id of the proposal. @@ -277,6 +317,7 @@ pub struct QueryVotesRequest { pub pagination: ::core::option::Option, } /// QueryVotesResponse is the response type for the Query/Votes RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesResponse { /// votes defined the queried votes. @@ -287,6 +328,7 @@ pub struct QueryVotesResponse { pub pagination: ::core::option::Option, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest { /// params_type defines which parameters to query for, can be one of "voting", @@ -295,6 +337,7 @@ pub struct QueryParamsRequest { pub params_type: ::prost::alloc::string::String, } /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// voting_params defines the parameters related to voting. @@ -308,6 +351,7 @@ pub struct QueryParamsResponse { pub tally_params: ::core::option::Option, } /// QueryDepositRequest is the request type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositRequest { /// proposal_id defines the unique id of the proposal. @@ -318,6 +362,7 @@ pub struct QueryDepositRequest { pub depositor: ::prost::alloc::string::String, } /// QueryDepositResponse is the response type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositResponse { /// deposit defines the requested deposit. @@ -325,6 +370,7 @@ pub struct QueryDepositResponse { pub deposit: ::core::option::Option, } /// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositsRequest { /// proposal_id defines the unique id of the proposal. @@ -335,6 +381,7 @@ pub struct QueryDepositsRequest { pub pagination: ::core::option::Option, } /// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDepositsResponse { #[prost(message, repeated, tag = "1")] @@ -344,6 +391,7 @@ pub struct QueryDepositsResponse { pub pagination: ::core::option::Option, } /// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultRequest { /// proposal_id defines the unique id of the proposal. @@ -351,6 +399,7 @@ pub struct QueryTallyResultRequest { pub proposal_id: u64, } /// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultResponse { /// tally defines the requested tally. @@ -359,22 +408,25 @@ pub struct QueryTallyResultResponse { } /// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary /// proposal Content. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::prost_types::Any>, + pub content: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, repeated, tag = "2")] pub initial_deposit: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] pub proposer: ::prost::alloc::string::String, } /// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposalResponse { #[prost(uint64, tag = "1")] pub proposal_id: u64, } /// MsgVote defines a message to cast a vote. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVote { #[prost(uint64, tag = "1")] @@ -385,11 +437,13 @@ pub struct MsgVote { pub option: i32, } /// MsgVoteResponse defines the Msg/Vote response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteResponse {} /// MsgVoteWeighted defines a message to cast a vote. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteWeighted { #[prost(uint64, tag = "1")] @@ -402,9 +456,11 @@ pub struct MsgVoteWeighted { /// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteWeightedResponse {} /// MsgDeposit defines a message to submit a deposit to an existing proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDeposit { #[prost(uint64, tag = "1")] @@ -415,6 +471,7 @@ pub struct MsgDeposit { pub amount: ::prost::alloc::vec::Vec, } /// MsgDepositResponse defines the Msg/Deposit response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDepositResponse {} include!("cosmos.gov.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs index 4184a346..d824204b 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs @@ -1,6 +1,7 @@ // @generated /// Member represents a group member with an account address, /// non-zero weight, metadata and added_at timestamp. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { /// address is the member's account address. @@ -14,11 +15,12 @@ pub struct Member { pub metadata: ::prost::alloc::string::String, /// added_at is a timestamp specifying when a member was added. #[prost(message, optional, tag = "4")] - pub added_at: ::core::option::Option<::prost_types::Timestamp>, + pub added_at: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// MemberRequest represents a group member to be used in Msg server requests. /// Contrary to `Member`, it doesn't have any `added_at` field /// since this field cannot be set as part of requests. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MemberRequest { /// address is the member's account address. @@ -37,6 +39,7 @@ pub struct MemberRequest { /// `threshold`. /// 2. The voting and execution periods of the proposal respect the parameters /// given by `windows`. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ThresholdDecisionPolicy { /// threshold is the minimum weighted sum of `YES` votes that must be met or @@ -53,6 +56,7 @@ pub struct ThresholdDecisionPolicy { /// is greater or equal than the given `percentage`. /// 2. The voting and execution periods of the proposal respect the parameters /// given by `windows`. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PercentageDecisionPolicy { /// percentage is the minimum percentage the weighted sum of `YES` votes must @@ -64,16 +68,17 @@ pub struct PercentageDecisionPolicy { pub windows: ::core::option::Option, } /// DecisionPolicyWindows defines the different windows for voting and execution. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecisionPolicyWindows { /// voting_period is the duration from submission of a proposal to the end of voting period /// Within this times votes can be submitted with MsgVote. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::prost_types::Duration>, + pub voting_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// min_execution_period is the minimum duration after the proposal submission /// where members can start sending MsgExec. This means that the window for /// sending a MsgExec transaction is: - /// `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` + /// `\[ submission + min_execution_period ; submission + voting_period + max_execution_period\]` /// where max_execution_period is a app-specific config, defined in the keeper. /// If not set, min_execution_period will default to 0. /// @@ -82,13 +87,15 @@ pub struct DecisionPolicyWindows { /// is empty, meaning that all proposals created with this decision policy /// won't be able to be executed. #[prost(message, optional, tag = "2")] - pub min_execution_period: ::core::option::Option<::prost_types::Duration>, + pub min_execution_period: + ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } // // State // /// GroupInfo represents the high-level on-chain information for a group. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupInfo { /// id is the unique ID of the group. @@ -111,9 +118,10 @@ pub struct GroupInfo { pub total_weight: ::prost::alloc::string::String, /// created_at is a timestamp specifying when a group was created. #[prost(message, optional, tag = "6")] - pub created_at: ::core::option::Option<::prost_types::Timestamp>, + pub created_at: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// GroupMember represents the relationship between a group and a member. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupMember { /// group_id is the unique ID of the group. @@ -124,6 +132,7 @@ pub struct GroupMember { pub member: ::core::option::Option, } /// GroupPolicyInfo represents the high-level on-chain information for a group policy. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupPolicyInfo { /// address is the account address of group policy. @@ -144,15 +153,16 @@ pub struct GroupPolicyInfo { pub version: u64, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, + pub decision_policy: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// created_at is a timestamp specifying when a group policy was created. #[prost(message, optional, tag = "7")] - pub created_at: ::core::option::Option<::prost_types::Timestamp>, + pub created_at: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// Proposal defines a group proposal. Any member of a group can submit a proposal /// for a group policy to decide upon. /// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal /// passes as well as some optional metadata associated with the proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Proposal { /// id is the unique id of the proposal. @@ -169,7 +179,7 @@ pub struct Proposal { pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// submit_time is a timestamp specifying when a proposal was submitted. #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, + pub submit_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// group_version tracks the version of the group at proposal submission. /// This field is here for informational purposes only. #[prost(uint64, tag = "6")] @@ -195,15 +205,16 @@ pub struct Proposal { /// at this point, and the `final_tally_result`and `status` fields will be /// accordingly updated. #[prost(message, optional, tag = "10")] - pub voting_period_end: ::core::option::Option<::prost_types::Timestamp>, + pub voting_period_end: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// executor_result is the final result of the proposal execution. Initial value is NotRun. #[prost(enumeration = "ProposalExecutorResult", tag = "11")] pub executor_result: i32, /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. #[prost(message, repeated, tag = "12")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// TallyResult represents the sum of weighted votes for each vote option. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TallyResult { /// yes_count is the weighted sum of yes votes. @@ -220,6 +231,7 @@ pub struct TallyResult { pub no_with_veto_count: ::prost::alloc::string::String, } /// Vote represents a vote for a proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vote { /// proposal is the unique ID of the proposal. @@ -236,7 +248,7 @@ pub struct Vote { pub metadata: ::prost::alloc::string::String, /// submit_time is the timestamp when the vote was submitted. #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::prost_types::Timestamp>, + pub submit_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// VoteOption enumerates the valid vote options for a given proposal. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -268,6 +280,17 @@ impl VoteOption { VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), + "VOTE_OPTION_YES" => Some(Self::Yes), + "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), + "VOTE_OPTION_NO" => Some(Self::No), + "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), + _ => None, + } + } } /// ProposalStatus defines proposal statuses. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -305,6 +328,18 @@ impl ProposalStatus { ProposalStatus::Withdrawn => "PROPOSAL_STATUS_WITHDRAWN", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "PROPOSAL_STATUS_SUBMITTED" => Some(Self::Submitted), + "PROPOSAL_STATUS_ACCEPTED" => Some(Self::Accepted), + "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), + "PROPOSAL_STATUS_ABORTED" => Some(Self::Aborted), + "PROPOSAL_STATUS_WITHDRAWN" => Some(Self::Withdrawn), + _ => None, + } + } } /// ProposalExecutorResult defines types of proposal executor results. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -332,8 +367,19 @@ impl ProposalExecutorResult { ProposalExecutorResult::Failure => "PROPOSAL_EXECUTOR_RESULT_FAILURE", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED" => Some(Self::Unspecified), + "PROPOSAL_EXECUTOR_RESULT_NOT_RUN" => Some(Self::NotRun), + "PROPOSAL_EXECUTOR_RESULT_SUCCESS" => Some(Self::Success), + "PROPOSAL_EXECUTOR_RESULT_FAILURE" => Some(Self::Failure), + _ => None, + } + } } /// EventCreateGroup is an event emitted when a group is created. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventCreateGroup { /// group_id is the unique ID of the group. @@ -341,6 +387,7 @@ pub struct EventCreateGroup { pub group_id: u64, } /// EventUpdateGroup is an event emitted when a group is updated. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventUpdateGroup { /// group_id is the unique ID of the group. @@ -348,6 +395,7 @@ pub struct EventUpdateGroup { pub group_id: u64, } /// EventCreateGroupPolicy is an event emitted when a group policy is created. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventCreateGroupPolicy { /// address is the account address of the group policy. @@ -355,6 +403,7 @@ pub struct EventCreateGroupPolicy { pub address: ::prost::alloc::string::String, } /// EventUpdateGroupPolicy is an event emitted when a group policy is updated. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventUpdateGroupPolicy { /// address is the account address of the group policy. @@ -362,6 +411,7 @@ pub struct EventUpdateGroupPolicy { pub address: ::prost::alloc::string::String, } /// EventSubmitProposal is an event emitted when a proposal is created. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventSubmitProposal { /// proposal_id is the unique ID of the proposal. @@ -369,6 +419,7 @@ pub struct EventSubmitProposal { pub proposal_id: u64, } /// EventWithdrawProposal is an event emitted when a proposal is withdrawn. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventWithdrawProposal { /// proposal_id is the unique ID of the proposal. @@ -376,6 +427,7 @@ pub struct EventWithdrawProposal { pub proposal_id: u64, } /// EventVote is an event emitted when a voter votes on a proposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventVote { /// proposal_id is the unique ID of the proposal. @@ -383,6 +435,7 @@ pub struct EventVote { pub proposal_id: u64, } /// EventExec is an event emitted when a proposal is executed. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventExec { /// proposal_id is the unique ID of the proposal. @@ -396,6 +449,7 @@ pub struct EventExec { pub logs: ::prost::alloc::string::String, } /// EventLeaveGroup is an event emitted when group member leaves the group. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventLeaveGroup { /// group_id is the unique ID of the group. @@ -406,6 +460,7 @@ pub struct EventLeaveGroup { pub address: ::prost::alloc::string::String, } /// EventProposalPruned is an event emitted when a proposal is pruned. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventProposalPruned { /// proposal_id is the unique ID of the proposal. @@ -419,6 +474,7 @@ pub struct EventProposalPruned { pub tally_result: ::core::option::Option, } /// GenesisState defines the group module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// group_seq is the group table orm.Sequence, @@ -450,6 +506,7 @@ pub struct GenesisState { pub votes: ::prost::alloc::vec::Vec, } /// QueryGroupInfoRequest is the Query/GroupInfo request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupInfoRequest { /// group_id is the unique ID of the group. @@ -457,6 +514,7 @@ pub struct QueryGroupInfoRequest { pub group_id: u64, } /// QueryGroupInfoResponse is the Query/GroupInfo response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupInfoResponse { /// info is the GroupInfo for the group. @@ -464,6 +522,7 @@ pub struct QueryGroupInfoResponse { pub info: ::core::option::Option, } /// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPolicyInfoRequest { /// address is the account address of the group policy. @@ -471,6 +530,7 @@ pub struct QueryGroupPolicyInfoRequest { pub address: ::prost::alloc::string::String, } /// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPolicyInfoResponse { /// info is the GroupPolicyInfo for the group policy. @@ -478,6 +538,7 @@ pub struct QueryGroupPolicyInfoResponse { pub info: ::core::option::Option, } /// QueryGroupMembersRequest is the Query/GroupMembers request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupMembersRequest { /// group_id is the unique ID of the group. @@ -488,6 +549,7 @@ pub struct QueryGroupMembersRequest { pub pagination: ::core::option::Option, } /// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupMembersResponse { /// members are the members of the group with given group_id. @@ -498,6 +560,7 @@ pub struct QueryGroupMembersResponse { pub pagination: ::core::option::Option, } /// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsByAdminRequest { /// admin is the account address of a group's admin. @@ -508,6 +571,7 @@ pub struct QueryGroupsByAdminRequest { pub pagination: ::core::option::Option, } /// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsByAdminResponse { /// groups are the groups info with the provided admin. @@ -518,6 +582,7 @@ pub struct QueryGroupsByAdminResponse { pub pagination: ::core::option::Option, } /// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPoliciesByGroupRequest { /// group_id is the unique ID of the group policy's group. @@ -528,6 +593,7 @@ pub struct QueryGroupPoliciesByGroupRequest { pub pagination: ::core::option::Option, } /// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPoliciesByGroupResponse { /// group_policies are the group policies info associated with the provided group. @@ -538,6 +604,7 @@ pub struct QueryGroupPoliciesByGroupResponse { pub pagination: ::core::option::Option, } /// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPoliciesByAdminRequest { /// admin is the admin address of the group policy. @@ -548,6 +615,7 @@ pub struct QueryGroupPoliciesByAdminRequest { pub pagination: ::core::option::Option, } /// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupPoliciesByAdminResponse { /// group_policies are the group policies info with provided admin. @@ -558,6 +626,7 @@ pub struct QueryGroupPoliciesByAdminResponse { pub pagination: ::core::option::Option, } /// QueryProposalRequest is the Query/Proposal request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalRequest { /// proposal_id is the unique ID of a proposal. @@ -565,6 +634,7 @@ pub struct QueryProposalRequest { pub proposal_id: u64, } /// QueryProposalResponse is the Query/Proposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalResponse { /// proposal is the proposal info. @@ -572,6 +642,7 @@ pub struct QueryProposalResponse { pub proposal: ::core::option::Option, } /// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsByGroupPolicyRequest { /// address is the account address of the group policy related to proposals. @@ -582,6 +653,7 @@ pub struct QueryProposalsByGroupPolicyRequest { pub pagination: ::core::option::Option, } /// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryProposalsByGroupPolicyResponse { /// proposals are the proposals with given group policy. @@ -592,6 +664,7 @@ pub struct QueryProposalsByGroupPolicyResponse { pub pagination: ::core::option::Option, } /// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteByProposalVoterRequest { /// proposal_id is the unique ID of a proposal. @@ -602,6 +675,7 @@ pub struct QueryVoteByProposalVoterRequest { pub voter: ::prost::alloc::string::String, } /// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVoteByProposalVoterResponse { /// vote is the vote with given proposal_id and voter. @@ -609,6 +683,7 @@ pub struct QueryVoteByProposalVoterResponse { pub vote: ::core::option::Option, } /// QueryVotesByProposalRequest is the Query/VotesByProposal request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesByProposalRequest { /// proposal_id is the unique ID of a proposal. @@ -619,6 +694,7 @@ pub struct QueryVotesByProposalRequest { pub pagination: ::core::option::Option, } /// QueryVotesByProposalResponse is the Query/VotesByProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesByProposalResponse { /// votes are the list of votes for given proposal_id. @@ -629,6 +705,7 @@ pub struct QueryVotesByProposalResponse { pub pagination: ::core::option::Option, } /// QueryVotesByVoterRequest is the Query/VotesByVoter request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesByVoterRequest { /// voter is a proposal voter account address. @@ -639,6 +716,7 @@ pub struct QueryVotesByVoterRequest { pub pagination: ::core::option::Option, } /// QueryVotesByVoterResponse is the Query/VotesByVoter response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryVotesByVoterResponse { /// votes are the list of votes by given voter. @@ -649,6 +727,7 @@ pub struct QueryVotesByVoterResponse { pub pagination: ::core::option::Option, } /// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsByMemberRequest { /// address is the group member address. @@ -659,6 +738,7 @@ pub struct QueryGroupsByMemberRequest { pub pagination: ::core::option::Option, } /// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsByMemberResponse { /// groups are the groups info with the provided group member. @@ -669,6 +749,7 @@ pub struct QueryGroupsByMemberResponse { pub pagination: ::core::option::Option, } /// QueryTallyResultRequest is the Query/TallyResult request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultRequest { /// proposal_id is the unique id of a proposal. @@ -676,6 +757,7 @@ pub struct QueryTallyResultRequest { pub proposal_id: u64, } /// QueryTallyResultResponse is the Query/TallyResult response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTallyResultResponse { /// tally defines the requested tally. @@ -685,6 +767,7 @@ pub struct QueryTallyResultResponse { /// QueryGroupsRequest is the Query/Groups request type. /// /// Since: cosmos-sdk 0.47.1 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsRequest { /// pagination defines an optional pagination for the request. @@ -694,6 +777,7 @@ pub struct QueryGroupsRequest { /// QueryGroupsResponse is the Query/Groups response type. /// /// Since: cosmos-sdk 0.47.1 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsResponse { /// `groups` is all the groups present in state. @@ -708,6 +792,7 @@ pub struct QueryGroupsResponse { // /// MsgCreateGroup is the Msg/CreateGroup request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroup { /// admin is the account address of the group admin. @@ -721,6 +806,7 @@ pub struct MsgCreateGroup { pub metadata: ::prost::alloc::string::String, } /// MsgCreateGroupResponse is the Msg/CreateGroup response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupResponse { /// group_id is the unique ID of the newly created group. @@ -728,6 +814,7 @@ pub struct MsgCreateGroupResponse { pub group_id: u64, } /// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupMembers { /// admin is the account address of the group admin. @@ -742,9 +829,11 @@ pub struct MsgUpdateGroupMembers { pub member_updates: ::prost::alloc::vec::Vec, } /// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupMembersResponse {} /// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupAdmin { /// admin is the current account address of the group admin. @@ -758,9 +847,11 @@ pub struct MsgUpdateGroupAdmin { pub new_admin: ::prost::alloc::string::String, } /// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupAdminResponse {} /// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupMetadata { /// admin is the account address of the group admin. @@ -774,6 +865,7 @@ pub struct MsgUpdateGroupMetadata { pub metadata: ::prost::alloc::string::String, } /// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupMetadataResponse {} // @@ -781,6 +873,7 @@ pub struct MsgUpdateGroupMetadataResponse {} // /// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupPolicy { /// admin is the account address of the group admin. @@ -794,9 +887,10 @@ pub struct MsgCreateGroupPolicy { pub metadata: ::prost::alloc::string::String, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "4")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, + pub decision_policy: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupPolicyResponse { /// address is the account address of the newly created group policy. @@ -804,6 +898,7 @@ pub struct MsgCreateGroupPolicyResponse { pub address: ::prost::alloc::string::String, } /// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyAdmin { /// admin is the account address of the group admin. @@ -817,6 +912,7 @@ pub struct MsgUpdateGroupPolicyAdmin { pub new_admin: ::prost::alloc::string::String, } /// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupWithPolicy { /// admin is the account address of the group and group policy admin. @@ -837,9 +933,10 @@ pub struct MsgCreateGroupWithPolicy { pub group_policy_as_admin: bool, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, + pub decision_policy: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateGroupWithPolicyResponse { /// group_id is the unique ID of the newly created group with policy. @@ -850,9 +947,11 @@ pub struct MsgCreateGroupWithPolicyResponse { pub group_policy_address: ::prost::alloc::string::String, } /// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyAdminResponse {} /// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyDecisionPolicy { /// admin is the account address of the group admin. @@ -863,12 +962,14 @@ pub struct MsgUpdateGroupPolicyDecisionPolicy { pub group_policy_address: ::prost::alloc::string::String, /// decision_policy is the updated group policy's decision policy. #[prost(message, optional, tag = "3")] - pub decision_policy: ::core::option::Option<::prost_types::Any>, + pub decision_policy: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyDecisionPolicyResponse {} /// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyMetadata { /// admin is the account address of the group admin. @@ -882,9 +983,11 @@ pub struct MsgUpdateGroupPolicyMetadata { pub metadata: ::prost::alloc::string::String, } /// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateGroupPolicyMetadataResponse {} /// MsgSubmitProposal is the Msg/SubmitProposal request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { /// group_policy_address is the account address of group policy. @@ -899,7 +1002,7 @@ pub struct MsgSubmitProposal { pub metadata: ::prost::alloc::string::String, /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. #[prost(message, repeated, tag = "4")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// exec defines the mode of execution of the proposal, /// whether it should be executed immediately on creation or not. /// If so, proposers signatures are considered as Yes votes. @@ -907,6 +1010,7 @@ pub struct MsgSubmitProposal { pub exec: i32, } /// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposalResponse { /// proposal is the unique ID of the proposal. @@ -914,6 +1018,7 @@ pub struct MsgSubmitProposalResponse { pub proposal_id: u64, } /// MsgWithdrawProposal is the Msg/WithdrawProposal request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawProposal { /// proposal is the unique ID of the proposal. @@ -924,9 +1029,11 @@ pub struct MsgWithdrawProposal { pub address: ::prost::alloc::string::String, } /// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgWithdrawProposalResponse {} /// MsgVote is the Msg/Vote request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVote { /// proposal is the unique ID of the proposal. @@ -947,9 +1054,11 @@ pub struct MsgVote { pub exec: i32, } /// MsgVoteResponse is the Msg/Vote response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgVoteResponse {} /// MsgExec is the Msg/Exec request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExec { /// proposal is the unique ID of the proposal. @@ -960,6 +1069,7 @@ pub struct MsgExec { pub executor: ::prost::alloc::string::String, } /// MsgExecResponse is the Msg/Exec request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecResponse { /// result is the final result of the proposal execution. @@ -967,6 +1077,7 @@ pub struct MsgExecResponse { pub result: i32, } /// MsgLeaveGroup is the Msg/LeaveGroup request type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgLeaveGroup { /// address is the account address of the group member. @@ -977,6 +1088,7 @@ pub struct MsgLeaveGroup { pub group_id: u64, } /// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgLeaveGroupResponse {} // @@ -1007,6 +1119,14 @@ impl Exec { Exec::Try => "EXEC_TRY", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXEC_UNSPECIFIED" => Some(Self::Unspecified), + "EXEC_TRY" => Some(Self::Try), + _ => None, + } + } } include!("cosmos.group.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs index 70d49802..06dfcff7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Minter represents the minting state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Minter { /// current annual inflation rate @@ -10,6 +11,7 @@ pub struct Minter { pub annual_provisions: ::prost::alloc::string::String, } /// Params holds parameters for the mint module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { /// type of coin to mint @@ -32,6 +34,7 @@ pub struct Params { pub blocks_per_year: u64, } /// GenesisState defines the mint module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// minter is a space for holding current inflation information. @@ -42,9 +45,11 @@ pub struct GenesisState { pub params: ::core::option::Option, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. @@ -52,10 +57,12 @@ pub struct QueryParamsResponse { pub params: ::core::option::Option, } /// QueryInflationRequest is the request type for the Query/Inflation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryInflationRequest {} /// QueryInflationResponse is the response type for the Query/Inflation RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryInflationResponse { /// inflation is the current minting inflation value. @@ -64,10 +71,12 @@ pub struct QueryInflationResponse { } /// QueryAnnualProvisionsRequest is the request type for the /// Query/AnnualProvisions RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAnnualProvisionsRequest {} /// QueryAnnualProvisionsResponse is the response type for the /// Query/AnnualProvisions RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAnnualProvisionsResponse { /// annual_provisions is the current minting annual provisions value. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs index 9c48b679..b6eaf039 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// EventSend is emitted on Msg/Send +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventSend { #[prost(string, tag = "1")] @@ -12,6 +13,7 @@ pub struct EventSend { pub receiver: ::prost::alloc::string::String, } /// EventMint is emitted on Mint +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventMint { #[prost(string, tag = "1")] @@ -22,6 +24,7 @@ pub struct EventMint { pub owner: ::prost::alloc::string::String, } /// EventBurn is emitted on Burn +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventBurn { #[prost(string, tag = "1")] @@ -32,6 +35,7 @@ pub struct EventBurn { pub owner: ::prost::alloc::string::String, } /// Class defines the class of the nft type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Class { /// id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 @@ -54,9 +58,10 @@ pub struct Class { pub uri_hash: ::prost::alloc::string::String, /// data is the app specific metadata of the NFT class. Optional #[prost(message, optional, tag = "7")] - pub data: ::core::option::Option<::prost_types::Any>, + pub data: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// NFT defines the NFT. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Nft { /// class_id associated with the NFT, similar to the contract address of ERC721 @@ -73,9 +78,10 @@ pub struct Nft { pub uri_hash: ::prost::alloc::string::String, /// data is an app specific data of the NFT. Optional #[prost(message, optional, tag = "10")] - pub data: ::core::option::Option<::prost_types::Any>, + pub data: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// GenesisState defines the nft module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// class defines the class of the nft type. @@ -85,6 +91,7 @@ pub struct GenesisState { pub entries: ::prost::alloc::vec::Vec, } /// Entry Defines all nft owned by a person +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entry { /// owner is the owner address of the following nft @@ -95,6 +102,7 @@ pub struct Entry { pub nfts: ::prost::alloc::vec::Vec, } /// QueryBalanceRequest is the request type for the Query/Balance RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBalanceRequest { #[prost(string, tag = "1")] @@ -103,12 +111,14 @@ pub struct QueryBalanceRequest { pub owner: ::prost::alloc::string::String, } /// QueryBalanceResponse is the response type for the Query/Balance RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBalanceResponse { #[prost(uint64, tag = "1")] pub amount: u64, } /// QueryOwnerRequest is the request type for the Query/Owner RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryOwnerRequest { #[prost(string, tag = "1")] @@ -117,24 +127,28 @@ pub struct QueryOwnerRequest { pub id: ::prost::alloc::string::String, } /// QueryOwnerResponse is the response type for the Query/Owner RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryOwnerResponse { #[prost(string, tag = "1")] pub owner: ::prost::alloc::string::String, } /// QuerySupplyRequest is the request type for the Query/Supply RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySupplyRequest { #[prost(string, tag = "1")] pub class_id: ::prost::alloc::string::String, } /// QuerySupplyResponse is the response type for the Query/Supply RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySupplyResponse { #[prost(uint64, tag = "1")] pub amount: u64, } /// QueryNFTstRequest is the request type for the Query/NFTs RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryNfTsRequest { #[prost(string, tag = "1")] @@ -145,6 +159,7 @@ pub struct QueryNfTsRequest { pub pagination: ::core::option::Option, } /// QueryNFTsResponse is the response type for the Query/NFTs RPC methods +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryNfTsResponse { #[prost(message, repeated, tag = "1")] @@ -153,6 +168,7 @@ pub struct QueryNfTsResponse { pub pagination: ::core::option::Option, } /// QueryNFTRequest is the request type for the Query/NFT RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryNftRequest { #[prost(string, tag = "1")] @@ -161,24 +177,28 @@ pub struct QueryNftRequest { pub id: ::prost::alloc::string::String, } /// QueryNFTResponse is the response type for the Query/NFT RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryNftResponse { #[prost(message, optional, tag = "1")] pub nft: ::core::option::Option, } /// QueryClassRequest is the request type for the Query/Class RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryClassRequest { #[prost(string, tag = "1")] pub class_id: ::prost::alloc::string::String, } /// QueryClassResponse is the response type for the Query/Class RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryClassResponse { #[prost(message, optional, tag = "1")] pub class: ::core::option::Option, } /// QueryClassesRequest is the request type for the Query/Classes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryClassesRequest { /// pagination defines an optional pagination for the request. @@ -186,6 +206,7 @@ pub struct QueryClassesRequest { pub pagination: ::core::option::Option, } /// QueryClassesResponse is the response type for the Query/Classes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryClassesResponse { #[prost(message, repeated, tag = "1")] @@ -194,6 +215,7 @@ pub struct QueryClassesResponse { pub pagination: ::core::option::Option, } /// MsgSend represents a message to send a nft from one account to another account. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSend { /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 @@ -210,6 +232,7 @@ pub struct MsgSend { pub receiver: ::prost::alloc::string::String, } /// MsgSendResponse defines the Msg/Send response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSendResponse {} include!("cosmos.nft.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs index f73da631..02431f9e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.rs @@ -2,6 +2,7 @@ /// Module defines the ORM module which adds providers to the app container for /// module-scoped DB's. In the future it may provide gRPC services for interacting /// with ORM data. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module {} // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs index 8f1615c5..5d3a362f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.rs @@ -1,5 +1,6 @@ // @generated /// TableDescriptor describes an ORM table. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TableDescriptor { /// primary_key defines the primary key for the table. @@ -15,6 +16,7 @@ pub struct TableDescriptor { pub id: u32, } /// PrimaryKeyDescriptor describes a table primary key. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrimaryKeyDescriptor { /// fields is a comma-separated list of fields in the primary key. Spaces are @@ -56,6 +58,7 @@ pub struct PrimaryKeyDescriptor { pub auto_increment: bool, } /// PrimaryKeyDescriptor describes a table secondary index. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SecondaryIndexDescriptor { /// fields is a comma-separated list of fields in the index. The supported @@ -79,6 +82,7 @@ pub struct SecondaryIndexDescriptor { pub unique: bool, } /// TableDescriptor describes an ORM singleton table which has at most one instance. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SingletonDescriptor { /// id is a non-zero integer ID that must be unique within the diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs index 9122e8ad..e5c5e548 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.rs @@ -1,5 +1,6 @@ // @generated /// ModuleSchemaDescriptor describe's a module's ORM schema. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleSchemaDescriptor { #[prost(message, repeated, tag = "1")] @@ -12,6 +13,7 @@ pub struct ModuleSchemaDescriptor { /// Nested message and enum types in `ModuleSchemaDescriptor`. pub mod module_schema_descriptor { /// FileEntry describes an ORM file used in a module. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FileEntry { /// id is a prefix that will be varint encoded and prepended to all the @@ -78,5 +80,16 @@ impl StorageType { StorageType::Commitment => "STORAGE_TYPE_COMMITMENT", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STORAGE_TYPE_DEFAULT_UNSPECIFIED" => Some(Self::DefaultUnspecified), + "STORAGE_TYPE_MEMORY" => Some(Self::Memory), + "STORAGE_TYPE_TRANSIENT" => Some(Self::Transient), + "STORAGE_TYPE_INDEX" => Some(Self::Index), + "STORAGE_TYPE_COMMITMENT" => Some(Self::Commitment), + _ => None, + } + } } // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs index 59c20e5d..637fa514 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// ParameterChangeProposal defines a proposal to change one or more parameters. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParameterChangeProposal { #[prost(string, tag = "1")] @@ -11,6 +12,7 @@ pub struct ParameterChangeProposal { } /// ParamChange defines an individual parameter change, for use in /// ParameterChangeProposal. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParamChange { #[prost(string, tag = "1")] @@ -21,6 +23,7 @@ pub struct ParamChange { pub value: ::prost::alloc::string::String, } /// QueryParamsRequest is request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest { /// subspace defines the module to query the parameter for. @@ -31,6 +34,7 @@ pub struct QueryParamsRequest { pub key: ::prost::alloc::string::String, } /// QueryParamsResponse is response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// param defines the queried parameter. @@ -41,12 +45,14 @@ pub struct QueryParamsResponse { /// subspaces and all keys for a subspace. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySubspacesRequest {} /// QuerySubspacesResponse defines the response types for querying for all /// registered subspaces and all keys for a subspace. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySubspacesResponse { #[prost(message, repeated, tag = "1")] @@ -56,6 +62,7 @@ pub struct QuerySubspacesResponse { /// the subspace. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Subspace { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs index 31d12936..2992bdb9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// ValidatorSigningInfo defines a validator's signing info for monitoring their /// liveness activity. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorSigningInfo { #[prost(string, tag = "1")] @@ -15,7 +16,7 @@ pub struct ValidatorSigningInfo { pub index_offset: i64, /// Timestamp until which the validator is jailed due to liveness downtime. #[prost(message, optional, tag = "4")] - pub jailed_until: ::core::option::Option<::prost_types::Timestamp>, + pub jailed_until: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// Whether or not a validator has been tombstoned (killed out of validator set). It is set /// once the validator commits an equivocation or for any other configured misbehiavor. #[prost(bool, tag = "5")] @@ -26,6 +27,7 @@ pub struct ValidatorSigningInfo { pub missed_blocks_counter: i64, } /// Params represents the parameters used for by the slashing module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(int64, tag = "1")] @@ -33,13 +35,15 @@ pub struct Params { #[prost(bytes = "vec", tag = "2")] pub min_signed_per_window: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] - pub downtime_jail_duration: ::core::option::Option<::prost_types::Duration>, + pub downtime_jail_duration: + ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, #[prost(bytes = "vec", tag = "4")] pub slash_fraction_double_sign: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "5")] pub slash_fraction_downtime: ::prost::alloc::vec::Vec, } /// GenesisState defines the slashing module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of related to deposit. @@ -55,6 +59,7 @@ pub struct GenesisState { pub missed_blocks: ::prost::alloc::vec::Vec, } /// SigningInfo stores validator signing info of corresponding address. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SigningInfo { /// address is the validator address. @@ -66,6 +71,7 @@ pub struct SigningInfo { } /// ValidatorMissedBlocks contains array of missed blocks of corresponding /// address. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorMissedBlocks { /// address is the validator address. @@ -76,6 +82,7 @@ pub struct ValidatorMissedBlocks { pub missed_blocks: ::prost::alloc::vec::Vec, } /// MissedBlock contains height and missed status as boolean. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MissedBlock { /// index is the height at which the block was missed. @@ -86,9 +93,11 @@ pub struct MissedBlock { pub missed: bool, } /// QueryParamsRequest is the request type for the Query/Params RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { #[prost(message, optional, tag = "1")] @@ -96,6 +105,7 @@ pub struct QueryParamsResponse { } /// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySigningInfoRequest { /// cons_address is the address to query signing info of @@ -104,6 +114,7 @@ pub struct QuerySigningInfoRequest { } /// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySigningInfoResponse { /// val_signing_info is the signing info of requested val cons address @@ -112,6 +123,7 @@ pub struct QuerySigningInfoResponse { } /// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySigningInfosRequest { #[prost(message, optional, tag = "1")] @@ -119,6 +131,7 @@ pub struct QuerySigningInfosRequest { } /// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySigningInfosResponse { /// info is the signing info of all validators @@ -128,12 +141,14 @@ pub struct QuerySigningInfosResponse { pub pagination: ::core::option::Option, } /// MsgUnjail defines the Msg/Unjail request type +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUnjail { #[prost(string, tag = "1")] pub validator_addr: ::prost::alloc::string::String, } /// MsgUnjailResponse defines the Msg/Unjail response type +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUnjailResponse {} include!("cosmos.slashing.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs index 0695b59e..886e1139 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs @@ -2,6 +2,7 @@ /// StakeAuthorization defines authorization for delegate/undelegate/redelegate. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StakeAuthorization { /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is @@ -18,12 +19,14 @@ pub struct StakeAuthorization { /// Nested message and enum types in `StakeAuthorization`. pub mod stake_authorization { /// Validators defines list of validator addresses. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Validators { #[prost(string, repeated, tag = "1")] pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// validators is the oneof that represents either allow_list or deny_list + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Policy { /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's @@ -63,11 +66,22 @@ impl AuthorizationType { AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), + "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), + "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), + _ => None, + } + } } /// HistoricalInfo contains header and validator information for a given block. /// It is stored as part of staking module's state, which persists the `n` most /// recent HistoricalInfo /// (`n` is set by the staking module's `historical_entries` parameter). +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HistoricalInfo { #[prost(message, optional, tag = "1")] @@ -77,6 +91,7 @@ pub struct HistoricalInfo { } /// CommissionRates defines the initial commission rates to be used for creating /// a validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommissionRates { /// rate is the commission rate charged to delegators, as a fraction. @@ -90,6 +105,7 @@ pub struct CommissionRates { pub max_change_rate: ::prost::alloc::string::String, } /// Commission defines commission parameters for a given validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Commission { /// commission_rates defines the initial commission rates to be used for creating a validator. @@ -97,9 +113,10 @@ pub struct Commission { pub commission_rates: ::core::option::Option, /// update_time is the last time the commission rate was changed. #[prost(message, optional, tag = "2")] - pub update_time: ::core::option::Option<::prost_types::Timestamp>, + pub update_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// Description defines a validator description. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Description { /// moniker defines a human-readable name for the validator. @@ -126,6 +143,7 @@ pub struct Description { /// bond shares is based on the amount of coins delegated divided by the current /// exchange rate. Voting power can be calculated as total bonded shares /// multiplied by exchange rate. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Validator { /// operator_address defines the address of the validator's operator; bech encoded in JSON. @@ -133,7 +151,7 @@ pub struct Validator { pub operator_address: ::prost::alloc::string::String, /// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. #[prost(message, optional, tag = "2")] - pub consensus_pubkey: ::core::option::Option<::prost_types::Any>, + pub consensus_pubkey: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// jailed defined whether the validator has been jailed from bonded status or not. #[prost(bool, tag = "3")] pub jailed: bool, @@ -154,7 +172,7 @@ pub struct Validator { pub unbonding_height: i64, /// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. #[prost(message, optional, tag = "9")] - pub unbonding_time: ::core::option::Option<::prost_types::Timestamp>, + pub unbonding_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// commission defines the commission parameters. #[prost(message, optional, tag = "10")] pub commission: ::core::option::Option, @@ -165,6 +183,7 @@ pub struct Validator { pub min_self_delegation: ::prost::alloc::string::String, } /// ValAddresses defines a repeated set of validator addresses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValAddresses { #[prost(string, repeated, tag = "1")] @@ -173,6 +192,7 @@ pub struct ValAddresses { /// DVPair is struct that just has a delegator-validator pair with no other data. /// It is intended to be used as a marshalable pointer. For example, a DVPair can /// be used to construct the key to getting an UnbondingDelegation from state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DvPair { #[prost(string, tag = "1")] @@ -181,6 +201,7 @@ pub struct DvPair { pub validator_address: ::prost::alloc::string::String, } /// DVPairs defines an array of DVPair objects. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DvPairs { #[prost(message, repeated, tag = "1")] @@ -190,6 +211,7 @@ pub struct DvPairs { /// with no other data. It is intended to be used as a marshalable pointer. For /// example, a DVVTriplet can be used to construct the key to getting a /// Redelegation from state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DvvTriplet { #[prost(string, tag = "1")] @@ -200,6 +222,7 @@ pub struct DvvTriplet { pub validator_dst_address: ::prost::alloc::string::String, } /// DVVTriplets defines an array of DVVTriplet objects. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DvvTriplets { #[prost(message, repeated, tag = "1")] @@ -208,6 +231,7 @@ pub struct DvvTriplets { /// Delegation represents the bond with tokens held by an account. It is /// owned by one delegator, and is associated with the voting power of one /// validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Delegation { /// delegator_address is the bech32-encoded address of the delegator. @@ -222,6 +246,7 @@ pub struct Delegation { } /// UnbondingDelegation stores all of a single delegator's unbonding bonds /// for a single validator in an time-ordered list. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnbondingDelegation { /// delegator_address is the bech32-encoded address of the delegator. @@ -237,6 +262,7 @@ pub struct UnbondingDelegation { pub entries: ::prost::alloc::vec::Vec, } /// UnbondingDelegationEntry defines an unbonding object with relevant metadata. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnbondingDelegationEntry { /// creation_height is the height which the unbonding took place. @@ -244,7 +270,7 @@ pub struct UnbondingDelegationEntry { pub creation_height: i64, /// completion_time is the unix time for unbonding completion. #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, + pub completion_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// initial_balance defines the tokens initially scheduled to receive at completion. #[prost(string, tag = "3")] pub initial_balance: ::prost::alloc::string::String, @@ -253,6 +279,7 @@ pub struct UnbondingDelegationEntry { pub balance: ::prost::alloc::string::String, } /// RedelegationEntry defines a redelegation object with relevant metadata. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegationEntry { /// creation_height defines the height which the redelegation took place. @@ -260,7 +287,7 @@ pub struct RedelegationEntry { pub creation_height: i64, /// completion_time defines the unix time for redelegation completion. #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, + pub completion_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// initial_balance defines the initial balance when redelegation started. #[prost(string, tag = "3")] pub initial_balance: ::prost::alloc::string::String, @@ -270,6 +297,7 @@ pub struct RedelegationEntry { } /// Redelegation contains the list of a particular delegator's redelegating bonds /// from a particular source validator to a particular destination validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Redelegation { /// delegator_address is the bech32-encoded address of the delegator. @@ -288,11 +316,12 @@ pub struct Redelegation { pub entries: ::prost::alloc::vec::Vec, } /// Params defines the parameters for the staking module. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { /// unbonding_time is the time duration of unbonding. #[prost(message, optional, tag = "1")] - pub unbonding_time: ::core::option::Option<::prost_types::Duration>, + pub unbonding_time: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// max_validators is the maximum number of validators. #[prost(uint32, tag = "2")] pub max_validators: u32, @@ -311,6 +340,7 @@ pub struct Params { } /// DelegationResponse is equivalent to Delegation except that it contains a /// balance in addition to shares which is more suitable for client responses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegationResponse { #[prost(message, optional, tag = "1")] @@ -321,6 +351,7 @@ pub struct DelegationResponse { /// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it /// contains a balance in addition to shares which is more suitable for client /// responses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegationEntryResponse { #[prost(message, optional, tag = "1")] @@ -331,6 +362,7 @@ pub struct RedelegationEntryResponse { /// RedelegationResponse is equivalent to a Redelegation except that its entries /// contain a balance in addition to shares which is more suitable for client /// responses. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegationResponse { #[prost(message, optional, tag = "1")] @@ -340,6 +372,7 @@ pub struct RedelegationResponse { } /// Pool is used for tracking bonded and not-bonded token supply of the bond /// denomination. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pool { #[prost(string, tag = "1")] @@ -373,8 +406,19 @@ impl BondStatus { BondStatus::Bonded => "BOND_STATUS_BONDED", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BOND_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "BOND_STATUS_UNBONDED" => Some(Self::Unbonded), + "BOND_STATUS_UNBONDING" => Some(Self::Unbonding), + "BOND_STATUS_BONDED" => Some(Self::Bonded), + _ => None, + } + } } /// GenesisState defines the staking module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// params defines all the paramaters of related to deposit. @@ -404,6 +448,7 @@ pub struct GenesisState { pub exported: bool, } /// LastValidatorPower required for validator set update logic. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LastValidatorPower { /// address is the address of the validator. @@ -414,6 +459,7 @@ pub struct LastValidatorPower { pub power: i64, } /// QueryValidatorsRequest is request type for Query/Validators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorsRequest { /// status enables to query for validators matching a given status. @@ -424,6 +470,7 @@ pub struct QueryValidatorsRequest { pub pagination: ::core::option::Option, } /// QueryValidatorsResponse is response type for the Query/Validators RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorsResponse { /// validators contains all the queried validators. @@ -434,6 +481,7 @@ pub struct QueryValidatorsResponse { pub pagination: ::core::option::Option, } /// QueryValidatorRequest is response type for the Query/Validator RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorRequest { /// validator_addr defines the validator address to query for. @@ -441,6 +489,7 @@ pub struct QueryValidatorRequest { pub validator_addr: ::prost::alloc::string::String, } /// QueryValidatorResponse is response type for the Query/Validator RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorResponse { /// validator defines the validator info. @@ -449,6 +498,7 @@ pub struct QueryValidatorResponse { } /// QueryValidatorDelegationsRequest is request type for the /// Query/ValidatorDelegations RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorDelegationsRequest { /// validator_addr defines the validator address to query for. @@ -460,6 +510,7 @@ pub struct QueryValidatorDelegationsRequest { } /// QueryValidatorDelegationsResponse is response type for the /// Query/ValidatorDelegations RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorDelegationsResponse { #[prost(message, repeated, tag = "1")] @@ -470,6 +521,7 @@ pub struct QueryValidatorDelegationsResponse { } /// QueryValidatorUnbondingDelegationsRequest is required type for the /// Query/ValidatorUnbondingDelegations RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorUnbondingDelegationsRequest { /// validator_addr defines the validator address to query for. @@ -481,6 +533,7 @@ pub struct QueryValidatorUnbondingDelegationsRequest { } /// QueryValidatorUnbondingDelegationsResponse is response type for the /// Query/ValidatorUnbondingDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryValidatorUnbondingDelegationsResponse { #[prost(message, repeated, tag = "1")] @@ -490,6 +543,7 @@ pub struct QueryValidatorUnbondingDelegationsResponse { pub pagination: ::core::option::Option, } /// QueryDelegationRequest is request type for the Query/Delegation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationRequest { /// delegator_addr defines the delegator address to query for. @@ -500,6 +554,7 @@ pub struct QueryDelegationRequest { pub validator_addr: ::prost::alloc::string::String, } /// QueryDelegationResponse is response type for the Query/Delegation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegationResponse { /// delegation_responses defines the delegation info of a delegation. @@ -508,6 +563,7 @@ pub struct QueryDelegationResponse { } /// QueryUnbondingDelegationRequest is request type for the /// Query/UnbondingDelegation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryUnbondingDelegationRequest { /// delegator_addr defines the delegator address to query for. @@ -519,6 +575,7 @@ pub struct QueryUnbondingDelegationRequest { } /// QueryDelegationResponse is response type for the Query/UnbondingDelegation /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryUnbondingDelegationResponse { /// unbond defines the unbonding information of a delegation. @@ -527,6 +584,7 @@ pub struct QueryUnbondingDelegationResponse { } /// QueryDelegatorDelegationsRequest is request type for the /// Query/DelegatorDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorDelegationsRequest { /// delegator_addr defines the delegator address to query for. @@ -538,6 +596,7 @@ pub struct QueryDelegatorDelegationsRequest { } /// QueryDelegatorDelegationsResponse is response type for the /// Query/DelegatorDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorDelegationsResponse { /// delegation_responses defines all the delegations' info of a delegator. @@ -549,6 +608,7 @@ pub struct QueryDelegatorDelegationsResponse { } /// QueryDelegatorUnbondingDelegationsRequest is request type for the /// Query/DelegatorUnbondingDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorUnbondingDelegationsRequest { /// delegator_addr defines the delegator address to query for. @@ -560,6 +620,7 @@ pub struct QueryDelegatorUnbondingDelegationsRequest { } /// QueryUnbondingDelegatorDelegationsResponse is response type for the /// Query/UnbondingDelegatorDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorUnbondingDelegationsResponse { #[prost(message, repeated, tag = "1")] @@ -570,6 +631,7 @@ pub struct QueryDelegatorUnbondingDelegationsResponse { } /// QueryRedelegationsRequest is request type for the Query/Redelegations RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRedelegationsRequest { /// delegator_addr defines the delegator address to query for. @@ -587,6 +649,7 @@ pub struct QueryRedelegationsRequest { } /// QueryRedelegationsResponse is response type for the Query/Redelegations RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRedelegationsResponse { #[prost(message, repeated, tag = "1")] @@ -597,6 +660,7 @@ pub struct QueryRedelegationsResponse { } /// QueryDelegatorValidatorsRequest is request type for the /// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorsRequest { /// delegator_addr defines the delegator address to query for. @@ -608,6 +672,7 @@ pub struct QueryDelegatorValidatorsRequest { } /// QueryDelegatorValidatorsResponse is response type for the /// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorsResponse { /// validators defines the validators' info of a delegator. @@ -619,6 +684,7 @@ pub struct QueryDelegatorValidatorsResponse { } /// QueryDelegatorValidatorRequest is request type for the /// Query/DelegatorValidator RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorRequest { /// delegator_addr defines the delegator address to query for. @@ -630,6 +696,7 @@ pub struct QueryDelegatorValidatorRequest { } /// QueryDelegatorValidatorResponse response type for the /// Query/DelegatorValidator RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryDelegatorValidatorResponse { /// validator defines the validator info. @@ -638,6 +705,7 @@ pub struct QueryDelegatorValidatorResponse { } /// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryHistoricalInfoRequest { /// height defines at which height to query the historical info. @@ -646,6 +714,7 @@ pub struct QueryHistoricalInfoRequest { } /// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryHistoricalInfoResponse { /// hist defines the historical info at the given height. @@ -653,9 +722,11 @@ pub struct QueryHistoricalInfoResponse { pub hist: ::core::option::Option, } /// QueryPoolRequest is request type for the Query/Pool RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPoolRequest {} /// QueryPoolResponse is response type for the Query/Pool RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPoolResponse { /// pool defines the pool info. @@ -663,9 +734,11 @@ pub struct QueryPoolResponse { pub pool: ::core::option::Option, } /// QueryParamsRequest is request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params holds all the parameters of this module. @@ -673,6 +746,7 @@ pub struct QueryParamsResponse { pub params: ::core::option::Option, } /// MsgCreateValidator defines a SDK message for creating a new validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateValidator { #[prost(message, optional, tag = "1")] @@ -686,14 +760,16 @@ pub struct MsgCreateValidator { #[prost(string, tag = "5")] pub validator_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "6")] - pub pubkey: ::core::option::Option<::prost_types::Any>, + pub pubkey: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, optional, tag = "7")] pub value: ::core::option::Option, } /// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateValidatorResponse {} /// MsgEditValidator defines a SDK message for editing an existing validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgEditValidator { #[prost(message, optional, tag = "1")] @@ -710,10 +786,12 @@ pub struct MsgEditValidator { pub min_self_delegation: ::prost::alloc::string::String, } /// MsgEditValidatorResponse defines the Msg/EditValidator response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgEditValidatorResponse {} /// MsgDelegate defines a SDK message for performing a delegation of coins /// from a delegator to a validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDelegate { #[prost(string, tag = "1")] @@ -724,10 +802,12 @@ pub struct MsgDelegate { pub amount: ::core::option::Option, } /// MsgDelegateResponse defines the Msg/Delegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDelegateResponse {} /// MsgBeginRedelegate defines a SDK message for performing a redelegation /// of coins from a delegator and source validator to a destination validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgBeginRedelegate { #[prost(string, tag = "1")] @@ -740,13 +820,15 @@ pub struct MsgBeginRedelegate { pub amount: ::core::option::Option, } /// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgBeginRedelegateResponse { #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, + pub completion_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// MsgUndelegate defines a SDK message for performing an undelegation from a /// delegate and a validator. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUndelegate { #[prost(string, tag = "1")] @@ -757,14 +839,16 @@ pub struct MsgUndelegate { pub amount: ::core::option::Option, } /// MsgUndelegateResponse defines the Msg/Undelegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUndelegateResponse { #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::prost_types::Timestamp>, + pub completion_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUnbondingDelegation { #[prost(string, tag = "1")] @@ -781,6 +865,7 @@ pub struct MsgCancelUnbondingDelegation { /// MsgCancelUnbondingDelegationResponse /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUnbondingDelegationResponse {} include!("cosmos.staking.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs index ef809f20..0ce5e0a7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// SignatureDescriptors wraps multiple SignatureDescriptor's. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignatureDescriptors { /// signatures are the signature descriptors @@ -10,11 +11,12 @@ pub struct SignatureDescriptors { /// a signature including the public key of the signer, signing modes and the /// signature itself. It is primarily used for coordinating signatures between /// clients. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignatureDescriptor { /// public_key is the public key of the signer #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::prost_types::Any>, + pub public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, optional, tag = "2")] pub data: ::core::option::Option, /// sequence is the sequence of the account, which describes the @@ -26,6 +28,7 @@ pub struct SignatureDescriptor { /// Nested message and enum types in `SignatureDescriptor`. pub mod signature_descriptor { /// Data represents signature data + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Data { /// sum is the oneof that specifies whether this represents single or multi-signature data @@ -35,6 +38,7 @@ pub mod signature_descriptor { /// Nested message and enum types in `Data`. pub mod data { /// Single is the signature data for a single signer + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Single { /// mode is the signing mode of the single signer @@ -45,6 +49,7 @@ pub mod signature_descriptor { pub signature: ::prost::alloc::vec::Vec, } /// Multi is the signature data for a multisig public key + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Multi { /// bitarray specifies which keys within the multisig are signing @@ -57,6 +62,7 @@ pub mod signature_descriptor { pub signatures: ::prost::alloc::vec::Vec, } /// sum is the oneof that specifies whether this represents single or multi-signature data + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Sum { /// single represents a single signer @@ -126,5 +132,17 @@ impl SignMode { SignMode::Eip191 => "SIGN_MODE_EIP_191", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SIGN_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "SIGN_MODE_DIRECT" => Some(Self::Direct), + "SIGN_MODE_TEXTUAL" => Some(Self::Textual), + "SIGN_MODE_DIRECT_AUX" => Some(Self::DirectAux), + "SIGN_MODE_LEGACY_AMINO_JSON" => Some(Self::LegacyAminoJson), + "SIGN_MODE_EIP_191" => Some(Self::Eip191), + _ => None, + } + } } // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs index 7bf8ca08..363a157f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Tx is the standard type used for broadcasting transactions. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Tx { /// body is the processable content of the transaction @@ -20,6 +21,7 @@ pub struct Tx { /// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and /// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used /// as the transaction ID. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxRaw { /// body_bytes is a protobuf serialization of a TxBody that matches the @@ -37,6 +39,7 @@ pub struct TxRaw { pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } /// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignDoc { /// body_bytes is protobuf serialization of a TxBody that matches the @@ -60,6 +63,7 @@ pub struct SignDoc { /// SIGN_MODE_DIRECT_AUX. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignDocDirectAux { /// body_bytes is protobuf serialization of a TxBody that matches the @@ -68,7 +72,7 @@ pub struct SignDocDirectAux { pub body_bytes: ::prost::alloc::vec::Vec, /// public_key is the public key of the signing account. #[prost(message, optional, tag = "2")] - pub public_key: ::core::option::Option<::prost_types::Any>, + pub public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// chain_id is the identifier of the chain this transaction targets. /// It prevents signed transactions from being used on another chain by an /// attacker. @@ -90,6 +94,7 @@ pub struct SignDocDirectAux { pub tip: ::core::option::Option, } /// TxBody is the body of a transaction that all signers sign over. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxBody { /// messages is a list of messages to be executed. The required signers of @@ -100,7 +105,7 @@ pub struct TxBody { /// is referred to as the primary signer and pays the fee for the whole /// transaction. #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// memo is any arbitrary note/comment to be added to the transaction. /// WARNING: in clients, any publicly exposed text should not be called memo, /// but should be called `note` instead (see ). @@ -114,15 +119,17 @@ pub struct TxBody { /// when the default options are not sufficient. If any of these are present /// and can't be handled, the transaction will be rejected #[prost(message, repeated, tag = "1023")] - pub extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub extension_options: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// extension_options are arbitrary options that can be added by chains /// when the default options are not sufficient. If any of these are present /// and can't be handled, they will be ignored #[prost(message, repeated, tag = "2047")] - pub non_critical_extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub non_critical_extension_options: + ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// AuthInfo describes the fee and signer modes that are used to sign a /// transaction. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuthInfo { /// signer_infos defines the signing modes for the required signers. The number @@ -148,13 +155,14 @@ pub struct AuthInfo { } /// SignerInfo describes the public key and signing mode of a single top-level /// signer. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignerInfo { /// public_key is the public key of the signer. It is optional for accounts /// that already exist in state. If unset, the verifier can use the required \ /// signer address for this position and lookup the public key. #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::prost_types::Any>, + pub public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// mode_info describes the signing mode of the signer and is a nested /// structure to support nested multisig pubkey's #[prost(message, optional, tag = "2")] @@ -166,6 +174,7 @@ pub struct SignerInfo { pub sequence: u64, } /// ModeInfo describes the signing mode of a single or nested multisig signer. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModeInfo { /// sum is the oneof that specifies whether this represents a single or nested @@ -178,6 +187,7 @@ pub mod mode_info { /// Single is the mode info for a single signer. It is structured as a message /// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the /// future + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Single { /// mode is the signing mode of the single signer @@ -185,6 +195,7 @@ pub mod mode_info { pub mode: i32, } /// Multi is the mode info for a multisig public key + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Multi { /// bitarray specifies which keys within the multisig are signing @@ -198,6 +209,7 @@ pub mod mode_info { } /// sum is the oneof that specifies whether this represents a single or nested /// multisig signer + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Sum { /// single represents a single signer @@ -211,6 +223,7 @@ pub mod mode_info { /// Fee includes the amount of coins paid in fees and the maximum /// gas to be used by the transaction. The ratio yields an effective "gasprice", /// which must be above some miminum to be accepted into the mempool. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Fee { /// amount is the amount of coins to be paid as a fee @@ -234,6 +247,7 @@ pub struct Fee { /// Tip is the tip used for meta-transactions. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Tip { /// amount is the amount of the tip @@ -249,6 +263,7 @@ pub struct Tip { /// by the node if sent directly as-is. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuxSignerData { /// address is the bech32-encoded address of the auxiliary signer. If using @@ -270,6 +285,7 @@ pub struct AuxSignerData { } /// GetTxsEventRequest is the request type for the Service.TxsByEvents /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxsEventRequest { /// events is the list of transaction event type. @@ -292,6 +308,7 @@ pub struct GetTxsEventRequest { } /// GetTxsEventResponse is the response type for the Service.TxsByEvents /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxsEventResponse { /// txs is the list of queried transactions. @@ -311,6 +328,7 @@ pub struct GetTxsEventResponse { } /// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BroadcastTxRequest { /// tx_bytes is the raw transaction. @@ -321,6 +339,7 @@ pub struct BroadcastTxRequest { } /// BroadcastTxResponse is the response type for the /// Service.BroadcastTx method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BroadcastTxResponse { /// tx_response is the queried TxResponses. @@ -329,6 +348,7 @@ pub struct BroadcastTxResponse { } /// SimulateRequest is the request type for the Service.Simulate /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulateRequest { /// tx is the transaction to simulate. @@ -344,6 +364,7 @@ pub struct SimulateRequest { } /// SimulateResponse is the response type for the /// Service.SimulateRPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulateResponse { /// gas_info is the information about gas used in the simulation. @@ -355,6 +376,7 @@ pub struct SimulateResponse { } /// GetTxRequest is the request type for the Service.GetTx /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxRequest { /// hash is the tx hash to query, encoded as a hex string. @@ -362,6 +384,7 @@ pub struct GetTxRequest { pub hash: ::prost::alloc::string::String, } /// GetTxResponse is the response type for the Service.GetTx method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxResponse { /// tx is the queried transaction. @@ -375,6 +398,7 @@ pub struct GetTxResponse { /// RPC method. /// /// Since: cosmos-sdk 0.45.2 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockWithTxsRequest { /// height is the height of the block to query. @@ -387,6 +411,7 @@ pub struct GetBlockWithTxsRequest { /// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. /// /// Since: cosmos-sdk 0.45.2 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockWithTxsResponse { /// txs are the transactions in the block. @@ -423,6 +448,15 @@ impl OrderBy { OrderBy::Desc => "ORDER_BY_DESC", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified), + "ORDER_BY_ASC" => Some(Self::Asc), + "ORDER_BY_DESC" => Some(Self::Desc), + _ => None, + } + } } /// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -453,6 +487,16 @@ impl BroadcastMode { BroadcastMode::Async => "BROADCAST_MODE_ASYNC", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BROADCAST_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "BROADCAST_MODE_BLOCK" => Some(Self::Block), + "BROADCAST_MODE_SYNC" => Some(Self::Sync), + "BROADCAST_MODE_ASYNC" => Some(Self::Async), + _ => None, + } + } } include!("cosmos.tx.v1beta1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs index cd3ad7d9..5324a869 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs @@ -1,5 +1,6 @@ // @generated /// Plan specifies information about a planned upgrade and when it should occur. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Plan { /// Sets the name for the upgrade. This name will be used by the upgraded @@ -16,7 +17,7 @@ pub struct Plan { /// If this field is not empty, an error will be thrown. #[deprecated] #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// The height at which the upgrade must be performed. /// Only used if Time is not set. #[prost(int64, tag = "3")] @@ -30,12 +31,13 @@ pub struct Plan { /// If this field is not empty, an error will be thrown. #[deprecated] #[prost(message, optional, tag = "5")] - pub upgraded_client_state: ::core::option::Option<::prost_types::Any>, + pub upgraded_client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// SoftwareUpgradeProposal is a gov Content type for initiating a software /// upgrade. /// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov /// proposals, see MsgSoftwareUpgrade. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SoftwareUpgradeProposal { #[prost(string, tag = "1")] @@ -49,6 +51,7 @@ pub struct SoftwareUpgradeProposal { /// upgrade. /// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov /// proposals, see MsgCancelUpgrade. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CancelSoftwareUpgradeProposal { #[prost(string, tag = "1")] @@ -59,6 +62,7 @@ pub struct CancelSoftwareUpgradeProposal { /// ModuleVersion specifies a module and its consensus version. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModuleVersion { /// name of the app module @@ -70,10 +74,12 @@ pub struct ModuleVersion { } /// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCurrentPlanRequest {} /// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCurrentPlanResponse { /// plan is the current upgrade plan. @@ -82,6 +88,7 @@ pub struct QueryCurrentPlanResponse { } /// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAppliedPlanRequest { /// name is the name of the applied plan to query for. @@ -90,6 +97,7 @@ pub struct QueryAppliedPlanRequest { } /// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC /// method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAppliedPlanResponse { /// height is the block height at which the plan was applied. @@ -98,6 +106,7 @@ pub struct QueryAppliedPlanResponse { } /// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryUpgradedConsensusStateRequest { /// last height of the current chain must be sent in request @@ -107,6 +116,7 @@ pub struct QueryUpgradedConsensusStateRequest { } /// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState /// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryUpgradedConsensusStateResponse { /// Since: cosmos-sdk 0.43 @@ -117,6 +127,7 @@ pub struct QueryUpgradedConsensusStateResponse { /// RPC method. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleVersionsRequest { /// module_name is a field to query a specific module @@ -129,6 +140,7 @@ pub struct QueryModuleVersionsRequest { /// RPC method. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleVersionsResponse { /// module_versions is a list of module names with their consensus versions. @@ -138,11 +150,13 @@ pub struct QueryModuleVersionsResponse { /// QueryAuthorityRequest is the request type for Query/Authority /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAuthorityRequest {} /// QueryAuthorityResponse is the response type for Query/Authority /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAuthorityResponse { #[prost(string, tag = "1")] @@ -151,6 +165,7 @@ pub struct QueryAuthorityResponse { /// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSoftwareUpgrade { /// authority is the address of the governance account. @@ -163,11 +178,13 @@ pub struct MsgSoftwareUpgrade { /// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSoftwareUpgradeResponse {} /// MsgCancelUpgrade is the Msg/CancelUpgrade request type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUpgrade { /// authority is the address of the governance account. @@ -177,6 +194,7 @@ pub struct MsgCancelUpgrade { /// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelUpgradeResponse {} include!("cosmos.upgrade.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs index 63a56aeb..b49219b3 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.rs @@ -1,6 +1,7 @@ // @generated /// BaseVestingAccount implements the VestingAccount interface. It contains all /// the necessary fields needed for any vesting account implementation. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BaseVestingAccount { #[prost(message, optional, tag = "1")] @@ -17,6 +18,7 @@ pub struct BaseVestingAccount { } /// ContinuousVestingAccount implements the VestingAccount interface. It /// continuously vests by unlocking coins linearly with respect to time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContinuousVestingAccount { #[prost(message, optional, tag = "1")] @@ -28,12 +30,14 @@ pub struct ContinuousVestingAccount { /// DelayedVestingAccount implements the VestingAccount interface. It vests all /// coins after a specific time, but non prior. In other words, it keeps them /// locked until a specified time. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelayedVestingAccount { #[prost(message, optional, tag = "1")] pub base_vesting_account: ::core::option::Option, } /// Period defines a length of time and amount of coins that will vest. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Period { /// Period duration in seconds. @@ -44,6 +48,7 @@ pub struct Period { } /// PeriodicVestingAccount implements the VestingAccount interface. It /// periodically vests by unlocking coins during each specified period. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeriodicVestingAccount { #[prost(message, optional, tag = "1")] @@ -58,6 +63,7 @@ pub struct PeriodicVestingAccount { /// still be used for delegating and for governance votes even while locked. /// /// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PermanentLockedAccount { #[prost(message, optional, tag = "1")] @@ -65,6 +71,7 @@ pub struct PermanentLockedAccount { } /// MsgCreateVestingAccount defines a message that enables creating a vesting /// account. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateVestingAccount { #[prost(string, tag = "1")] @@ -80,12 +87,14 @@ pub struct MsgCreateVestingAccount { pub delayed: bool, } /// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateVestingAccountResponse {} /// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent /// locked account. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePermanentLockedAccount { #[prost(string, tag = "1")] @@ -98,12 +107,14 @@ pub struct MsgCreatePermanentLockedAccount { /// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePermanentLockedAccountResponse {} /// MsgCreateVestingAccount defines a message that enables creating a vesting /// account. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePeriodicVestingAccount { #[prost(string, tag = "1")] @@ -120,6 +131,7 @@ pub struct MsgCreatePeriodicVestingAccount { /// response type. /// /// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreatePeriodicVestingAccountResponse {} include!("cosmos.vesting.v1beta1.tonic.rs"); diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs index a74f2b1e..29320227 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.rs @@ -1,6 +1,7 @@ // @generated /// InterfaceDescriptor describes an interface type to be used with /// accepts_interface and implements_interface and declared by declare_interface. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceDescriptor { /// name is the name of the interface. It should be a short-name (without @@ -21,6 +22,7 @@ pub struct InterfaceDescriptor { /// Scalars should ideally define an encoding such that there is only one /// valid syntactical representation for a given semantic meaning, /// i.e. the encoding should be deterministic. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScalarDescriptor { /// name is the name of the scalar. It should be a short-name (without @@ -60,5 +62,14 @@ impl ScalarType { ScalarType::Bytes => "SCALAR_TYPE_BYTES", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SCALAR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "SCALAR_TYPE_STRING" => Some(Self::String), + "SCALAR_TYPE_BYTES" => Some(Self::Bytes), + _ => None, + } + } } // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs index 35d4edb8..272e77e9 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.auth.v1beta1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// BaseAccount defines a base account type. It contains all the necessary fields /// for basic account functionality. Any custom account type should extend this /// type for additional functionality (e.g. vesting). @@ -7,7 +8,7 @@ pub struct BaseAccount { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::prost_types::Any>, + pub pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(uint64, tag = "3")] pub account_number: u64, #[prost(uint64, tag = "4")] @@ -17,7 +18,10 @@ impl ::prost::Name for BaseAccount { const NAME: &'static str = "BaseAccount"; const PACKAGE: &'static str = "cosmos.auth.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + "cosmos.auth.v1beta1.BaseAccount".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.BaseAccount".into() } } /// ModuleAccount defines an account for modules that holds coins on a pool. @@ -35,12 +39,15 @@ impl ::prost::Name for ModuleAccount { const NAME: &'static str = "ModuleAccount"; const PACKAGE: &'static str = "cosmos.auth.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + "cosmos.auth.v1beta1.ModuleAccount".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.ModuleAccount".into() } } /// Params defines the parameters for the auth module. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Params { #[prost(uint64, tag = "1")] pub max_memo_characters: u64, @@ -57,6 +64,9 @@ impl ::prost::Name for Params { const NAME: &'static str = "Params"; const PACKAGE: &'static str = "cosmos.auth.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + "cosmos.auth.v1beta1.Params".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.Params".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs index 58314ebc..67f3f8c6 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.query.v1beta1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// PageRequest is to be embedded in gRPC request messages for efficient /// pagination. Ex: /// @@ -33,7 +34,10 @@ impl ::prost::Name for PageRequest { const NAME: &'static str = "PageRequest"; const PACKAGE: &'static str = "cosmos.base.query.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.query.v1beta1.{}", Self::NAME) + "cosmos.base.query.v1beta1.PageRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.query.v1beta1.PageRequest".into() } } /// PageResponse is to be embedded in gRPC response messages where the @@ -59,6 +63,9 @@ impl ::prost::Name for PageResponse { const NAME: &'static str = "PageResponse"; const PACKAGE: &'static str = "cosmos.base.query.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.query.v1beta1.{}", Self::NAME) + "cosmos.base.query.v1beta1.PageResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.query.v1beta1.PageResponse".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs index e3497310..057afb09 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.base.v1beta1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// Coin defines a token with a denomination and an amount. /// /// NOTE: The amount field is an Int which implements the custom method @@ -14,7 +15,10 @@ impl ::prost::Name for Coin { const NAME: &'static str = "Coin"; const PACKAGE: &'static str = "cosmos.base.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME) + "cosmos.base.v1beta1.Coin".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.v1beta1.Coin".into() } } /// DecCoin defines a token with a denomination and a decimal amount. @@ -33,7 +37,10 @@ impl ::prost::Name for DecCoin { const NAME: &'static str = "DecCoin"; const PACKAGE: &'static str = "cosmos.base.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME) + "cosmos.base.v1beta1.DecCoin".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.v1beta1.DecCoin".into() } } /// IntProto defines a Protobuf wrapper around an Int object. @@ -47,7 +54,10 @@ impl ::prost::Name for IntProto { const NAME: &'static str = "IntProto"; const PACKAGE: &'static str = "cosmos.base.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME) + "cosmos.base.v1beta1.IntProto".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.v1beta1.IntProto".into() } } /// DecProto defines a Protobuf wrapper around a Dec object. @@ -61,6 +71,9 @@ impl ::prost::Name for DecProto { const NAME: &'static str = "DecProto"; const PACKAGE: &'static str = "cosmos.base.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.v1beta1.{}", Self::NAME) + "cosmos.base.v1beta1.DecProto".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.v1beta1.DecProto".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs index dd2af2f7..4761274d 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/cosmos.upgrade.v1beta1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// Plan specifies information about a planned upgrade and when it should occur. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -14,7 +15,7 @@ pub struct Plan { /// The time after which the upgrade must be performed. /// Leave set to its zero value to use a pre-defined Height instead. #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// The height at which the upgrade must be performed. /// Only used if Time is not set. #[prost(int64, tag = "3")] @@ -28,7 +29,10 @@ impl ::prost::Name for Plan { const NAME: &'static str = "Plan"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + "cosmos.upgrade.v1beta1.Plan".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.upgrade.v1beta1.Plan".into() } } /// SoftwareUpgradeProposal is a gov Content type for initiating a software @@ -47,7 +51,10 @@ impl ::prost::Name for SoftwareUpgradeProposal { const NAME: &'static str = "SoftwareUpgradeProposal"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal".into() } } /// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software @@ -64,6 +71,9 @@ impl ::prost::Name for CancelSoftwareUpgradeProposal { const NAME: &'static str = "CancelSoftwareUpgradeProposal"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs index fc059366..9c803a1c 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.controller.v1.rs @@ -1,7 +1,8 @@ +// This file is @generated by prost-build. /// Params defines the set of on-chain interchain accounts parameters. /// The following parameters may be used to disable the controller submodule. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Params { /// controller_enabled enables or disables the controller submodule. #[prost(bool, tag = "1")] @@ -11,29 +12,29 @@ impl ::prost::Name for Params { const NAME: &'static str = "Params"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "ibc.applications.interchain_accounts.controller.v1.{}", - Self::NAME - ) + "ibc.applications.interchain_accounts.controller.v1.Params".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.controller.v1.Params".into() } } /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} impl ::prost::Name for QueryParamsRequest { const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "ibc.applications.interchain_accounts.controller.v1.{}", - Self::NAME - ) + "ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest".into() } } /// QueryParamsResponse is the response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. #[prost(message, optional, tag = "1")] @@ -43,10 +44,10 @@ impl ::prost::Name for QueryParamsResponse { const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "ibc.applications.interchain_accounts.controller.v1.{}", - Self::NAME - ) + "ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse".into() } } /// Generated client implementations. diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs index 4ce4090c..e06818ed 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.host.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// Params defines the set of on-chain interchain accounts parameters. /// The following parameters may be used to disable the host submodule. #[allow(clippy::derive_partial_eq_without_eq)] @@ -14,24 +15,24 @@ impl ::prost::Name for Params { const NAME: &'static str = "Params"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "ibc.applications.interchain_accounts.host.v1.{}", - Self::NAME - ) + "ibc.applications.interchain_accounts.host.v1.Params".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.host.v1.Params".into() } } /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} impl ::prost::Name for QueryParamsRequest { const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "ibc.applications.interchain_accounts.host.v1.{}", - Self::NAME - ) + "ibc.applications.interchain_accounts.host.v1.QueryParamsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.host.v1.QueryParamsRequest".into() } } /// QueryParamsResponse is the response type for the Query/Params RPC method. @@ -46,10 +47,10 @@ impl ::prost::Name for QueryParamsResponse { const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "ibc.applications.interchain_accounts.host.v1.{}", - Self::NAME - ) + "ibc.applications.interchain_accounts.host.v1.QueryParamsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.host.v1.QueryParamsResponse".into() } } /// Generated client implementations. diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.v1.rs index fa4a0ef3..5c5ccf17 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.interchain_accounts.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -12,7 +13,10 @@ impl ::prost::Name for InterchainAccount { const NAME: &'static str = "InterchainAccount"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.InterchainAccount".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.InterchainAccount".into() } } /// InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. @@ -30,7 +34,10 @@ impl ::prost::Name for InterchainAccountPacketData { const NAME: &'static str = "InterchainAccountPacketData"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.InterchainAccountPacketData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.InterchainAccountPacketData".into() } } /// CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain. @@ -38,13 +45,16 @@ impl ::prost::Name for InterchainAccountPacketData { #[derive(Clone, PartialEq, ::prost::Message)] pub struct CosmosTx { #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for CosmosTx { const NAME: &'static str = "CosmosTx"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.CosmosTx".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.CosmosTx".into() } } /// Type defines a classification of message issued from a controller chain to its associated interchain accounts @@ -106,7 +116,10 @@ impl ::prost::Name for Metadata { const NAME: &'static str = "Metadata"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.Metadata".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.Metadata".into() } } /// GenesisState defines the interchain accounts genesis state @@ -122,7 +135,10 @@ impl ::prost::Name for GenesisState { const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.GenesisState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.GenesisState".into() } } /// ControllerGenesisState defines the interchain accounts controller genesis state @@ -142,7 +158,10 @@ impl ::prost::Name for ControllerGenesisState { const NAME: &'static str = "ControllerGenesisState"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.ControllerGenesisState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.ControllerGenesisState".into() } } /// HostGenesisState defines the interchain accounts host genesis state @@ -162,7 +181,10 @@ impl ::prost::Name for HostGenesisState { const NAME: &'static str = "HostGenesisState"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.HostGenesisState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.HostGenesisState".into() } } /// ActiveChannel contains a connection ID, port ID and associated active channel ID @@ -180,7 +202,10 @@ impl ::prost::Name for ActiveChannel { const NAME: &'static str = "ActiveChannel"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.ActiveChannel".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.ActiveChannel".into() } } /// RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address @@ -198,6 +223,9 @@ impl ::prost::Name for RegisteredInterchainAccount { const NAME: &'static str = "RegisteredInterchainAccount"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + "ibc.applications.interchain_accounts.v1.RegisteredInterchainAccount".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.interchain_accounts.v1.RegisteredInterchainAccount".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v1.rs index 7bd0ad00..757758f3 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between /// ICS20 enabled chains. See ICS Spec here: /// @@ -32,18 +33,24 @@ impl ::prost::Name for MsgTransfer { const NAME: &'static str = "MsgTransfer"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.MsgTransfer".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.MsgTransfer".into() } } /// MsgTransferResponse defines the Msg/Transfer response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgTransferResponse {} impl ::prost::Name for MsgTransferResponse { const NAME: &'static str = "MsgTransferResponse"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.MsgTransferResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.MsgTransferResponse".into() } } /// Generated client implementations. @@ -171,7 +178,10 @@ impl ::prost::Name for DenomTrace { const NAME: &'static str = "DenomTrace"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.DenomTrace".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.DenomTrace".into() } } /// Params defines the set of IBC transfer parameters. @@ -179,7 +189,7 @@ impl ::prost::Name for DenomTrace { /// TransfersEnabled parameter to true and then set the bank module's SendEnabled /// parameter for the denomination to false. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Params { /// send_enabled enables or disables all cross-chain token transfers from this /// chain. @@ -194,7 +204,10 @@ impl ::prost::Name for Params { const NAME: &'static str = "Params"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.Params".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.Params".into() } } /// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC @@ -210,7 +223,10 @@ impl ::prost::Name for QueryDenomTraceRequest { const NAME: &'static str = "QueryDenomTraceRequest"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.QueryDenomTraceRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.QueryDenomTraceRequest".into() } } /// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC @@ -226,7 +242,10 @@ impl ::prost::Name for QueryDenomTraceResponse { const NAME: &'static str = "QueryDenomTraceResponse"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.QueryDenomTraceResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.QueryDenomTraceResponse".into() } } /// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC @@ -244,7 +263,10 @@ impl ::prost::Name for QueryDenomTracesRequest { const NAME: &'static str = "QueryDenomTracesRequest"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.QueryDenomTracesRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.QueryDenomTracesRequest".into() } } /// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC @@ -265,23 +287,29 @@ impl ::prost::Name for QueryDenomTracesResponse { const NAME: &'static str = "QueryDenomTracesResponse"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.QueryDenomTracesResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.QueryDenomTracesResponse".into() } } /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} impl ::prost::Name for QueryParamsRequest { const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.QueryParamsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.QueryParamsRequest".into() } } /// QueryParamsResponse is the response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. #[prost(message, optional, tag = "1")] @@ -291,7 +319,10 @@ impl ::prost::Name for QueryParamsResponse { const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.QueryParamsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.QueryParamsResponse".into() } } /// QueryDenomHashRequest is the request type for the Query/DenomHash RPC @@ -307,7 +338,10 @@ impl ::prost::Name for QueryDenomHashRequest { const NAME: &'static str = "QueryDenomHashRequest"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.QueryDenomHashRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.QueryDenomHashRequest".into() } } /// QueryDenomHashResponse is the response type for the Query/DenomHash RPC @@ -323,7 +357,10 @@ impl ::prost::Name for QueryDenomHashResponse { const NAME: &'static str = "QueryDenomHashResponse"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.QueryDenomHashResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.QueryDenomHashResponse".into() } } /// Generated client implementations. @@ -521,6 +558,9 @@ impl ::prost::Name for GenesisState { const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + "ibc.applications.transfer.v1.GenesisState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v1.GenesisState".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v2.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v2.rs index a7024f2f..16f58976 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v2.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.applications.transfer.v2.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// FungibleTokenPacketData defines a struct for the packet payload /// See FungibleTokenPacketData spec: /// @@ -21,6 +22,9 @@ impl ::prost::Name for FungibleTokenPacketData { const NAME: &'static str = "FungibleTokenPacketData"; const PACKAGE: &'static str = "ibc.applications.transfer.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v2.{}", Self::NAME) + "ibc.applications.transfer.v2.FungibleTokenPacketData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.applications.transfer.v2.FungibleTokenPacketData".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.channel.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.channel.v1.rs index ae0e4254..ba965aa4 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.channel.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.channel.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// Channel defines pipeline for exactly-once packet delivery between specific /// modules on separate blockchains, which has at least one end capable of /// sending packets and one end capable of receiving packets. @@ -25,7 +26,10 @@ impl ::prost::Name for Channel { const NAME: &'static str = "Channel"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.Channel".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.Channel".into() } } /// IdentifiedChannel defines a channel with additional port and channel @@ -60,7 +64,10 @@ impl ::prost::Name for IdentifiedChannel { const NAME: &'static str = "IdentifiedChannel"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.IdentifiedChannel".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.IdentifiedChannel".into() } } /// Counterparty defines a channel end counterparty @@ -78,7 +85,10 @@ impl ::prost::Name for Counterparty { const NAME: &'static str = "Counterparty"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.Counterparty".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.Counterparty".into() } } /// Packet defines a type that carries data across different chains through IBC @@ -116,7 +126,10 @@ impl ::prost::Name for Packet { const NAME: &'static str = "Packet"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.Packet".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.Packet".into() } } /// PacketState defines the generic type necessary to retrieve and store @@ -143,7 +156,10 @@ impl ::prost::Name for PacketState { const NAME: &'static str = "PacketState"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.PacketState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.PacketState".into() } } /// Acknowledgement is the recommended acknowledgement format to be used by @@ -176,7 +192,10 @@ impl ::prost::Name for Acknowledgement { const NAME: &'static str = "Acknowledgement"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.Acknowledgement".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.Acknowledgement".into() } } /// State defines if a channel is in one of the following states: @@ -273,7 +292,10 @@ impl ::prost::Name for MsgChannelOpenInit { const NAME: &'static str = "MsgChannelOpenInit"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelOpenInit".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelOpenInit".into() } } /// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. @@ -287,7 +309,10 @@ impl ::prost::Name for MsgChannelOpenInitResponse { const NAME: &'static str = "MsgChannelOpenInitResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelOpenInitResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelOpenInitResponse".into() } } /// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel @@ -318,18 +343,24 @@ impl ::prost::Name for MsgChannelOpenTry { const NAME: &'static str = "MsgChannelOpenTry"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelOpenTry".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelOpenTry".into() } } /// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgChannelOpenTryResponse {} impl ::prost::Name for MsgChannelOpenTryResponse { const NAME: &'static str = "MsgChannelOpenTryResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelOpenTryResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelOpenTryResponse".into() } } /// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge @@ -356,18 +387,24 @@ impl ::prost::Name for MsgChannelOpenAck { const NAME: &'static str = "MsgChannelOpenAck"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelOpenAck".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelOpenAck".into() } } /// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgChannelOpenAckResponse {} impl ::prost::Name for MsgChannelOpenAckResponse { const NAME: &'static str = "MsgChannelOpenAckResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelOpenAckResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelOpenAckResponse".into() } } /// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to @@ -390,19 +427,25 @@ impl ::prost::Name for MsgChannelOpenConfirm { const NAME: &'static str = "MsgChannelOpenConfirm"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelOpenConfirm".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelOpenConfirm".into() } } /// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response /// type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgChannelOpenConfirmResponse {} impl ::prost::Name for MsgChannelOpenConfirmResponse { const NAME: &'static str = "MsgChannelOpenConfirmResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelOpenConfirmResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse".into() } } /// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A @@ -421,18 +464,24 @@ impl ::prost::Name for MsgChannelCloseInit { const NAME: &'static str = "MsgChannelCloseInit"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelCloseInit".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelCloseInit".into() } } /// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgChannelCloseInitResponse {} impl ::prost::Name for MsgChannelCloseInitResponse { const NAME: &'static str = "MsgChannelCloseInitResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelCloseInitResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelCloseInitResponse".into() } } /// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B @@ -455,19 +504,25 @@ impl ::prost::Name for MsgChannelCloseConfirm { const NAME: &'static str = "MsgChannelCloseConfirm"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelCloseConfirm".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelCloseConfirm".into() } } /// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response /// type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgChannelCloseConfirmResponse {} impl ::prost::Name for MsgChannelCloseConfirmResponse { const NAME: &'static str = "MsgChannelCloseConfirmResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgChannelCloseConfirmResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse".into() } } /// MsgRecvPacket receives incoming IBC packet @@ -487,12 +542,15 @@ impl ::prost::Name for MsgRecvPacket { const NAME: &'static str = "MsgRecvPacket"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgRecvPacket".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgRecvPacket".into() } } /// MsgRecvPacketResponse defines the Msg/RecvPacket response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgRecvPacketResponse { #[prost(enumeration = "ResponseResultType", tag = "1")] pub result: i32, @@ -501,7 +559,10 @@ impl ::prost::Name for MsgRecvPacketResponse { const NAME: &'static str = "MsgRecvPacketResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgRecvPacketResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgRecvPacketResponse".into() } } /// MsgTimeout receives timed-out packet @@ -523,12 +584,15 @@ impl ::prost::Name for MsgTimeout { const NAME: &'static str = "MsgTimeout"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgTimeout".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgTimeout".into() } } /// MsgTimeoutResponse defines the Msg/Timeout response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgTimeoutResponse { #[prost(enumeration = "ResponseResultType", tag = "1")] pub result: i32, @@ -537,7 +601,10 @@ impl ::prost::Name for MsgTimeoutResponse { const NAME: &'static str = "MsgTimeoutResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgTimeoutResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgTimeoutResponse".into() } } /// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. @@ -561,12 +628,15 @@ impl ::prost::Name for MsgTimeoutOnClose { const NAME: &'static str = "MsgTimeoutOnClose"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgTimeoutOnClose".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgTimeoutOnClose".into() } } /// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgTimeoutOnCloseResponse { #[prost(enumeration = "ResponseResultType", tag = "1")] pub result: i32, @@ -575,7 +645,10 @@ impl ::prost::Name for MsgTimeoutOnCloseResponse { const NAME: &'static str = "MsgTimeoutOnCloseResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgTimeoutOnCloseResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse".into() } } /// MsgAcknowledgement receives incoming IBC acknowledgement @@ -597,12 +670,15 @@ impl ::prost::Name for MsgAcknowledgement { const NAME: &'static str = "MsgAcknowledgement"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgAcknowledgement".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgAcknowledgement".into() } } /// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgAcknowledgementResponse { #[prost(enumeration = "ResponseResultType", tag = "1")] pub result: i32, @@ -611,7 +687,10 @@ impl ::prost::Name for MsgAcknowledgementResponse { const NAME: &'static str = "MsgAcknowledgementResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.MsgAcknowledgementResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.MsgAcknowledgementResponse".into() } } /// ResponseResultType defines the possible outcomes of the execution of a message @@ -960,7 +1039,10 @@ impl ::prost::Name for QueryChannelRequest { const NAME: &'static str = "QueryChannelRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryChannelRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryChannelRequest".into() } } /// QueryChannelResponse is the response type for the Query/Channel RPC method. @@ -983,7 +1065,10 @@ impl ::prost::Name for QueryChannelResponse { const NAME: &'static str = "QueryChannelResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryChannelResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryChannelResponse".into() } } /// QueryChannelsRequest is the request type for the Query/Channels RPC method @@ -1000,7 +1085,10 @@ impl ::prost::Name for QueryChannelsRequest { const NAME: &'static str = "QueryChannelsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryChannelsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryChannelsRequest".into() } } /// QueryChannelsResponse is the response type for the Query/Channels RPC method. @@ -1023,7 +1111,10 @@ impl ::prost::Name for QueryChannelsResponse { const NAME: &'static str = "QueryChannelsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryChannelsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryChannelsResponse".into() } } /// QueryConnectionChannelsRequest is the request type for the @@ -1044,7 +1135,10 @@ impl ::prost::Name for QueryConnectionChannelsRequest { const NAME: &'static str = "QueryConnectionChannelsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryConnectionChannelsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryConnectionChannelsRequest".into() } } /// QueryConnectionChannelsResponse is the Response type for the @@ -1068,7 +1162,10 @@ impl ::prost::Name for QueryConnectionChannelsResponse { const NAME: &'static str = "QueryConnectionChannelsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryConnectionChannelsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryConnectionChannelsResponse".into() } } /// QueryChannelClientStateRequest is the request type for the Query/ClientState @@ -1087,7 +1184,10 @@ impl ::prost::Name for QueryChannelClientStateRequest { const NAME: &'static str = "QueryChannelClientStateRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryChannelClientStateRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryChannelClientStateRequest".into() } } /// QueryChannelClientStateResponse is the Response type for the @@ -1110,7 +1210,10 @@ impl ::prost::Name for QueryChannelClientStateResponse { const NAME: &'static str = "QueryChannelClientStateResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryChannelClientStateResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryChannelClientStateResponse".into() } } /// QueryChannelConsensusStateRequest is the request type for the @@ -1135,7 +1238,10 @@ impl ::prost::Name for QueryChannelConsensusStateRequest { const NAME: &'static str = "QueryChannelConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryChannelConsensusStateRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryChannelConsensusStateRequest".into() } } /// QueryChannelClientStateResponse is the Response type for the @@ -1145,7 +1251,7 @@ impl ::prost::Name for QueryChannelConsensusStateRequest { pub struct QueryChannelConsensusStateResponse { /// consensus state associated with the channel #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, + pub consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// client ID associated with the consensus state #[prost(string, tag = "2")] pub client_id: ::prost::alloc::string::String, @@ -1160,7 +1266,10 @@ impl ::prost::Name for QueryChannelConsensusStateResponse { const NAME: &'static str = "QueryChannelConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryChannelConsensusStateResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryChannelConsensusStateResponse".into() } } /// QueryPacketCommitmentRequest is the request type for the @@ -1182,7 +1291,10 @@ impl ::prost::Name for QueryPacketCommitmentRequest { const NAME: &'static str = "QueryPacketCommitmentRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketCommitmentRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketCommitmentRequest".into() } } /// QueryPacketCommitmentResponse defines the client query response for a packet @@ -1205,7 +1317,10 @@ impl ::prost::Name for QueryPacketCommitmentResponse { const NAME: &'static str = "QueryPacketCommitmentResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketCommitmentResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketCommitmentResponse".into() } } /// QueryPacketCommitmentsRequest is the request type for the @@ -1229,7 +1344,10 @@ impl ::prost::Name for QueryPacketCommitmentsRequest { const NAME: &'static str = "QueryPacketCommitmentsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketCommitmentsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketCommitmentsRequest".into() } } /// QueryPacketCommitmentsResponse is the request type for the @@ -1252,7 +1370,10 @@ impl ::prost::Name for QueryPacketCommitmentsResponse { const NAME: &'static str = "QueryPacketCommitmentsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketCommitmentsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketCommitmentsResponse".into() } } /// QueryPacketReceiptRequest is the request type for the @@ -1274,7 +1395,10 @@ impl ::prost::Name for QueryPacketReceiptRequest { const NAME: &'static str = "QueryPacketReceiptRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketReceiptRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketReceiptRequest".into() } } /// QueryPacketReceiptResponse defines the client query response for a packet @@ -1297,7 +1421,10 @@ impl ::prost::Name for QueryPacketReceiptResponse { const NAME: &'static str = "QueryPacketReceiptResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketReceiptResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketReceiptResponse".into() } } /// QueryPacketAcknowledgementRequest is the request type for the @@ -1319,7 +1446,10 @@ impl ::prost::Name for QueryPacketAcknowledgementRequest { const NAME: &'static str = "QueryPacketAcknowledgementRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketAcknowledgementRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketAcknowledgementRequest".into() } } /// QueryPacketAcknowledgementResponse defines the client query response for a @@ -1342,7 +1472,10 @@ impl ::prost::Name for QueryPacketAcknowledgementResponse { const NAME: &'static str = "QueryPacketAcknowledgementResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketAcknowledgementResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketAcknowledgementResponse".into() } } /// QueryPacketAcknowledgementsRequest is the request type for the @@ -1369,7 +1502,10 @@ impl ::prost::Name for QueryPacketAcknowledgementsRequest { const NAME: &'static str = "QueryPacketAcknowledgementsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketAcknowledgementsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketAcknowledgementsRequest".into() } } /// QueryPacketAcknowledgemetsResponse is the request type for the @@ -1392,7 +1528,10 @@ impl ::prost::Name for QueryPacketAcknowledgementsResponse { const NAME: &'static str = "QueryPacketAcknowledgementsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryPacketAcknowledgementsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse".into() } } /// QueryUnreceivedPacketsRequest is the request type for the @@ -1414,7 +1553,10 @@ impl ::prost::Name for QueryUnreceivedPacketsRequest { const NAME: &'static str = "QueryUnreceivedPacketsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryUnreceivedPacketsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryUnreceivedPacketsRequest".into() } } /// QueryUnreceivedPacketsResponse is the response type for the @@ -1433,7 +1575,10 @@ impl ::prost::Name for QueryUnreceivedPacketsResponse { const NAME: &'static str = "QueryUnreceivedPacketsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryUnreceivedPacketsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryUnreceivedPacketsResponse".into() } } /// QueryUnreceivedAcks is the request type for the @@ -1455,7 +1600,10 @@ impl ::prost::Name for QueryUnreceivedAcksRequest { const NAME: &'static str = "QueryUnreceivedAcksRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryUnreceivedAcksRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryUnreceivedAcksRequest".into() } } /// QueryUnreceivedAcksResponse is the response type for the @@ -1474,7 +1622,10 @@ impl ::prost::Name for QueryUnreceivedAcksResponse { const NAME: &'static str = "QueryUnreceivedAcksResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryUnreceivedAcksResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryUnreceivedAcksResponse".into() } } /// QueryNextSequenceReceiveRequest is the request type for the @@ -1493,7 +1644,10 @@ impl ::prost::Name for QueryNextSequenceReceiveRequest { const NAME: &'static str = "QueryNextSequenceReceiveRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryNextSequenceReceiveRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryNextSequenceReceiveRequest".into() } } /// QuerySequenceResponse is the request type for the @@ -1515,7 +1669,10 @@ impl ::prost::Name for QueryNextSequenceReceiveResponse { const NAME: &'static str = "QueryNextSequenceReceiveResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.QueryNextSequenceReceiveResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.QueryNextSequenceReceiveResponse".into() } } /// Generated client implementations. @@ -1945,7 +2102,10 @@ impl ::prost::Name for GenesisState { const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.GenesisState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.GenesisState".into() } } /// PacketSequence defines the genesis type necessary to retrieve and store @@ -1964,6 +2124,9 @@ impl ::prost::Name for PacketSequence { const NAME: &'static str = "PacketSequence"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + "ibc.core.channel.v1.PacketSequence".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.channel.v1.PacketSequence".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.client.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.client.v1.rs index 18e98186..6e6b473a 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.client.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.client.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// IdentifiedClientState defines a client state with an additional client /// identifier field. #[allow(clippy::derive_partial_eq_without_eq)] @@ -8,13 +9,16 @@ pub struct IdentifiedClientState { pub client_id: ::prost::alloc::string::String, /// client state #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::prost_types::Any>, + pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for IdentifiedClientState { const NAME: &'static str = "IdentifiedClientState"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.IdentifiedClientState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.IdentifiedClientState".into() } } /// ConsensusStateWithHeight defines a consensus state with an additional height @@ -27,13 +31,16 @@ pub struct ConsensusStateWithHeight { pub height: ::core::option::Option, /// consensus state #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, + pub consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for ConsensusStateWithHeight { const NAME: &'static str = "ConsensusStateWithHeight"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.ConsensusStateWithHeight".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.ConsensusStateWithHeight".into() } } /// ClientConsensusStates defines all the stored consensus states for a given @@ -52,7 +59,10 @@ impl ::prost::Name for ClientConsensusStates { const NAME: &'static str = "ClientConsensusStates"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.ClientConsensusStates".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.ClientConsensusStates".into() } } /// ClientUpdateProposal is a governance proposal. If it passes, the substitute @@ -80,7 +90,10 @@ impl ::prost::Name for ClientUpdateProposal { const NAME: &'static str = "ClientUpdateProposal"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.ClientUpdateProposal".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.ClientUpdateProposal".into() } } /// UpgradeProposal is a gov Content type for initiating an IBC breaking @@ -101,13 +114,16 @@ pub struct UpgradeProposal { /// of the chain. This will allow IBC connections to persist smoothly across /// planned chain upgrades #[prost(message, optional, tag = "4")] - pub upgraded_client_state: ::core::option::Option<::prost_types::Any>, + pub upgraded_client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for UpgradeProposal { const NAME: &'static str = "UpgradeProposal"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.UpgradeProposal".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.UpgradeProposal".into() } } /// Height is a monotonically increasing data type @@ -121,7 +137,7 @@ impl ::prost::Name for UpgradeProposal { /// height continues to be monitonically increasing even as the RevisionHeight /// gets reset #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Height { /// the revision that the client is currently on #[prost(uint64, tag = "1")] @@ -134,7 +150,10 @@ impl ::prost::Name for Height { const NAME: &'static str = "Height"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.Height".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.Height".into() } } /// Params defines the set of IBC light client parameters. @@ -149,7 +168,10 @@ impl ::prost::Name for Params { const NAME: &'static str = "Params"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.Params".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.Params".into() } } /// MsgCreateClient defines a message to create an IBC client @@ -158,11 +180,11 @@ impl ::prost::Name for Params { pub struct MsgCreateClient { /// light client state #[prost(message, optional, tag = "1")] - pub client_state: ::core::option::Option<::prost_types::Any>, + pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// consensus state associated with the client that corresponds to a given /// height. #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, + pub consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// signer address #[prost(string, tag = "3")] pub signer: ::prost::alloc::string::String, @@ -171,18 +193,24 @@ impl ::prost::Name for MsgCreateClient { const NAME: &'static str = "MsgCreateClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.MsgCreateClient".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.MsgCreateClient".into() } } /// MsgCreateClientResponse defines the Msg/CreateClient response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgCreateClientResponse {} impl ::prost::Name for MsgCreateClientResponse { const NAME: &'static str = "MsgCreateClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.MsgCreateClientResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.MsgCreateClientResponse".into() } } /// MsgUpdateClient defines an sdk.Msg to update a IBC client state using @@ -195,7 +223,7 @@ pub struct MsgUpdateClient { pub client_id: ::prost::alloc::string::String, /// header to update the light client #[prost(message, optional, tag = "2")] - pub header: ::core::option::Option<::prost_types::Any>, + pub header: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// signer address #[prost(string, tag = "3")] pub signer: ::prost::alloc::string::String, @@ -204,18 +232,24 @@ impl ::prost::Name for MsgUpdateClient { const NAME: &'static str = "MsgUpdateClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.MsgUpdateClient".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.MsgUpdateClient".into() } } /// MsgUpdateClientResponse defines the Msg/UpdateClient response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgUpdateClientResponse {} impl ::prost::Name for MsgUpdateClientResponse { const NAME: &'static str = "MsgUpdateClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.MsgUpdateClientResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.MsgUpdateClientResponse".into() } } /// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client @@ -228,11 +262,11 @@ pub struct MsgUpgradeClient { pub client_id: ::prost::alloc::string::String, /// upgraded client state #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::prost_types::Any>, + pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// upgraded consensus state, only contains enough information to serve as a /// basis of trust in update logic #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, + pub consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// proof that old chain committed to new client #[prost(bytes = "vec", tag = "4")] pub proof_upgrade_client: ::prost::alloc::vec::Vec, @@ -247,18 +281,24 @@ impl ::prost::Name for MsgUpgradeClient { const NAME: &'static str = "MsgUpgradeClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.MsgUpgradeClient".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.MsgUpgradeClient".into() } } /// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgUpgradeClientResponse {} impl ::prost::Name for MsgUpgradeClientResponse { const NAME: &'static str = "MsgUpgradeClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.MsgUpgradeClientResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.MsgUpgradeClientResponse".into() } } /// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for @@ -271,7 +311,7 @@ pub struct MsgSubmitMisbehaviour { pub client_id: ::prost::alloc::string::String, /// misbehaviour used for freezing the light client #[prost(message, optional, tag = "2")] - pub misbehaviour: ::core::option::Option<::prost_types::Any>, + pub misbehaviour: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// signer address #[prost(string, tag = "3")] pub signer: ::prost::alloc::string::String, @@ -280,19 +320,25 @@ impl ::prost::Name for MsgSubmitMisbehaviour { const NAME: &'static str = "MsgSubmitMisbehaviour"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.MsgSubmitMisbehaviour".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.MsgSubmitMisbehaviour".into() } } /// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response /// type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgSubmitMisbehaviourResponse {} impl ::prost::Name for MsgSubmitMisbehaviourResponse { const NAME: &'static str = "MsgSubmitMisbehaviourResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.MsgSubmitMisbehaviourResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse".into() } } /// Generated client implementations. @@ -474,7 +520,10 @@ impl ::prost::Name for QueryClientStateRequest { const NAME: &'static str = "QueryClientStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryClientStateRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryClientStateRequest".into() } } /// QueryClientStateResponse is the response type for the Query/ClientState RPC @@ -485,7 +534,7 @@ impl ::prost::Name for QueryClientStateRequest { pub struct QueryClientStateResponse { /// client state associated with the request identifier #[prost(message, optional, tag = "1")] - pub client_state: ::core::option::Option<::prost_types::Any>, + pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] pub proof: ::prost::alloc::vec::Vec, @@ -497,7 +546,10 @@ impl ::prost::Name for QueryClientStateResponse { const NAME: &'static str = "QueryClientStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryClientStateResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryClientStateResponse".into() } } /// QueryClientStatesRequest is the request type for the Query/ClientStates RPC @@ -515,7 +567,10 @@ impl ::prost::Name for QueryClientStatesRequest { const NAME: &'static str = "QueryClientStatesRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryClientStatesRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryClientStatesRequest".into() } } /// QueryClientStatesResponse is the response type for the Query/ClientStates RPC @@ -536,7 +591,10 @@ impl ::prost::Name for QueryClientStatesResponse { const NAME: &'static str = "QueryClientStatesResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryClientStatesResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryClientStatesResponse".into() } } /// QueryConsensusStateRequest is the request type for the Query/ConsensusState @@ -563,7 +621,10 @@ impl ::prost::Name for QueryConsensusStateRequest { const NAME: &'static str = "QueryConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryConsensusStateRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryConsensusStateRequest".into() } } /// QueryConsensusStateResponse is the response type for the Query/ConsensusState @@ -573,7 +634,7 @@ impl ::prost::Name for QueryConsensusStateRequest { pub struct QueryConsensusStateResponse { /// consensus state associated with the client identifier at the given height #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, + pub consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] pub proof: ::prost::alloc::vec::Vec, @@ -585,7 +646,10 @@ impl ::prost::Name for QueryConsensusStateResponse { const NAME: &'static str = "QueryConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryConsensusStateResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryConsensusStateResponse".into() } } /// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates @@ -606,7 +670,10 @@ impl ::prost::Name for QueryConsensusStatesRequest { const NAME: &'static str = "QueryConsensusStatesRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryConsensusStatesRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryConsensusStatesRequest".into() } } /// QueryConsensusStatesResponse is the response type for the @@ -627,7 +694,10 @@ impl ::prost::Name for QueryConsensusStatesResponse { const NAME: &'static str = "QueryConsensusStatesResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryConsensusStatesResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryConsensusStatesResponse".into() } } /// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC @@ -643,7 +713,10 @@ impl ::prost::Name for QueryClientStatusRequest { const NAME: &'static str = "QueryClientStatusRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryClientStatusRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryClientStatusRequest".into() } } /// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC @@ -658,19 +731,25 @@ impl ::prost::Name for QueryClientStatusResponse { const NAME: &'static str = "QueryClientStatusResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryClientStatusResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryClientStatusResponse".into() } } /// QueryClientParamsRequest is the request type for the Query/ClientParams RPC /// method. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryClientParamsRequest {} impl ::prost::Name for QueryClientParamsRequest { const NAME: &'static str = "QueryClientParamsRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryClientParamsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryClientParamsRequest".into() } } /// QueryClientParamsResponse is the response type for the Query/ClientParams RPC @@ -686,19 +765,25 @@ impl ::prost::Name for QueryClientParamsResponse { const NAME: &'static str = "QueryClientParamsResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryClientParamsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryClientParamsResponse".into() } } /// QueryUpgradedClientStateRequest is the request type for the /// Query/UpgradedClientState RPC method #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryUpgradedClientStateRequest {} impl ::prost::Name for QueryUpgradedClientStateRequest { const NAME: &'static str = "QueryUpgradedClientStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryUpgradedClientStateRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryUpgradedClientStateRequest".into() } } /// QueryUpgradedClientStateResponse is the response type for the @@ -708,25 +793,31 @@ impl ::prost::Name for QueryUpgradedClientStateRequest { pub struct QueryUpgradedClientStateResponse { /// client state associated with the request identifier #[prost(message, optional, tag = "1")] - pub upgraded_client_state: ::core::option::Option<::prost_types::Any>, + pub upgraded_client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for QueryUpgradedClientStateResponse { const NAME: &'static str = "QueryUpgradedClientStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryUpgradedClientStateResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryUpgradedClientStateResponse".into() } } /// QueryUpgradedConsensusStateRequest is the request type for the /// Query/UpgradedConsensusState RPC method #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QueryUpgradedConsensusStateRequest {} impl ::prost::Name for QueryUpgradedConsensusStateRequest { const NAME: &'static str = "QueryUpgradedConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryUpgradedConsensusStateRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryUpgradedConsensusStateRequest".into() } } /// QueryUpgradedConsensusStateResponse is the response type for the @@ -736,13 +827,16 @@ impl ::prost::Name for QueryUpgradedConsensusStateRequest { pub struct QueryUpgradedConsensusStateResponse { /// Consensus state associated with the request identifier #[prost(message, optional, tag = "1")] - pub upgraded_consensus_state: ::core::option::Option<::prost_types::Any>, + pub upgraded_consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for QueryUpgradedConsensusStateResponse { const NAME: &'static str = "QueryUpgradedConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.QueryUpgradedConsensusStateResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.QueryUpgradedConsensusStateResponse".into() } } /// Generated client implementations. @@ -1036,7 +1130,10 @@ impl ::prost::Name for GenesisState { const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.GenesisState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.GenesisState".into() } } /// GenesisMetadata defines the genesis type for metadata that clients may return @@ -1055,7 +1152,10 @@ impl ::prost::Name for GenesisMetadata { const NAME: &'static str = "GenesisMetadata"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.GenesisMetadata".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.GenesisMetadata".into() } } /// IdentifiedGenesisMetadata has the client metadata with the corresponding @@ -1072,6 +1172,9 @@ impl ::prost::Name for IdentifiedGenesisMetadata { const NAME: &'static str = "IdentifiedGenesisMetadata"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + "ibc.core.client.v1.IdentifiedGenesisMetadata".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.client.v1.IdentifiedGenesisMetadata".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.commitment.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.commitment.v1.rs index 1c0cc6ff..b528388c 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.commitment.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.commitment.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// MerkleRoot defines a merkle root hash. /// In the Cosmos SDK, the AppHash of a block header becomes the root. #[allow(clippy::derive_partial_eq_without_eq)] @@ -10,7 +11,10 @@ impl ::prost::Name for MerkleRoot { const NAME: &'static str = "MerkleRoot"; const PACKAGE: &'static str = "ibc.core.commitment.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.commitment.v1.{}", Self::NAME) + "ibc.core.commitment.v1.MerkleRoot".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.commitment.v1.MerkleRoot".into() } } /// MerklePrefix is merkle path prefixed to the key. @@ -26,7 +30,10 @@ impl ::prost::Name for MerklePrefix { const NAME: &'static str = "MerklePrefix"; const PACKAGE: &'static str = "ibc.core.commitment.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.commitment.v1.{}", Self::NAME) + "ibc.core.commitment.v1.MerklePrefix".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.commitment.v1.MerklePrefix".into() } } /// MerklePath is the path used to verify commitment proofs, which can be an @@ -42,7 +49,10 @@ impl ::prost::Name for MerklePath { const NAME: &'static str = "MerklePath"; const PACKAGE: &'static str = "ibc.core.commitment.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.commitment.v1.{}", Self::NAME) + "ibc.core.commitment.v1.MerklePath".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.commitment.v1.MerklePath".into() } } /// MerkleProof is a wrapper type over a chain of CommitmentProofs. @@ -60,6 +70,9 @@ impl ::prost::Name for MerkleProof { const NAME: &'static str = "MerkleProof"; const PACKAGE: &'static str = "ibc.core.commitment.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.commitment.v1.{}", Self::NAME) + "ibc.core.commitment.v1.MerkleProof".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.commitment.v1.MerkleProof".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.connection.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.connection.v1.rs index 2a41cc77..1e97642f 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.connection.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.connection.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ConnectionEnd defines a stateful object on a chain connected to another /// separate one. /// NOTE: there must only be 2 defined ConnectionEnds to establish @@ -28,7 +29,10 @@ impl ::prost::Name for ConnectionEnd { const NAME: &'static str = "ConnectionEnd"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.ConnectionEnd".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.ConnectionEnd".into() } } /// IdentifiedConnection defines a connection with additional connection @@ -60,7 +64,10 @@ impl ::prost::Name for IdentifiedConnection { const NAME: &'static str = "IdentifiedConnection"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.IdentifiedConnection".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.IdentifiedConnection".into() } } /// Counterparty defines the counterparty chain associated with a connection end. @@ -83,7 +90,10 @@ impl ::prost::Name for Counterparty { const NAME: &'static str = "Counterparty"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.Counterparty".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.Counterparty".into() } } /// ClientPaths define all the connection paths for a client state. @@ -98,7 +108,10 @@ impl ::prost::Name for ClientPaths { const NAME: &'static str = "ClientPaths"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.ClientPaths".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.ClientPaths".into() } } /// ConnectionPaths define all the connection paths for a given client state. @@ -116,7 +129,10 @@ impl ::prost::Name for ConnectionPaths { const NAME: &'static str = "ConnectionPaths"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.ConnectionPaths".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.ConnectionPaths".into() } } /// Version defines the versioning scheme used to negotiate the IBC verison in @@ -135,12 +151,15 @@ impl ::prost::Name for Version { const NAME: &'static str = "Version"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.Version".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.Version".into() } } /// Params defines the set of Connection parameters. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Params { /// maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the /// largest amount of time that the chain might reasonably take to produce the next block under normal operating @@ -152,7 +171,10 @@ impl ::prost::Name for Params { const NAME: &'static str = "Params"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.Params".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.Params".into() } } /// State defines if a connection is in one of the following states: @@ -214,19 +236,25 @@ impl ::prost::Name for MsgConnectionOpenInit { const NAME: &'static str = "MsgConnectionOpenInit"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.MsgConnectionOpenInit".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.MsgConnectionOpenInit".into() } } /// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response /// type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgConnectionOpenInitResponse {} impl ::prost::Name for MsgConnectionOpenInitResponse { const NAME: &'static str = "MsgConnectionOpenInitResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.MsgConnectionOpenInitResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.MsgConnectionOpenInitResponse".into() } } /// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a @@ -241,7 +269,7 @@ pub struct MsgConnectionOpenTry { #[prost(string, tag = "2")] pub previous_connection_id: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] - pub client_state: ::core::option::Option<::prost_types::Any>, + pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, optional, tag = "4")] pub counterparty: ::core::option::Option, #[prost(uint64, tag = "5")] @@ -269,18 +297,24 @@ impl ::prost::Name for MsgConnectionOpenTry { const NAME: &'static str = "MsgConnectionOpenTry"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.MsgConnectionOpenTry".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.MsgConnectionOpenTry".into() } } /// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgConnectionOpenTryResponse {} impl ::prost::Name for MsgConnectionOpenTryResponse { const NAME: &'static str = "MsgConnectionOpenTryResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.MsgConnectionOpenTryResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.MsgConnectionOpenTryResponse".into() } } /// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to @@ -295,7 +329,7 @@ pub struct MsgConnectionOpenAck { #[prost(message, optional, tag = "3")] pub version: ::core::option::Option, #[prost(message, optional, tag = "4")] - pub client_state: ::core::option::Option<::prost_types::Any>, + pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, optional, tag = "5")] pub proof_height: ::core::option::Option, /// proof of the initialization the connection on Chain B: `UNITIALIZED -> @@ -317,18 +351,24 @@ impl ::prost::Name for MsgConnectionOpenAck { const NAME: &'static str = "MsgConnectionOpenAck"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.MsgConnectionOpenAck".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.MsgConnectionOpenAck".into() } } /// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgConnectionOpenAckResponse {} impl ::prost::Name for MsgConnectionOpenAckResponse { const NAME: &'static str = "MsgConnectionOpenAckResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.MsgConnectionOpenAckResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.MsgConnectionOpenAckResponse".into() } } /// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to @@ -350,19 +390,25 @@ impl ::prost::Name for MsgConnectionOpenConfirm { const NAME: &'static str = "MsgConnectionOpenConfirm"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.MsgConnectionOpenConfirm".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.MsgConnectionOpenConfirm".into() } } /// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm /// response type. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MsgConnectionOpenConfirmResponse {} impl ::prost::Name for MsgConnectionOpenConfirmResponse { const NAME: &'static str = "MsgConnectionOpenConfirmResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.MsgConnectionOpenConfirmResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse".into() } } /// Generated client implementations. @@ -559,7 +605,10 @@ impl ::prost::Name for QueryConnectionRequest { const NAME: &'static str = "QueryConnectionRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryConnectionRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryConnectionRequest".into() } } /// QueryConnectionResponse is the response type for the Query/Connection RPC @@ -582,7 +631,10 @@ impl ::prost::Name for QueryConnectionResponse { const NAME: &'static str = "QueryConnectionResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryConnectionResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryConnectionResponse".into() } } /// QueryConnectionsRequest is the request type for the Query/Connections RPC @@ -599,7 +651,10 @@ impl ::prost::Name for QueryConnectionsRequest { const NAME: &'static str = "QueryConnectionsRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryConnectionsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryConnectionsRequest".into() } } /// QueryConnectionsResponse is the response type for the Query/Connections RPC @@ -623,7 +678,10 @@ impl ::prost::Name for QueryConnectionsResponse { const NAME: &'static str = "QueryConnectionsResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryConnectionsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryConnectionsResponse".into() } } /// QueryClientConnectionsRequest is the request type for the @@ -639,7 +697,10 @@ impl ::prost::Name for QueryClientConnectionsRequest { const NAME: &'static str = "QueryClientConnectionsRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryClientConnectionsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryClientConnectionsRequest".into() } } /// QueryClientConnectionsResponse is the response type for the @@ -661,7 +722,10 @@ impl ::prost::Name for QueryClientConnectionsResponse { const NAME: &'static str = "QueryClientConnectionsResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryClientConnectionsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryClientConnectionsResponse".into() } } /// QueryConnectionClientStateRequest is the request type for the @@ -677,7 +741,10 @@ impl ::prost::Name for QueryConnectionClientStateRequest { const NAME: &'static str = "QueryConnectionClientStateRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryConnectionClientStateRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryConnectionClientStateRequest".into() } } /// QueryConnectionClientStateResponse is the response type for the @@ -700,7 +767,10 @@ impl ::prost::Name for QueryConnectionClientStateResponse { const NAME: &'static str = "QueryConnectionClientStateResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryConnectionClientStateResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryConnectionClientStateResponse".into() } } /// QueryConnectionConsensusStateRequest is the request type for the @@ -720,7 +790,10 @@ impl ::prost::Name for QueryConnectionConsensusStateRequest { const NAME: &'static str = "QueryConnectionConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryConnectionConsensusStateRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryConnectionConsensusStateRequest".into() } } /// QueryConnectionConsensusStateResponse is the response type for the @@ -730,7 +803,7 @@ impl ::prost::Name for QueryConnectionConsensusStateRequest { pub struct QueryConnectionConsensusStateResponse { /// consensus state associated with the channel #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, + pub consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// client ID associated with the consensus state #[prost(string, tag = "2")] pub client_id: ::prost::alloc::string::String, @@ -745,7 +818,10 @@ impl ::prost::Name for QueryConnectionConsensusStateResponse { const NAME: &'static str = "QueryConnectionConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.QueryConnectionConsensusStateResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.QueryConnectionConsensusStateResponse".into() } } /// Generated client implementations. @@ -977,6 +1053,9 @@ impl ::prost::Name for GenesisState { const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + "ibc.core.connection.v1.GenesisState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.connection.v1.GenesisState".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.types.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.types.v1.rs index 06e4e3d3..0b2718c5 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.types.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.core.types.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// GenesisState defines the ibc module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -16,6 +17,9 @@ impl ::prost::Name for GenesisState { const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.core.types.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.types.v1.{}", Self::NAME) + "ibc.core.types.v1.GenesisState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.core.types.v1.GenesisState".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.localhost.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.localhost.v1.rs index 4fe8fe76..e5413e37 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.localhost.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.localhost.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ClientState defines a loopback (localhost) client. It requires (read-only) /// access to keys outside the client prefix. #[allow(clippy::derive_partial_eq_without_eq)] @@ -14,6 +15,9 @@ impl ::prost::Name for ClientState { const NAME: &'static str = "ClientState"; const PACKAGE: &'static str = "ibc.lightclients.localhost.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.localhost.v1.{}", Self::NAME) + "ibc.lightclients.localhost.v1.ClientState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.localhost.v1.ClientState".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v1.rs index f8ca6373..4c3e232e 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ClientState defines a solo machine client that tracks the current consensus /// state and if the client is frozen. #[allow(clippy::derive_partial_eq_without_eq)] @@ -20,7 +21,10 @@ impl ::prost::Name for ClientState { const NAME: &'static str = "ClientState"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.ClientState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.ClientState".into() } } /// ConsensusState defines a solo machine consensus state. The sequence of a @@ -31,7 +35,7 @@ impl ::prost::Name for ClientState { pub struct ConsensusState { /// public key of the solo machine #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::prost_types::Any>, + pub public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// diversifier allows the same public key to be re-used across different solo /// machine clients (potentially on different chains) without being considered /// misbehaviour. @@ -44,7 +48,10 @@ impl ::prost::Name for ConsensusState { const NAME: &'static str = "ConsensusState"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.ConsensusState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.ConsensusState".into() } } /// Header defines a solo machine consensus header @@ -59,7 +66,7 @@ pub struct Header { #[prost(bytes = "vec", tag = "3")] pub signature: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] - pub new_public_key: ::core::option::Option<::prost_types::Any>, + pub new_public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(string, tag = "5")] pub new_diversifier: ::prost::alloc::string::String, } @@ -67,7 +74,10 @@ impl ::prost::Name for Header { const NAME: &'static str = "Header"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.Header".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.Header".into() } } /// Misbehaviour defines misbehaviour for a solo machine which consists @@ -88,7 +98,10 @@ impl ::prost::Name for Misbehaviour { const NAME: &'static str = "Misbehaviour"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.Misbehaviour".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.Misbehaviour".into() } } /// SignatureAndData contains a signature and the data signed over to create that @@ -109,7 +122,10 @@ impl ::prost::Name for SignatureAndData { const NAME: &'static str = "SignatureAndData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.SignatureAndData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.SignatureAndData".into() } } /// TimestampedSignatureData contains the signature data and the timestamp of the @@ -126,7 +142,10 @@ impl ::prost::Name for TimestampedSignatureData { const NAME: &'static str = "TimestampedSignatureData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.TimestampedSignatureData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.TimestampedSignatureData".into() } } /// SignBytes defines the signed bytes used for signature verification. @@ -150,7 +169,10 @@ impl ::prost::Name for SignBytes { const NAME: &'static str = "SignBytes"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.SignBytes".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.SignBytes".into() } } /// HeaderData returns the SignBytes data for update verification. @@ -159,7 +181,7 @@ impl ::prost::Name for SignBytes { pub struct HeaderData { /// header public key #[prost(message, optional, tag = "1")] - pub new_pub_key: ::core::option::Option<::prost_types::Any>, + pub new_pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// header diversifier #[prost(string, tag = "2")] pub new_diversifier: ::prost::alloc::string::String, @@ -168,7 +190,10 @@ impl ::prost::Name for HeaderData { const NAME: &'static str = "HeaderData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.HeaderData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.HeaderData".into() } } /// ClientStateData returns the SignBytes data for client state verification. @@ -178,13 +203,16 @@ pub struct ClientStateData { #[prost(bytes = "vec", tag = "1")] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::prost_types::Any>, + pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for ClientStateData { const NAME: &'static str = "ClientStateData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.ClientStateData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.ClientStateData".into() } } /// ConsensusStateData returns the SignBytes data for consensus state @@ -195,13 +223,16 @@ pub struct ConsensusStateData { #[prost(bytes = "vec", tag = "1")] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, + pub consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for ConsensusStateData { const NAME: &'static str = "ConsensusStateData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.ConsensusStateData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.ConsensusStateData".into() } } /// ConnectionStateData returns the SignBytes data for connection state @@ -219,7 +250,10 @@ impl ::prost::Name for ConnectionStateData { const NAME: &'static str = "ConnectionStateData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.ConnectionStateData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.ConnectionStateData".into() } } /// ChannelStateData returns the SignBytes data for channel state @@ -236,7 +270,10 @@ impl ::prost::Name for ChannelStateData { const NAME: &'static str = "ChannelStateData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.ChannelStateData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.ChannelStateData".into() } } /// PacketCommitmentData returns the SignBytes data for packet commitment @@ -253,7 +290,10 @@ impl ::prost::Name for PacketCommitmentData { const NAME: &'static str = "PacketCommitmentData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.PacketCommitmentData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.PacketCommitmentData".into() } } /// PacketAcknowledgementData returns the SignBytes data for acknowledgement @@ -270,7 +310,10 @@ impl ::prost::Name for PacketAcknowledgementData { const NAME: &'static str = "PacketAcknowledgementData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.PacketAcknowledgementData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.PacketAcknowledgementData".into() } } /// PacketReceiptAbsenceData returns the SignBytes data for @@ -285,7 +328,10 @@ impl ::prost::Name for PacketReceiptAbsenceData { const NAME: &'static str = "PacketReceiptAbsenceData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.PacketReceiptAbsenceData".into() } } /// NextSequenceRecvData returns the SignBytes data for verification of the next @@ -302,7 +348,10 @@ impl ::prost::Name for NextSequenceRecvData { const NAME: &'static str = "NextSequenceRecvData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v1.{}", Self::NAME) + "ibc.lightclients.solomachine.v1.NextSequenceRecvData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v1.NextSequenceRecvData".into() } } /// DataType defines the type of solo machine proof being created. This is done diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v2.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v2.rs index 958de772..1b4120c6 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v2.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.solomachine.v2.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ClientState defines a solo machine client that tracks the current consensus /// state and if the client is frozen. #[allow(clippy::derive_partial_eq_without_eq)] @@ -20,7 +21,10 @@ impl ::prost::Name for ClientState { const NAME: &'static str = "ClientState"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.ClientState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.ClientState".into() } } /// ConsensusState defines a solo machine consensus state. The sequence of a @@ -31,7 +35,7 @@ impl ::prost::Name for ClientState { pub struct ConsensusState { /// public key of the solo machine #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::prost_types::Any>, + pub public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// diversifier allows the same public key to be re-used across different solo /// machine clients (potentially on different chains) without being considered /// misbehaviour. @@ -44,7 +48,10 @@ impl ::prost::Name for ConsensusState { const NAME: &'static str = "ConsensusState"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.ConsensusState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.ConsensusState".into() } } /// Header defines a solo machine consensus header @@ -59,7 +66,7 @@ pub struct Header { #[prost(bytes = "vec", tag = "3")] pub signature: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] - pub new_public_key: ::core::option::Option<::prost_types::Any>, + pub new_public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(string, tag = "5")] pub new_diversifier: ::prost::alloc::string::String, } @@ -67,7 +74,10 @@ impl ::prost::Name for Header { const NAME: &'static str = "Header"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.Header".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.Header".into() } } /// Misbehaviour defines misbehaviour for a solo machine which consists @@ -88,7 +98,10 @@ impl ::prost::Name for Misbehaviour { const NAME: &'static str = "Misbehaviour"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.Misbehaviour".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.Misbehaviour".into() } } /// SignatureAndData contains a signature and the data signed over to create that @@ -109,7 +122,10 @@ impl ::prost::Name for SignatureAndData { const NAME: &'static str = "SignatureAndData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.SignatureAndData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.SignatureAndData".into() } } /// TimestampedSignatureData contains the signature data and the timestamp of the @@ -126,7 +142,10 @@ impl ::prost::Name for TimestampedSignatureData { const NAME: &'static str = "TimestampedSignatureData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.TimestampedSignatureData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.TimestampedSignatureData".into() } } /// SignBytes defines the signed bytes used for signature verification. @@ -150,7 +169,10 @@ impl ::prost::Name for SignBytes { const NAME: &'static str = "SignBytes"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.SignBytes".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.SignBytes".into() } } /// HeaderData returns the SignBytes data for update verification. @@ -159,7 +181,7 @@ impl ::prost::Name for SignBytes { pub struct HeaderData { /// header public key #[prost(message, optional, tag = "1")] - pub new_pub_key: ::core::option::Option<::prost_types::Any>, + pub new_pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// header diversifier #[prost(string, tag = "2")] pub new_diversifier: ::prost::alloc::string::String, @@ -168,7 +190,10 @@ impl ::prost::Name for HeaderData { const NAME: &'static str = "HeaderData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.HeaderData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.HeaderData".into() } } /// ClientStateData returns the SignBytes data for client state verification. @@ -178,13 +203,16 @@ pub struct ClientStateData { #[prost(bytes = "vec", tag = "1")] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option<::prost_types::Any>, + pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for ClientStateData { const NAME: &'static str = "ClientStateData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.ClientStateData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.ClientStateData".into() } } /// ConsensusStateData returns the SignBytes data for consensus state @@ -195,13 +223,16 @@ pub struct ConsensusStateData { #[prost(bytes = "vec", tag = "1")] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option<::prost_types::Any>, + pub consensus_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } impl ::prost::Name for ConsensusStateData { const NAME: &'static str = "ConsensusStateData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.ConsensusStateData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.ConsensusStateData".into() } } /// ConnectionStateData returns the SignBytes data for connection state @@ -219,7 +250,10 @@ impl ::prost::Name for ConnectionStateData { const NAME: &'static str = "ConnectionStateData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.ConnectionStateData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.ConnectionStateData".into() } } /// ChannelStateData returns the SignBytes data for channel state @@ -236,7 +270,10 @@ impl ::prost::Name for ChannelStateData { const NAME: &'static str = "ChannelStateData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.ChannelStateData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.ChannelStateData".into() } } /// PacketCommitmentData returns the SignBytes data for packet commitment @@ -253,7 +290,10 @@ impl ::prost::Name for PacketCommitmentData { const NAME: &'static str = "PacketCommitmentData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.PacketCommitmentData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.PacketCommitmentData".into() } } /// PacketAcknowledgementData returns the SignBytes data for acknowledgement @@ -270,7 +310,10 @@ impl ::prost::Name for PacketAcknowledgementData { const NAME: &'static str = "PacketAcknowledgementData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.PacketAcknowledgementData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.PacketAcknowledgementData".into() } } /// PacketReceiptAbsenceData returns the SignBytes data for @@ -285,7 +328,10 @@ impl ::prost::Name for PacketReceiptAbsenceData { const NAME: &'static str = "PacketReceiptAbsenceData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData".into() } } /// NextSequenceRecvData returns the SignBytes data for verification of the next @@ -302,7 +348,10 @@ impl ::prost::Name for NextSequenceRecvData { const NAME: &'static str = "NextSequenceRecvData"; const PACKAGE: &'static str = "ibc.lightclients.solomachine.v2"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.solomachine.v2.{}", Self::NAME) + "ibc.lightclients.solomachine.v2.NextSequenceRecvData".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.solomachine.v2.NextSequenceRecvData".into() } } /// DataType defines the type of solo machine proof being created. This is done diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.tendermint.v1.rs b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.tendermint.v1.rs index 4819686b..4f539584 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.tendermint.v1.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ibc.lightclients.tendermint.v1.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// ClientState from Tendermint tracks the current validator set, latest height, /// and a possible frozen height. #[allow(clippy::derive_partial_eq_without_eq)] @@ -10,13 +11,13 @@ pub struct ClientState { /// duration of the period since the LastestTimestamp during which the /// submitted headers are valid for upgrade #[prost(message, optional, tag = "3")] - pub trusting_period: ::core::option::Option<::prost_types::Duration>, + pub trusting_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// duration of the staking unbonding period #[prost(message, optional, tag = "4")] - pub unbonding_period: ::core::option::Option<::prost_types::Duration>, + pub unbonding_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// defines how much new (untrusted) header's Time can drift into the future. #[prost(message, optional, tag = "5")] - pub max_clock_drift: ::core::option::Option<::prost_types::Duration>, + pub max_clock_drift: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// Block height when the client was frozen due to a misbehaviour #[prost(message, optional, tag = "6")] pub frozen_height: ::core::option::Option, @@ -48,7 +49,10 @@ impl ::prost::Name for ClientState { const NAME: &'static str = "ClientState"; const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.tendermint.v1.{}", Self::NAME) + "ibc.lightclients.tendermint.v1.ClientState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.tendermint.v1.ClientState".into() } } /// ConsensusState defines the consensus state from Tendermint. @@ -58,7 +62,7 @@ pub struct ConsensusState { /// timestamp that corresponds to the block height in which the ConsensusState /// was stored. #[prost(message, optional, tag = "1")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, + pub timestamp: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// commitment root (i.e app hash) #[prost(message, optional, tag = "2")] pub root: ::core::option::Option, @@ -69,7 +73,10 @@ impl ::prost::Name for ConsensusState { const NAME: &'static str = "ConsensusState"; const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.tendermint.v1.{}", Self::NAME) + "ibc.lightclients.tendermint.v1.ConsensusState".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.tendermint.v1.ConsensusState".into() } } /// Misbehaviour is a wrapper over two conflicting Headers @@ -88,7 +95,10 @@ impl ::prost::Name for Misbehaviour { const NAME: &'static str = "Misbehaviour"; const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.tendermint.v1.{}", Self::NAME) + "ibc.lightclients.tendermint.v1.Misbehaviour".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.tendermint.v1.Misbehaviour".into() } } /// Header defines the Tendermint client consensus Header. @@ -119,13 +129,16 @@ impl ::prost::Name for Header { const NAME: &'static str = "Header"; const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.tendermint.v1.{}", Self::NAME) + "ibc.lightclients.tendermint.v1.Header".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.tendermint.v1.Header".into() } } /// Fraction defines the protobuf message type for tmmath.Fraction that only /// supports positive values. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Fraction { #[prost(uint64, tag = "1")] pub numerator: u64, @@ -136,6 +149,9 @@ impl ::prost::Name for Fraction { const NAME: &'static str = "Fraction"; const PACKAGE: &'static str = "ibc.lightclients.tendermint.v1"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.tendermint.v1.{}", Self::NAME) + "ibc.lightclients.tendermint.v1.Fraction".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ibc.lightclients.tendermint.v1.Fraction".into() } } diff --git a/cosmos-sdk-proto/src/prost/ibc-go/ics23.rs b/cosmos-sdk-proto/src/prost/ibc-go/ics23.rs index a011ad65..f2404b16 100644 --- a/cosmos-sdk-proto/src/prost/ibc-go/ics23.rs +++ b/cosmos-sdk-proto/src/prost/ibc-go/ics23.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// * /// ExistenceProof takes a key and a value and a set of steps to perform on it. /// The result of peforming all these steps will provide a "root hash", which can @@ -34,7 +35,10 @@ impl ::prost::Name for ExistenceProof { const NAME: &'static str = "ExistenceProof"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.ExistenceProof".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.ExistenceProof".into() } } /// @@ -56,7 +60,10 @@ impl ::prost::Name for NonExistenceProof { const NAME: &'static str = "NonExistenceProof"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.NonExistenceProof".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.NonExistenceProof".into() } } /// @@ -86,7 +93,10 @@ impl ::prost::Name for CommitmentProof { const NAME: &'static str = "CommitmentProof"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.CommitmentProof".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.CommitmentProof".into() } } /// * @@ -124,7 +134,10 @@ impl ::prost::Name for LeafOp { const NAME: &'static str = "LeafOp"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.LeafOp".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.LeafOp".into() } } /// * @@ -157,7 +170,10 @@ impl ::prost::Name for InnerOp { const NAME: &'static str = "InnerOp"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.InnerOp".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.InnerOp".into() } } /// * @@ -191,7 +207,10 @@ impl ::prost::Name for ProofSpec { const NAME: &'static str = "ProofSpec"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.ProofSpec".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.ProofSpec".into() } } /// @@ -228,7 +247,10 @@ impl ::prost::Name for InnerSpec { const NAME: &'static str = "InnerSpec"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.InnerSpec".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.InnerSpec".into() } } /// @@ -243,7 +265,10 @@ impl ::prost::Name for BatchProof { const NAME: &'static str = "BatchProof"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.BatchProof".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.BatchProof".into() } } /// Use BatchEntry not CommitmentProof, to avoid recursion @@ -268,7 +293,10 @@ impl ::prost::Name for BatchEntry { const NAME: &'static str = "BatchEntry"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.BatchEntry".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.BatchEntry".into() } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -283,7 +311,10 @@ impl ::prost::Name for CompressedBatchProof { const NAME: &'static str = "CompressedBatchProof"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.CompressedBatchProof".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.CompressedBatchProof".into() } } /// Use BatchEntry not CommitmentProof, to avoid recursion @@ -308,7 +339,10 @@ impl ::prost::Name for CompressedBatchEntry { const NAME: &'static str = "CompressedBatchEntry"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.CompressedBatchEntry".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.CompressedBatchEntry".into() } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -328,7 +362,10 @@ impl ::prost::Name for CompressedExistenceProof { const NAME: &'static str = "CompressedExistenceProof"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.CompressedExistenceProof".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.CompressedExistenceProof".into() } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -346,7 +383,10 @@ impl ::prost::Name for CompressedNonExistenceProof { const NAME: &'static str = "CompressedNonExistenceProof"; const PACKAGE: &'static str = "ics23"; fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ics23.{}", Self::NAME) + "ics23.CompressedNonExistenceProof".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/ics23.CompressedNonExistenceProof".into() } } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs index f37d3872..86f391b5 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.rs @@ -6,6 +6,7 @@ /// Foo some_parameter = 1; /// PageRequest pagination = 2; /// } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PageRequest { /// key is a value returned in PageResponse.next_key to begin @@ -41,6 +42,7 @@ pub struct PageRequest { /// repeated Bar results = 1; /// PageResponse page = 2; /// } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PageResponse { /// next_key is the key to be passed to PageRequest.key to diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs index cc4421b2..3701a1a8 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.rs @@ -3,6 +3,7 @@ /// /// NOTE: The amount field is an Int which implements the custom method /// signatures required by gogoproto. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Coin { #[prost(string, tag = "1")] @@ -14,6 +15,7 @@ pub struct Coin { /// /// NOTE: The amount field is an Dec which implements the custom method /// signatures required by gogoproto. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecCoin { #[prost(string, tag = "1")] @@ -22,12 +24,14 @@ pub struct DecCoin { pub amount: ::prost::alloc::string::String, } /// IntProto defines a Protobuf wrapper around an Int object. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IntProto { #[prost(string, tag = "1")] pub int: ::prost::alloc::string::String, } /// DecProto defines a Protobuf wrapper around a Dec object. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecProto { #[prost(string, tag = "1")] diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs index a74f2b1e..29320227 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.rs @@ -1,6 +1,7 @@ // @generated /// InterfaceDescriptor describes an interface type to be used with /// accepts_interface and implements_interface and declared by declare_interface. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InterfaceDescriptor { /// name is the name of the interface. It should be a short-name (without @@ -21,6 +22,7 @@ pub struct InterfaceDescriptor { /// Scalars should ideally define an encoding such that there is only one /// valid syntactical representation for a given semantic meaning, /// i.e. the encoding should be deterministic. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScalarDescriptor { /// name is the name of the scalar. It should be a short-name (without @@ -60,5 +62,14 @@ impl ScalarType { ScalarType::Bytes => "SCALAR_TYPE_BYTES", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SCALAR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "SCALAR_TYPE_STRING" => Some(Self::String), + "SCALAR_TYPE_BYTES" => Some(Self::Bytes), + _ => None, + } + } } // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs index d2ed2ea6..6ba3d723 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs @@ -1,11 +1,13 @@ // @generated /// AccessTypeParam +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccessTypeParam { #[prost(enumeration = "AccessType", tag = "1")] pub value: i32, } /// AccessConfig access control type. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccessConfig { #[prost(enumeration = "AccessType", tag = "1")] @@ -18,6 +20,7 @@ pub struct AccessConfig { pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Params defines the set of wasm parameters. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(message, optional, tag = "1")] @@ -26,6 +29,7 @@ pub struct Params { pub instantiate_default_permission: i32, } /// CodeInfo is data for the uploaded contract WASM code +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CodeInfo { /// CodeHash is the unique identifier created by wasmvm @@ -39,6 +43,7 @@ pub struct CodeInfo { pub instantiate_config: ::core::option::Option, } /// ContractInfo stores a WASM contract instance +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContractInfo { /// CodeID is the reference to the stored Wasm code @@ -63,9 +68,10 @@ pub struct ContractInfo { /// Extension is an extension point to store custom metadata within the /// persistence model. #[prost(message, optional, tag = "7")] - pub extension: ::core::option::Option<::prost_types::Any>, + pub extension: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// ContractCodeHistoryEntry metadata to a contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContractCodeHistoryEntry { #[prost(enumeration = "ContractCodeHistoryOperationType", tag = "1")] @@ -81,6 +87,7 @@ pub struct ContractCodeHistoryEntry { } /// AbsoluteTxPosition is a unique transaction position that allows for global /// ordering of transactions. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbsoluteTxPosition { /// BlockHeight is the block the contract was created at @@ -92,6 +99,7 @@ pub struct AbsoluteTxPosition { pub tx_index: u64, } /// Model is a struct that holds a KV pair +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Model { /// hex-encode key to read it better (this is often ascii) @@ -131,6 +139,17 @@ impl AccessType { AccessType::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "ACCESS_TYPE_NOBODY" => Some(Self::Nobody), + "ACCESS_TYPE_ONLY_ADDRESS" => Some(Self::OnlyAddress), + "ACCESS_TYPE_EVERYBODY" => Some(Self::Everybody), + "ACCESS_TYPE_ANY_OF_ADDRESSES" => Some(Self::AnyOfAddresses), + _ => None, + } + } } /// ContractCodeHistoryOperationType actions that caused a code change #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -164,8 +183,19 @@ impl ContractCodeHistoryOperationType { } } } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT" => Some(Self::Init), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" => Some(Self::Migrate), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" => Some(Self::Genesis), + _ => None, + } + } } /// MsgStoreCode submit Wasm code to the system +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgStoreCode { /// Sender is the that actor that signed the messages @@ -180,6 +210,7 @@ pub struct MsgStoreCode { pub instantiate_permission: ::core::option::Option, } /// MsgStoreCodeResponse returns store result data. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgStoreCodeResponse { /// CodeID is the reference to the stored WASM code @@ -191,6 +222,7 @@ pub struct MsgStoreCodeResponse { } /// MsgInstantiateContract create a new smart contract instance for the given /// code id. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgInstantiateContract { /// Sender is the that actor that signed the messages @@ -214,6 +246,7 @@ pub struct MsgInstantiateContract { } /// MsgInstantiateContract2 create a new smart contract instance for the given /// code id with a predicable address. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgInstantiateContract2 { /// Sender is the that actor that signed the messages @@ -243,6 +276,7 @@ pub struct MsgInstantiateContract2 { pub fix_msg: bool, } /// MsgInstantiateContractResponse return instantiation result data +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgInstantiateContractResponse { /// Address is the bech32 address of the new contract instance. @@ -253,6 +287,7 @@ pub struct MsgInstantiateContractResponse { pub data: ::prost::alloc::vec::Vec, } /// MsgInstantiateContract2Response return instantiation result data +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgInstantiateContract2Response { /// Address is the bech32 address of the new contract instance. @@ -263,6 +298,7 @@ pub struct MsgInstantiateContract2Response { pub data: ::prost::alloc::vec::Vec, } /// MsgExecuteContract submits the given message data to a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecuteContract { /// Sender is the that actor that signed the messages @@ -279,6 +315,7 @@ pub struct MsgExecuteContract { pub funds: ::prost::alloc::vec::Vec, } /// MsgExecuteContractResponse returns execution result data. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgExecuteContractResponse { /// Data contains bytes to returned from the contract @@ -286,6 +323,7 @@ pub struct MsgExecuteContractResponse { pub data: ::prost::alloc::vec::Vec, } /// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMigrateContract { /// Sender is the that actor that signed the messages @@ -302,6 +340,7 @@ pub struct MsgMigrateContract { pub msg: ::prost::alloc::vec::Vec, } /// MsgMigrateContractResponse returns contract migration result data. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgMigrateContractResponse { /// Data contains same raw bytes returned as data from the wasm contract. @@ -310,6 +349,7 @@ pub struct MsgMigrateContractResponse { pub data: ::prost::alloc::vec::Vec, } /// MsgUpdateAdmin sets a new admin for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateAdmin { /// Sender is the that actor that signed the messages @@ -323,9 +363,11 @@ pub struct MsgUpdateAdmin { pub contract: ::prost::alloc::string::String, } /// MsgUpdateAdminResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateAdminResponse {} /// MsgClearAdmin removes any admin stored for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgClearAdmin { /// Sender is the that actor that signed the messages @@ -336,9 +378,11 @@ pub struct MsgClearAdmin { pub contract: ::prost::alloc::string::String, } /// MsgClearAdminResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgClearAdminResponse {} /// GenesisState - genesis state of x/wasm +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, optional, tag = "1")] @@ -356,6 +400,7 @@ pub struct GenesisState { pub mod genesis_state { /// GenMsgs define the messages that can be executed during genesis phase in /// order. The intention is to have more human readable data that is auditable. + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenMsgs { /// sum is a single message @@ -365,6 +410,7 @@ pub mod genesis_state { /// Nested message and enum types in `GenMsgs`. pub mod gen_msgs { /// sum is a single message + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Sum { #[prost(message, tag = "1")] @@ -379,6 +425,7 @@ pub mod genesis_state { } } /// Code struct encompasses CodeInfo and CodeBytes +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Code { #[prost(uint64, tag = "1")] @@ -392,6 +439,7 @@ pub struct Code { pub pinned: bool, } /// Contract struct encompasses ContractAddress, ContractInfo, and ContractState +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Contract { #[prost(string, tag = "1")] @@ -402,6 +450,7 @@ pub struct Contract { pub contract_state: ::prost::alloc::vec::Vec, } /// Sequence key and value of an id generation counter +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Sequence { #[prost(bytes = "vec", tag = "1")] @@ -410,6 +459,7 @@ pub struct Sequence { pub value: u64, } /// MsgIBCSend +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgIbcSend { /// the channel by which the packet will be sent @@ -429,12 +479,14 @@ pub struct MsgIbcSend { pub data: ::prost::alloc::vec::Vec, } /// MsgIBCCloseChannel port and channel need to be owned by the contract +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgIbcCloseChannel { #[prost(string, tag = "2")] pub channel: ::prost::alloc::string::String, } /// StoreCodeProposal gov proposal content type to submit WASM code to the system +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreCodeProposal { /// Title is a short summary @@ -458,6 +510,7 @@ pub struct StoreCodeProposal { } /// InstantiateContractProposal gov proposal content type to instantiate a /// contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InstantiateContractProposal { /// Title is a short summary @@ -486,6 +539,7 @@ pub struct InstantiateContractProposal { pub funds: ::prost::alloc::vec::Vec, } /// MigrateContractProposal gov proposal content type to migrate a contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateContractProposal { /// Title is a short summary @@ -507,6 +561,7 @@ pub struct MigrateContractProposal { pub msg: ::prost::alloc::vec::Vec, } /// SudoContractProposal gov proposal content type to call sudo on a contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SudoContractProposal { /// Title is a short summary @@ -524,6 +579,7 @@ pub struct SudoContractProposal { } /// ExecuteContractProposal gov proposal content type to call execute on a /// contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecuteContractProposal { /// Title is a short summary @@ -546,6 +602,7 @@ pub struct ExecuteContractProposal { pub funds: ::prost::alloc::vec::Vec, } /// UpdateAdminProposal gov proposal content type to set an admin for a contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateAdminProposal { /// Title is a short summary @@ -563,6 +620,7 @@ pub struct UpdateAdminProposal { } /// ClearAdminProposal gov proposal content type to clear the admin of a /// contract. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClearAdminProposal { /// Title is a short summary @@ -577,6 +635,7 @@ pub struct ClearAdminProposal { } /// PinCodesProposal gov proposal content type to pin a set of code ids in the /// wasmvm cache. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PinCodesProposal { /// Title is a short summary @@ -591,6 +650,7 @@ pub struct PinCodesProposal { } /// UnpinCodesProposal gov proposal content type to unpin a set of code ids in /// the wasmvm cache. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnpinCodesProposal { /// Title is a short summary @@ -605,6 +665,7 @@ pub struct UnpinCodesProposal { } /// AccessConfigUpdate contains the code id and the access config to be /// applied. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AccessConfigUpdate { /// CodeID is the reference to the stored WASM code to be updated @@ -616,6 +677,7 @@ pub struct AccessConfigUpdate { } /// UpdateInstantiateConfigProposal gov proposal content type to update /// instantiate config to a set of code ids. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateInstantiateConfigProposal { /// Title is a short summary @@ -631,6 +693,7 @@ pub struct UpdateInstantiateConfigProposal { } /// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractInfoRequest { /// address is the address of the contract to query @@ -639,6 +702,7 @@ pub struct QueryContractInfoRequest { } /// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC /// method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractInfoResponse { /// address is the address of the contract @@ -649,6 +713,7 @@ pub struct QueryContractInfoResponse { } /// QueryContractHistoryRequest is the request type for the Query/ContractHistory /// RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractHistoryRequest { /// address is the address of the contract to query @@ -661,6 +726,7 @@ pub struct QueryContractHistoryRequest { } /// QueryContractHistoryResponse is the response type for the /// Query/ContractHistory RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractHistoryResponse { #[prost(message, repeated, tag = "1")] @@ -672,6 +738,7 @@ pub struct QueryContractHistoryResponse { } /// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode /// RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractsByCodeRequest { /// grpc-gateway_out does not support Go style CodID @@ -684,6 +751,7 @@ pub struct QueryContractsByCodeRequest { } /// QueryContractsByCodeResponse is the response type for the /// Query/ContractsByCode RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryContractsByCodeResponse { /// contracts are a set of contract addresses @@ -696,6 +764,7 @@ pub struct QueryContractsByCodeResponse { } /// QueryAllContractStateRequest is the request type for the /// Query/AllContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllContractStateRequest { /// address is the address of the contract @@ -708,6 +777,7 @@ pub struct QueryAllContractStateRequest { } /// QueryAllContractStateResponse is the response type for the /// Query/AllContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllContractStateResponse { #[prost(message, repeated, tag = "1")] @@ -719,6 +789,7 @@ pub struct QueryAllContractStateResponse { } /// QueryRawContractStateRequest is the request type for the /// Query/RawContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRawContractStateRequest { /// address is the address of the contract @@ -729,6 +800,7 @@ pub struct QueryRawContractStateRequest { } /// QueryRawContractStateResponse is the response type for the /// Query/RawContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryRawContractStateResponse { /// Data contains the raw store data @@ -737,6 +809,7 @@ pub struct QueryRawContractStateResponse { } /// QuerySmartContractStateRequest is the request type for the /// Query/SmartContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySmartContractStateRequest { /// address is the address of the contract @@ -748,6 +821,7 @@ pub struct QuerySmartContractStateRequest { } /// QuerySmartContractStateResponse is the response type for the /// Query/SmartContractState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuerySmartContractStateResponse { /// Data contains the json data returned from the smart contract @@ -755,6 +829,7 @@ pub struct QuerySmartContractStateResponse { pub data: ::prost::alloc::vec::Vec, } /// QueryCodeRequest is the request type for the Query/Code RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCodeRequest { /// grpc-gateway_out does not support Go style CodID @@ -762,6 +837,7 @@ pub struct QueryCodeRequest { pub code_id: u64, } /// CodeInfoResponse contains code meta data from CodeInfo +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CodeInfoResponse { /// id for legacy support @@ -775,6 +851,7 @@ pub struct CodeInfoResponse { pub instantiate_permission: ::core::option::Option, } /// QueryCodeResponse is the response type for the Query/Code RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCodeResponse { #[prost(message, optional, tag = "1")] @@ -783,6 +860,7 @@ pub struct QueryCodeResponse { pub data: ::prost::alloc::vec::Vec, } /// QueryCodesRequest is the request type for the Query/Codes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCodesRequest { /// pagination defines an optional pagination for the request. @@ -791,6 +869,7 @@ pub struct QueryCodesRequest { ::core::option::Option, } /// QueryCodesResponse is the response type for the Query/Codes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCodesResponse { #[prost(message, repeated, tag = "1")] @@ -802,6 +881,7 @@ pub struct QueryCodesResponse { } /// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes /// RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPinnedCodesRequest { /// pagination defines an optional pagination for the request. @@ -811,6 +891,7 @@ pub struct QueryPinnedCodesRequest { } /// QueryPinnedCodesResponse is the response type for the /// Query/PinnedCodes RPC method +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPinnedCodesResponse { #[prost(uint64, repeated, packed = "false", tag = "1")] @@ -821,9 +902,11 @@ pub struct QueryPinnedCodesResponse { ::core::option::Option, } /// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} /// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { /// params defines the parameters of the module. diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index 7939f2ce..dcee740e 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmrs" -version = "0.18.0" +version = "0.19.0-pre" authors = ["Tony Arcieri "] license = "Apache-2.0" repository = "https://github.com/cosmos/cosmos-rust/tree/main/cosmrs" @@ -12,7 +12,7 @@ edition = "2021" rust-version = "1.72" [dependencies] -cosmos-sdk-proto = { version = "0.23", default-features = false, features = ["std"], path = "../cosmos-sdk-proto" } +cosmos-sdk-proto = { version = "=0.24.0-pre", default-features = false, features = ["std"], path = "../cosmos-sdk-proto" } ecdsa = "0.16" eyre = "0.6" k256 = { version = "0.13", default-features = false, features = ["ecdsa", "sha256"] } @@ -21,12 +21,12 @@ serde = { version = "1", features = ["serde_derive"] } serde_json = "1" signature = { version = "2", features = ["std"] } subtle-encoding = { version = "0.5", features = ["bech32-preview"] } -tendermint = { version = "0.38", features = ["secp256k1"] } +tendermint = { version = "0.39", features = ["secp256k1"] } thiserror = "1" # optional dependencies bip32 = { version = "0.5", optional = true, default-features = false, features = ["alloc", "secp256k1"] } -tendermint-rpc = { version = "0.38", optional = true, features = ["http-client"] } +tendermint-rpc = { version = "0.39", optional = true, features = ["http-client"] } tokio = { version = "1", optional = true } [dev-dependencies] diff --git a/proto-build/buf.sdk.gen.yaml b/proto-build/buf.sdk.gen.yaml index 3565fdcc..3ee8e4d2 100644 --- a/proto-build/buf.sdk.gen.yaml +++ b/proto-build/buf.sdk.gen.yaml @@ -1,10 +1,12 @@ version: v1 plugins: - - plugin: buf.build/community/neoeinstein-prost:v0.2.1 + - plugin: buf.build/community/neoeinstein-prost:v0.3.1 out: . opt: - extern_path=.tendermint=::tendermint_proto::v0_34 - plugin: buf.build/community/neoeinstein-tonic:v0.3.0 out: . opt: + - compile_well_known_types + - extern_path=.google.protobuf=::tendermint_proto::google::protobuf - extern_path=.tendermint=::tendermint_proto::v0_34 diff --git a/proto-build/buf.wasmd.gen.yaml b/proto-build/buf.wasmd.gen.yaml index 17b5bb6e..b49ebab5 100644 --- a/proto-build/buf.wasmd.gen.yaml +++ b/proto-build/buf.wasmd.gen.yaml @@ -1,8 +1,10 @@ version: v1 plugins: - - plugin: buf.build/community/neoeinstein-prost:v0.2.1 + - plugin: buf.build/community/neoeinstein-prost:v0.3.1 out: . - plugin: buf.build/community/neoeinstein-tonic:v0.3.0 out: . opt: + - compile_well_known_types + - extern_path=.google.protobuf=::tendermint_proto::google::protobuf - no_server=true diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index e4634862..82f965f6 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -354,6 +354,7 @@ fn copy_generated_files(from_dir: &Path, to_dir: &Path) { fn copy_and_patch(src: impl AsRef, dest: impl AsRef) -> io::Result<()> { /// Regex substitutions to apply to the prost-generated output + // TODO(tarcieri): use prost-build/tonic-build config for this instead const REPLACEMENTS: &[(&str, &str)] = &[ // Use `tendermint-proto` proto definitions ("(super::)+tendermint", "tendermint_proto"), @@ -375,6 +376,9 @@ fn copy_and_patch(src: impl AsRef, dest: impl AsRef) -> io::Result<( "/// Generated server implementations.\n\ #[cfg(feature = \"grpc\")]", ), + // Use `tendermint_proto` as source of `google.protobuf` types + // TODO(tarcieri): figure out what's wrong with our `buf` config and do it there + ("::prost_types::", "::tendermint_proto::google::protobuf::"), ]; // Skip proto files belonging to `EXCLUDED_PROTO_PACKAGES` From 9dae930edc8c5d42c2692dd12f6369edb36f7b58 Mon Sep 17 00:00:00 2001 From: Ash Date: Thu, 8 Aug 2024 13:42:02 -0700 Subject: [PATCH 18/31] switch to informal pbjson --- Cargo.lock | 79 ++++++++++++++++++------------------- cosmos-sdk-proto/Cargo.toml | 4 +- 2 files changed, 40 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index faf85dec..7064da1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -289,8 +289,8 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" name = "cosmos-sdk-proto" version = "0.24.0-pre" dependencies = [ - "pbjson", - "pbjson-types", + "informalsystems-pbjson", + "informalsystems-pbjson-types", "prost 0.13.1", "prost-types 0.13.1", "serde", @@ -949,6 +949,40 @@ dependencies = [ "hashbrown 0.14.1", ] +[[package]] +name = "informalsystems-pbjson" +version = "0.7.0" +source = "git+https://github.com/informalsystems/pbjson.git#d08d90e71ec342f199a11e0a6f5a594723275ee8" +dependencies = [ + "base64 0.21.4", + "serde", +] + +[[package]] +name = "informalsystems-pbjson-build" +version = "0.7.0" +source = "git+https://github.com/informalsystems/pbjson.git#d08d90e71ec342f199a11e0a6f5a594723275ee8" +dependencies = [ + "heck", + "itertools 0.12.1", + "prost 0.12.6", + "prost-types 0.12.6", +] + +[[package]] +name = "informalsystems-pbjson-types" +version = "0.7.0" +source = "git+https://github.com/informalsystems/pbjson.git#d08d90e71ec342f199a11e0a6f5a594723275ee8" +dependencies = [ + "bytes", + "chrono", + "informalsystems-pbjson", + "informalsystems-pbjson-build", + "prost 0.12.6", + "prost-build 0.12.6", + "serde", +] + [[package]] name = "ipnet" version = "2.8.0" @@ -966,9 +1000,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -1114,43 +1148,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "pbjson" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" -dependencies = [ - "base64 0.21.4", - "serde", -] - -[[package]] -name = "pbjson-build" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" -dependencies = [ - "heck", - "itertools 0.11.0", - "prost 0.12.6", - "prost-types 0.12.6", -] - -[[package]] -name = "pbjson-types" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" -dependencies = [ - "bytes", - "chrono", - "pbjson", - "pbjson-build", - "prost 0.12.6", - "prost-build 0.12.6", - "serde", -] - [[package]] name = "peg" version = "0.8.2" diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index b6406198..719a35f3 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -20,8 +20,8 @@ prost = { version = "0.13", default-features = false } prost-types = "0.13" tendermint-proto = "0.39" serde = "1.0.203" -pbjson = "0.6.0" -pbjson-types = "0.6.0" +pbjson = { git = "https://github.com/informalsystems/pbjson.git", package = "informalsystems-pbjson" } +pbjson-types = { git = "https://github.com/informalsystems/pbjson.git", package = "informalsystems-pbjson-types" } # Optional dependencies tonic = { version = "0.12", optional = true, default-features = false, features = ["codegen", "prost"] } From fda84cab72df21c2987674ecc42313cf09182269 Mon Sep 17 00:00:00 2001 From: Ash Date: Thu, 8 Aug 2024 14:21:12 -0700 Subject: [PATCH 19/31] review notes --- cosmos-sdk-proto/Cargo.toml | 2 - .../src/prost/cosmos-sdk/COSMOS_SDK_COMMIT | 2 +- .../prost/cosmos-sdk/cosmos.app.v1alpha1.rs | 2 +- .../prost/cosmos-sdk/cosmos.auth.v1beta1.rs | 12 +- .../prost/cosmos-sdk/cosmos.authz.v1beta1.rs | 10 +- .../cosmos-sdk/cosmos.base.abci.v1beta1.rs | 6 +- .../cosmos.base.tendermint.v1beta1.rs | 4 +- .../cosmos-sdk/cosmos.crypto.keyring.v1.rs | 4 +- .../cosmos-sdk/cosmos.crypto.multisig.rs | 2 +- .../cosmos-sdk/cosmos.evidence.v1beta1.rs | 10 +- .../cosmos-sdk/cosmos.feegrant.v1beta1.rs | 12 +- .../src/prost/cosmos-sdk/cosmos.gov.v1.rs | 18 +- .../prost/cosmos-sdk/cosmos.gov.v1beta1.rs | 16 +- .../src/prost/cosmos-sdk/cosmos.group.v1.rs | 29 +- .../prost/cosmos-sdk/cosmos.nft.v1beta1.rs | 4 +- .../cosmos-sdk/cosmos.slashing.v1beta1.rs | 5 +- .../cosmos-sdk/cosmos.staking.v1beta1.rs | 18 +- .../cosmos-sdk/cosmos.tx.signing.v1beta1.rs | 2 +- .../src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs | 11 +- .../cosmos-sdk/cosmos.upgrade.v1beta1.rs | 4 +- cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT | 2 +- .../src/prost/wasmd/cosmwasm.wasm.v1.rs | 914 +- .../src/prost/wasmd/cosmwasm.wasm.v1.serde.rs | 8509 ++++------------- .../src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs | 474 +- proto-build/buf.sdk.gen.yaml | 3 +- proto-build/buf.wasmd.gen.yaml | 2 +- proto-build/src/main.rs | 4 +- wasmd | 2 +- 28 files changed, 2478 insertions(+), 7605 deletions(-) diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 719a35f3..4440aa1f 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -20,8 +20,6 @@ prost = { version = "0.13", default-features = false } prost-types = "0.13" tendermint-proto = "0.39" serde = "1.0.203" -pbjson = { git = "https://github.com/informalsystems/pbjson.git", package = "informalsystems-pbjson" } -pbjson-types = { git = "https://github.com/informalsystems/pbjson.git", package = "informalsystems-pbjson-types" } # Optional dependencies tonic = { version = "0.12", optional = true, default-features = false, features = ["codegen", "prost"] } diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT b/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT index ca133cff..b4555f4e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/COSMOS_SDK_COMMIT @@ -1 +1 @@ -v0.47.10 \ No newline at end of file +v0.46.15 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs index c79c8a3a..9a00831f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.rs @@ -112,7 +112,7 @@ pub struct ModuleConfig { /// config is the config object for the module. Module config messages should /// define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. #[prost(message, optional, tag = "2")] - pub config: ::core::option::Option<::pbjson_types::Any>, + pub config: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// QueryConfigRequest is the Query/Config request type. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs index 6de14ad5..c133406e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.rs @@ -8,7 +8,7 @@ pub struct BaseAccount { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::pbjson_types::Any>, + pub pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(uint64, tag = "3")] pub account_number: u64, #[prost(uint64, tag = "4")] @@ -49,7 +49,7 @@ pub struct GenesisState { pub params: ::core::option::Option, /// accounts are the accounts present at genesis. #[prost(message, repeated, tag = "2")] - pub accounts: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// QueryAccountsRequest is the request type for the Query/Accounts RPC method. /// @@ -69,7 +69,7 @@ pub struct QueryAccountsRequest { pub struct QueryAccountsResponse { /// accounts are the existing accounts #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, @@ -88,7 +88,7 @@ pub struct QueryAccountRequest { pub struct QueryAccountResponse { /// account defines the account of the corresponding address. #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option<::pbjson_types::Any>, + pub account: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -115,7 +115,7 @@ pub struct QueryModuleAccountsRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountsResponse { #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub accounts: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -129,7 +129,7 @@ pub struct QueryModuleAccountByNameRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryModuleAccountByNameResponse { #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option<::pbjson_types::Any>, + pub account: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. /// diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs index 1faa1130..79556512 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.rs @@ -14,12 +14,12 @@ pub struct GenericAuthorization { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Grant { #[prost(message, optional, tag = "1")] - pub authorization: ::core::option::Option<::pbjson_types::Any>, + pub authorization: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// time when the grant will expire and will be pruned. If null, then the grant /// doesn't have a time expiration (other conditions in `authorization` /// may apply to invalidate the grant) #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option<::pbjson_types::Timestamp>, + pub expiration: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// GrantAuthorization extends a grant with both the addresses of the grantee and granter. /// It is used in genesis.proto and query.proto @@ -31,9 +31,9 @@ pub struct GrantAuthorization { #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] - pub authorization: ::core::option::Option<::pbjson_types::Any>, + pub authorization: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, optional, tag = "4")] - pub expiration: ::core::option::Option<::pbjson_types::Timestamp>, + pub expiration: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// GrantQueueItem contains the list of TypeURL of a sdk.Msg. #[allow(clippy::derive_partial_eq_without_eq)] @@ -177,7 +177,7 @@ pub struct MsgExec { /// The x/authz will try to find a grant matching (msg.signers\[0\], grantee, MsgTypeURL(msg)) /// triple and validate it. #[prost(message, repeated, tag = "2")] - pub msgs: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub msgs: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// MsgGrantResponse defines the Msg/MsgGrant response type. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs index e64042e8..32cc85c9 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.rs @@ -37,7 +37,7 @@ pub struct TxResponse { pub gas_used: i64, /// The request transaction bytes. #[prost(message, optional, tag = "11")] - pub tx: ::core::option::Option<::pbjson_types::Any>, + pub tx: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// Time of the previous block. For heights > 1, it's the weighted median of /// the timestamps of the valid votes in the block.LastCommit. For height == 1, /// it's genesis time. @@ -118,7 +118,7 @@ pub struct Result { /// /// Since: cosmos-sdk 0.46 #[prost(message, repeated, tag = "4")] - pub msg_responses: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub msg_responses: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// SimulationResponse defines the response generated when a transaction is /// successfully simulated. @@ -153,7 +153,7 @@ pub struct TxMsgData { /// /// Since: cosmos-sdk 0.46 #[prost(message, repeated, tag = "2")] - pub msg_responses: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub msg_responses: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// SearchTxsResult defines a structure for querying txs pageable #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs index c631e629..1b89ca89 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.rs @@ -25,7 +25,7 @@ pub struct Header { #[prost(int64, tag = "3")] pub height: i64, #[prost(message, optional, tag = "4")] - pub time: ::core::option::Option<::pbjson_types::Timestamp>, + pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// prev block info #[prost(message, optional, tag = "5")] pub last_block_id: ::core::option::Option<::tendermint_proto::v0_34::types::BlockId>, @@ -120,7 +120,7 @@ pub struct Validator { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::pbjson_types::Any>, + pub pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(int64, tag = "3")] pub voting_power: i64, #[prost(int64, tag = "4")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs index dd387c3d..b267bbdb 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.rs @@ -8,7 +8,7 @@ pub struct Record { pub name: ::prost::alloc::string::String, /// pub_key represents a public key in any format #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option<::pbjson_types::Any>, + pub pub_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// Record contains one of the following items #[prost(oneof = "record::Item", tags = "3, 4, 5, 6")] pub item: ::core::option::Option, @@ -21,7 +21,7 @@ pub mod record { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Local { #[prost(message, optional, tag = "1")] - pub priv_key: ::core::option::Option<::pbjson_types::Any>, + pub priv_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// Ledger item #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs index f0bb874e..4956c183 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.rs @@ -8,7 +8,7 @@ pub struct LegacyAminoPubKey { #[prost(uint32, tag = "1")] pub threshold: u32, #[prost(message, repeated, tag = "2")] - pub public_keys: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub public_keys: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } include!("cosmos.crypto.multisig.serde.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs index 6c1430d4..a5e7f155 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.rs @@ -7,7 +7,7 @@ pub struct Equivocation { #[prost(int64, tag = "1")] pub height: i64, #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::pbjson_types::Timestamp>, + pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(int64, tag = "3")] pub power: i64, #[prost(string, tag = "4")] @@ -19,7 +19,7 @@ pub struct Equivocation { pub struct GenesisState { /// evidence defines all the evidence at genesis. #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub evidence: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -35,7 +35,7 @@ pub struct QueryEvidenceRequest { pub struct QueryEvidenceResponse { /// evidence returns the requested evidence. #[prost(message, optional, tag = "1")] - pub evidence: ::core::option::Option<::pbjson_types::Any>, + pub evidence: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC /// method. @@ -53,7 +53,7 @@ pub struct QueryAllEvidenceRequest { pub struct QueryAllEvidenceResponse { /// evidence returns all evidences. #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub evidence: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, @@ -66,7 +66,7 @@ pub struct MsgSubmitEvidence { #[prost(string, tag = "1")] pub submitter: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option<::pbjson_types::Any>, + pub evidence: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs index 55127b70..900fb480 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.rs @@ -11,7 +11,7 @@ pub struct BasicAllowance { pub spend_limit: ::prost::alloc::vec::Vec, /// expiration specifies an optional time when this allowance expires #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option<::pbjson_types::Timestamp>, + pub expiration: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// PeriodicAllowance extends Allowance to allow for both a maximum cap, /// as well as a limit per time period. @@ -24,7 +24,7 @@ pub struct PeriodicAllowance { /// period specifies the time duration in which period_spend_limit coins can /// be spent before that allowance is reset #[prost(message, optional, tag = "2")] - pub period: ::core::option::Option<::pbjson_types::Duration>, + pub period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// period_spend_limit specifies the maximum number of coins that can be spent /// in the period #[prost(message, repeated, tag = "3")] @@ -36,7 +36,7 @@ pub struct PeriodicAllowance { /// it is calculated from the start time of the first transaction after the /// last period ended #[prost(message, optional, tag = "5")] - pub period_reset: ::core::option::Option<::pbjson_types::Timestamp>, + pub period_reset: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// AllowedMsgAllowance creates allowance only for specified message types. #[allow(clippy::derive_partial_eq_without_eq)] @@ -44,7 +44,7 @@ pub struct PeriodicAllowance { pub struct AllowedMsgAllowance { /// allowance can be any of basic and periodic fee allowance. #[prost(message, optional, tag = "1")] - pub allowance: ::core::option::Option<::pbjson_types::Any>, + pub allowance: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// allowed_messages are the messages for which the grantee has the access. #[prost(string, repeated, tag = "2")] pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -61,7 +61,7 @@ pub struct Grant { pub grantee: ::prost::alloc::string::String, /// allowance can be any of basic, periodic, allowed fee allowance. #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::pbjson_types::Any>, + pub allowance: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// GenesisState contains a set of fee allowances, persisted from the store #[allow(clippy::derive_partial_eq_without_eq)] @@ -148,7 +148,7 @@ pub struct MsgGrantAllowance { pub grantee: ::prost::alloc::string::String, /// allowance can be any of basic, periodic, allowed fee allowance. #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option<::pbjson_types::Any>, + pub allowance: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs index 8c65319f..c83db60b 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.rs @@ -27,7 +27,7 @@ pub struct Proposal { #[prost(uint64, tag = "1")] pub id: u64, #[prost(message, repeated, tag = "2")] - pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, #[prost(enumeration = "ProposalStatus", tag = "3")] pub status: i32, /// final_tally_result is the final tally result of the proposal. When @@ -36,15 +36,15 @@ pub struct Proposal { #[prost(message, optional, tag = "4")] pub final_tally_result: ::core::option::Option, #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub submit_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub deposit_end_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, repeated, tag = "7")] pub total_deposit: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub voting_start_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub voting_end_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// metadata is any arbitrary metadata attached to the proposal. #[prost(string, tag = "10")] pub metadata: ::prost::alloc::string::String, @@ -87,7 +87,7 @@ pub struct DepositParams { /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 /// months. #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option<::pbjson_types::Duration>, + pub max_deposit_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } /// VotingParams defines the params for voting on governance proposals. #[allow(clippy::derive_partial_eq_without_eq)] @@ -95,7 +95,7 @@ pub struct DepositParams { pub struct VotingParams { /// Length of the voting period. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::pbjson_types::Duration>, + pub voting_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } /// TallyParams defines the params for tallying votes on governance proposals. #[allow(clippy::derive_partial_eq_without_eq)] @@ -399,7 +399,7 @@ pub struct QueryTallyResultResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, #[prost(message, repeated, tag = "2")] pub initial_deposit: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] @@ -422,7 +422,7 @@ pub struct MsgSubmitProposalResponse { pub struct MsgExecLegacyContent { /// content is the proposal's content. #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::pbjson_types::Any>, + pub content: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// authority must be the gov module address. #[prost(string, tag = "2")] pub authority: ::prost::alloc::string::String, diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs index 2a3feef5..5a7a808a 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.rs @@ -39,7 +39,7 @@ pub struct Proposal { #[prost(uint64, tag = "1")] pub proposal_id: u64, #[prost(message, optional, tag = "2")] - pub content: ::core::option::Option<::pbjson_types::Any>, + pub content: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(enumeration = "ProposalStatus", tag = "3")] pub status: i32, /// final_tally_result is the final tally result of the proposal. When @@ -48,15 +48,15 @@ pub struct Proposal { #[prost(message, optional, tag = "4")] pub final_tally_result: ::core::option::Option, #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub submit_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub deposit_end_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, repeated, tag = "7")] pub total_deposit: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub voting_start_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub voting_end_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// TallyResult defines a standard tally for a governance proposal. #[allow(clippy::derive_partial_eq_without_eq)] @@ -100,7 +100,7 @@ pub struct DepositParams { /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 /// months. #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option<::pbjson_types::Duration>, + pub max_deposit_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } /// VotingParams defines the params for voting on governance proposals. #[allow(clippy::derive_partial_eq_without_eq)] @@ -108,7 +108,7 @@ pub struct DepositParams { pub struct VotingParams { /// Length of the voting period. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::pbjson_types::Duration>, + pub voting_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } /// TallyParams defines the params for tallying votes on governance proposals. #[allow(clippy::derive_partial_eq_without_eq)] @@ -412,7 +412,7 @@ pub struct QueryTallyResultResponse { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitProposal { #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option<::pbjson_types::Any>, + pub content: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, repeated, tag = "2")] pub initial_deposit: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs index 55de6463..951b9c0f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.rs @@ -15,7 +15,7 @@ pub struct Member { pub metadata: ::prost::alloc::string::String, /// added_at is a timestamp specifying when a member was added. #[prost(message, optional, tag = "4")] - pub added_at: ::core::option::Option<::pbjson_types::Timestamp>, + pub added_at: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// MemberRequest represents a group member to be used in Msg server requests. /// Contrary to `Member`, it doesn't have any `added_at` field @@ -74,7 +74,7 @@ pub struct DecisionPolicyWindows { /// voting_period is the duration from submission of a proposal to the end of voting period /// Within this times votes can be submitted with MsgVote. #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option<::pbjson_types::Duration>, + pub voting_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// min_execution_period is the minimum duration after the proposal submission /// where members can start sending MsgExec. This means that the window for /// sending a MsgExec transaction is: @@ -87,7 +87,8 @@ pub struct DecisionPolicyWindows { /// is empty, meaning that all proposals created with this decision policy /// won't be able to be executed. #[prost(message, optional, tag = "2")] - pub min_execution_period: ::core::option::Option<::pbjson_types::Duration>, + pub min_execution_period: + ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, } // // State @@ -117,7 +118,7 @@ pub struct GroupInfo { pub total_weight: ::prost::alloc::string::String, /// created_at is a timestamp specifying when a group was created. #[prost(message, optional, tag = "6")] - pub created_at: ::core::option::Option<::pbjson_types::Timestamp>, + pub created_at: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// GroupMember represents the relationship between a group and a member. #[allow(clippy::derive_partial_eq_without_eq)] @@ -152,10 +153,10 @@ pub struct GroupPolicyInfo { pub version: u64, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::pbjson_types::Any>, + pub decision_policy: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// created_at is a timestamp specifying when a group policy was created. #[prost(message, optional, tag = "7")] - pub created_at: ::core::option::Option<::pbjson_types::Timestamp>, + pub created_at: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// Proposal defines a group proposal. Any member of a group can submit a proposal /// for a group policy to decide upon. @@ -178,7 +179,7 @@ pub struct Proposal { pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// submit_time is a timestamp specifying when a proposal was submitted. #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub submit_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// group_version tracks the version of the group at proposal submission. /// This field is here for informational purposes only. #[prost(uint64, tag = "6")] @@ -204,13 +205,13 @@ pub struct Proposal { /// at this point, and the `final_tally_result`and `status` fields will be /// accordingly updated. #[prost(message, optional, tag = "10")] - pub voting_period_end: ::core::option::Option<::pbjson_types::Timestamp>, + pub voting_period_end: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// executor_result is the final result of the proposal execution. Initial value is NotRun. #[prost(enumeration = "ProposalExecutorResult", tag = "11")] pub executor_result: i32, /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. #[prost(message, repeated, tag = "12")] - pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// TallyResult represents the sum of weighted votes for each vote option. #[allow(clippy::derive_partial_eq_without_eq)] @@ -247,7 +248,7 @@ pub struct Vote { pub metadata: ::prost::alloc::string::String, /// submit_time is the timestamp when the vote was submitted. #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub submit_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// VoteOption enumerates the valid vote options for a given proposal. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -886,7 +887,7 @@ pub struct MsgCreateGroupPolicy { pub metadata: ::prost::alloc::string::String, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "4")] - pub decision_policy: ::core::option::Option<::pbjson_types::Any>, + pub decision_policy: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -932,7 +933,7 @@ pub struct MsgCreateGroupWithPolicy { pub group_policy_as_admin: bool, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option<::pbjson_types::Any>, + pub decision_policy: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -961,7 +962,7 @@ pub struct MsgUpdateGroupPolicyDecisionPolicy { pub group_policy_address: ::prost::alloc::string::String, /// decision_policy is the updated group policy's decision policy. #[prost(message, optional, tag = "3")] - pub decision_policy: ::core::option::Option<::pbjson_types::Any>, + pub decision_policy: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -1001,7 +1002,7 @@ pub struct MsgSubmitProposal { pub metadata: ::prost::alloc::string::String, /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. #[prost(message, repeated, tag = "4")] - pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// exec defines the mode of execution of the proposal, /// whether it should be executed immediately on creation or not. /// If so, proposers signatures are considered as Yes votes. diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs index 28cfb47c..3da7a6fd 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.rs @@ -58,7 +58,7 @@ pub struct Class { pub uri_hash: ::prost::alloc::string::String, /// data is the app specific metadata of the NFT class. Optional #[prost(message, optional, tag = "7")] - pub data: ::core::option::Option<::pbjson_types::Any>, + pub data: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// NFT defines the NFT. #[allow(clippy::derive_partial_eq_without_eq)] @@ -78,7 +78,7 @@ pub struct Nft { pub uri_hash: ::prost::alloc::string::String, /// data is an app specific data of the NFT. Optional #[prost(message, optional, tag = "10")] - pub data: ::core::option::Option<::pbjson_types::Any>, + pub data: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// GenesisState defines the nft module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs index 5716cb36..5eabd3e8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.rs @@ -16,7 +16,7 @@ pub struct ValidatorSigningInfo { pub index_offset: i64, /// Timestamp until which the validator is jailed due to liveness downtime. #[prost(message, optional, tag = "4")] - pub jailed_until: ::core::option::Option<::pbjson_types::Timestamp>, + pub jailed_until: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// Whether or not a validator has been tombstoned (killed out of validator set). It is set /// once the validator commits an equivocation or for any other configured misbehiavor. #[prost(bool, tag = "5")] @@ -35,7 +35,8 @@ pub struct Params { #[prost(bytes = "vec", tag = "2")] pub min_signed_per_window: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] - pub downtime_jail_duration: ::core::option::Option<::pbjson_types::Duration>, + pub downtime_jail_duration: + ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, #[prost(bytes = "vec", tag = "4")] pub slash_fraction_double_sign: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "5")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs index 625e4744..b82d7792 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.rs @@ -113,7 +113,7 @@ pub struct Commission { pub commission_rates: ::core::option::Option, /// update_time is the last time the commission rate was changed. #[prost(message, optional, tag = "2")] - pub update_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub update_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// Description defines a validator description. #[allow(clippy::derive_partial_eq_without_eq)] @@ -151,7 +151,7 @@ pub struct Validator { pub operator_address: ::prost::alloc::string::String, /// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. #[prost(message, optional, tag = "2")] - pub consensus_pubkey: ::core::option::Option<::pbjson_types::Any>, + pub consensus_pubkey: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// jailed defined whether the validator has been jailed from bonded status or not. #[prost(bool, tag = "3")] pub jailed: bool, @@ -172,7 +172,7 @@ pub struct Validator { pub unbonding_height: i64, /// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. #[prost(message, optional, tag = "9")] - pub unbonding_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub unbonding_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// commission defines the commission parameters. #[prost(message, optional, tag = "10")] pub commission: ::core::option::Option, @@ -270,7 +270,7 @@ pub struct UnbondingDelegationEntry { pub creation_height: i64, /// completion_time is the unix time for unbonding completion. #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub completion_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// initial_balance defines the tokens initially scheduled to receive at completion. #[prost(string, tag = "3")] pub initial_balance: ::prost::alloc::string::String, @@ -287,7 +287,7 @@ pub struct RedelegationEntry { pub creation_height: i64, /// completion_time defines the unix time for redelegation completion. #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub completion_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// initial_balance defines the initial balance when redelegation started. #[prost(string, tag = "3")] pub initial_balance: ::prost::alloc::string::String, @@ -321,7 +321,7 @@ pub struct Redelegation { pub struct Params { /// unbonding_time is the time duration of unbonding. #[prost(message, optional, tag = "1")] - pub unbonding_time: ::core::option::Option<::pbjson_types::Duration>, + pub unbonding_time: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>, /// max_validators is the maximum number of validators. #[prost(uint32, tag = "2")] pub max_validators: u32, @@ -760,7 +760,7 @@ pub struct MsgCreateValidator { #[prost(string, tag = "5")] pub validator_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "6")] - pub pubkey: ::core::option::Option<::pbjson_types::Any>, + pub pubkey: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, optional, tag = "7")] pub value: ::core::option::Option, } @@ -824,7 +824,7 @@ pub struct MsgBeginRedelegate { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgBeginRedelegateResponse { #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub completion_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// MsgUndelegate defines a SDK message for performing an undelegation from a /// delegate and a validator. @@ -843,7 +843,7 @@ pub struct MsgUndelegate { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUndelegateResponse { #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option<::pbjson_types::Timestamp>, + pub completion_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, } /// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator /// diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs index fbeb17ae..c98eddaf 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.rs @@ -16,7 +16,7 @@ pub struct SignatureDescriptors { pub struct SignatureDescriptor { /// public_key is the public key of the signer #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::pbjson_types::Any>, + pub public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, #[prost(message, optional, tag = "2")] pub data: ::core::option::Option, /// sequence is the sequence of the account, which describes the diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs index ca1755c7..def3d18b 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.rs @@ -72,7 +72,7 @@ pub struct SignDocDirectAux { pub body_bytes: ::prost::alloc::vec::Vec, /// public_key is the public key of the signing account. #[prost(message, optional, tag = "2")] - pub public_key: ::core::option::Option<::pbjson_types::Any>, + pub public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// chain_id is the identifier of the chain this transaction targets. /// It prevents signed transactions from being used on another chain by an /// attacker. @@ -105,7 +105,7 @@ pub struct TxBody { /// is referred to as the primary signer and pays the fee for the whole /// transaction. #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub messages: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// memo is any arbitrary note/comment to be added to the transaction. /// WARNING: in clients, any publicly exposed text should not be called memo, /// but should be called `note` instead (see ). @@ -119,12 +119,13 @@ pub struct TxBody { /// when the default options are not sufficient. If any of these are present /// and can't be handled, the transaction will be rejected #[prost(message, repeated, tag = "1023")] - pub extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub extension_options: ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, /// extension_options are arbitrary options that can be added by chains /// when the default options are not sufficient. If any of these are present /// and can't be handled, they will be ignored #[prost(message, repeated, tag = "2047")] - pub non_critical_extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + pub non_critical_extension_options: + ::prost::alloc::vec::Vec<::tendermint_proto::google::protobuf::Any>, } /// AuthInfo describes the fee and signer modes that are used to sign a /// transaction. @@ -161,7 +162,7 @@ pub struct SignerInfo { /// that already exist in state. If unset, the verifier can use the required \ /// signer address for this position and lookup the public key. #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option<::pbjson_types::Any>, + pub public_key: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, /// mode_info describes the signing mode of the signer and is a nested /// structure to support nested multisig pubkey's #[prost(message, optional, tag = "2")] diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs index 2527afae..fa4ab6f8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.rs @@ -17,7 +17,7 @@ pub struct Plan { /// If this field is not empty, an error will be thrown. #[deprecated] #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option<::pbjson_types::Timestamp>, + pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>, /// The height at which the upgrade must be performed. /// Only used if Time is not set. #[prost(int64, tag = "3")] @@ -31,7 +31,7 @@ pub struct Plan { /// If this field is not empty, an error will be thrown. #[deprecated] #[prost(message, optional, tag = "5")] - pub upgraded_client_state: ::core::option::Option<::pbjson_types::Any>, + pub upgraded_client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// SoftwareUpgradeProposal is a gov Content type for initiating a software /// upgrade. diff --git a/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT b/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT index a8672915..9f27816d 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT +++ b/cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT @@ -1 +1 @@ -v0.45.0 \ No newline at end of file +v0.29.2 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs index ec97221c..b7655700 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.rs @@ -12,6 +12,10 @@ pub struct AccessTypeParam { pub struct AccessConfig { #[prost(enumeration = "AccessType", tag = "1")] pub permission: i32, + /// Address + /// Deprecated: replaced by addresses + #[prost(string, tag = "2")] + pub address: ::prost::alloc::string::String, #[prost(string, repeated, tag = "3")] pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } @@ -55,6 +59,8 @@ pub struct ContractInfo { #[prost(string, tag = "4")] pub label: ::prost::alloc::string::String, /// Created Tx position when the contract was instantiated. + /// This data should kept internal and not be exposed via query results. Just + /// use for sorting #[prost(message, optional, tag = "5")] pub created: ::core::option::Option, #[prost(string, tag = "6")] @@ -62,7 +68,7 @@ pub struct ContractInfo { /// Extension is an extension point to store custom metadata within the /// persistence model. #[prost(message, optional, tag = "7")] - pub extension: ::core::option::Option<::pbjson_types::Any>, + pub extension: ::core::option::Option<::tendermint_proto::google::protobuf::Any>, } /// ContractCodeHistoryEntry metadata to a contract. #[allow(clippy::derive_partial_eq_without_eq)] @@ -111,6 +117,9 @@ pub enum AccessType { Unspecified = 0, /// AccessTypeNobody forbidden Nobody = 1, + /// AccessTypeOnlyAddress restricted to a single address + /// Deprecated: use AccessTypeAnyOfAddresses instead + OnlyAddress = 2, /// AccessTypeEverybody unrestricted Everybody = 3, /// AccessTypeAnyOfAddresses allow any of the addresses @@ -125,6 +134,7 @@ impl AccessType { match self { AccessType::Unspecified => "ACCESS_TYPE_UNSPECIFIED", AccessType::Nobody => "ACCESS_TYPE_NOBODY", + AccessType::OnlyAddress => "ACCESS_TYPE_ONLY_ADDRESS", AccessType::Everybody => "ACCESS_TYPE_EVERYBODY", AccessType::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", } @@ -134,6 +144,7 @@ impl AccessType { match value { "ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified), "ACCESS_TYPE_NOBODY" => Some(Self::Nobody), + "ACCESS_TYPE_ONLY_ADDRESS" => Some(Self::OnlyAddress), "ACCESS_TYPE_EVERYBODY" => Some(Self::Everybody), "ACCESS_TYPE_ANY_OF_ADDRESSES" => Some(Self::AnyOfAddresses), _ => None, @@ -183,122 +194,193 @@ impl ContractCodeHistoryOperationType { } } } -/// StoreCodeAuthorization defines authorization for wasm code upload. -/// Since: wasmd 0.42 +/// MsgStoreCode submit Wasm code to the system #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct StoreCodeAuthorization { - /// Grants for code upload - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, +pub struct MsgStoreCode { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission access control to apply on contract creation, + /// optional + #[prost(message, optional, tag = "5")] + pub instantiate_permission: ::core::option::Option, } -/// ContractExecutionAuthorization defines authorization for wasm execute. -/// Since: wasmd 0.30 +/// MsgStoreCodeResponse returns store result data. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ContractExecutionAuthorization { - /// Grants for contract executions - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, +pub struct MsgStoreCodeResponse { + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "1")] + pub code_id: u64, + /// Checksum is the sha256 hash of the stored code + #[prost(bytes = "vec", tag = "2")] + pub checksum: ::prost::alloc::vec::Vec, } -/// ContractMigrationAuthorization defines authorization for wasm contract -/// migration. Since: wasmd 0.30 +/// MsgInstantiateContract create a new smart contract instance for the given +/// code id. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ContractMigrationAuthorization { - /// Grants for contract migrations - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, +pub struct MsgInstantiateContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "2")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "3")] + pub code_id: u64, + /// Label is optional metadata to be stored with a contract instance. + #[prost(string, tag = "4")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "6")] + pub funds: ::prost::alloc::vec::Vec, } -/// CodeGrant a granted permission for a single code +/// MsgInstantiateContract2 create a new smart contract instance for the given +/// code id with a predicable address. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CodeGrant { - /// CodeHash is the unique identifier created by wasmvm - /// Wildcard "*" is used to specify any kind of grant. - #[prost(bytes = "vec", tag = "1")] - pub code_hash: ::prost::alloc::vec::Vec, - /// InstantiatePermission is the superset access control to apply - /// on contract creation. - /// Optional - #[prost(message, optional, tag = "2")] - pub instantiate_permission: ::core::option::Option, +pub struct MsgInstantiateContract2 { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "2")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "3")] + pub code_id: u64, + /// Label is optional metadata to be stored with a contract instance. + #[prost(string, tag = "4")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "6")] + pub funds: ::prost::alloc::vec::Vec, + /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + #[prost(bytes = "vec", tag = "7")] + pub salt: ::prost::alloc::vec::Vec, + /// FixMsg include the msg value into the hash for the predictable address. + /// Default is false + #[prost(bool, tag = "8")] + pub fix_msg: bool, } -/// ContractGrant a granted permission for a single contract -/// Since: wasmd 0.30 +/// MsgInstantiateContractResponse return instantiation result data #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ContractGrant { - /// Contract is the bech32 address of the smart contract +pub struct MsgInstantiateContractResponse { + /// Address is the bech32 address of the new contract instance. #[prost(string, tag = "1")] - pub contract: ::prost::alloc::string::String, - /// Limit defines execution limits that are enforced and updated when the grant - /// is applied. When the limit lapsed the grant is removed. - #[prost(message, optional, tag = "2")] - pub limit: ::core::option::Option<::pbjson_types::Any>, - /// Filter define more fine-grained control on the message payload passed - /// to the contract in the operation. When no filter applies on execution, the - /// operation is prohibited. - #[prost(message, optional, tag = "3")] - pub filter: ::core::option::Option<::pbjson_types::Any>, + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, } -/// MaxCallsLimit limited number of calls to the contract. No funds transferable. -/// Since: wasmd 0.30 +/// MsgInstantiateContract2Response return instantiation result data #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MaxCallsLimit { - /// Remaining number that is decremented on each execution - #[prost(uint64, tag = "1")] - pub remaining: u64, +pub struct MsgInstantiateContract2Response { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, } -/// MaxFundsLimit defines the maximal amounts that can be sent to the contract. -/// Since: wasmd 0.30 +/// MsgExecuteContract submits the given message data to a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MaxFundsLimit { - /// Amounts is the maximal amount of tokens transferable to the contract. - #[prost(message, repeated, tag = "1")] - pub amounts: ::prost::alloc::vec::Vec, +pub struct MsgExecuteContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract + #[prost(bytes = "vec", tag = "3")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on execution + #[prost(message, repeated, tag = "5")] + pub funds: ::prost::alloc::vec::Vec, } -/// CombinedLimit defines the maximal amounts that can be sent to a contract and -/// the maximal number of calls executable. Both need to remain >0 to be valid. -/// Since: wasmd 0.30 +/// MsgExecuteContractResponse returns execution result data. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CombinedLimit { - /// Remaining number that is decremented on each execution - #[prost(uint64, tag = "1")] - pub calls_remaining: u64, - /// Amounts is the maximal amount of tokens transferable to the contract. - #[prost(message, repeated, tag = "2")] - pub amounts: ::prost::alloc::vec::Vec, +pub struct MsgExecuteContractResponse { + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMigrateContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// CodeID references the new WASM code + #[prost(uint64, tag = "3")] + pub code_id: u64, + /// Msg json encoded message to be passed to the contract on migration + #[prost(bytes = "vec", tag = "4")] + pub msg: ::prost::alloc::vec::Vec, } -/// AllowAllMessagesFilter is a wildcard to allow any type of contract payload -/// message. -/// Since: wasmd 0.30 +/// MsgMigrateContractResponse returns contract migration result data. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct AllowAllMessagesFilter {} -/// AcceptedMessageKeysFilter accept only the specific contract message keys in -/// the json object to be executed. -/// Since: wasmd 0.30 +pub struct MsgMigrateContractResponse { + /// Data contains same raw bytes returned as data from the wasm contract. + /// (May be empty) + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgUpdateAdmin sets a new admin for a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct AcceptedMessageKeysFilter { - /// Messages is the list of unique keys - #[prost(string, repeated, tag = "1")] - pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +pub struct MsgUpdateAdmin { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// NewAdmin address to be set + #[prost(string, tag = "2")] + pub new_admin: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, } -/// AcceptedMessagesFilter accept only the specific raw contract messages to be -/// executed. -/// Since: wasmd 0.30 +/// MsgUpdateAdminResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateAdminResponse {} +/// MsgClearAdmin removes any admin stored for a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct AcceptedMessagesFilter { - /// Messages is the list of raw contract messages - #[prost(bytes = "vec", repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +pub struct MsgClearAdmin { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, } +/// MsgClearAdminResponse returns empty data +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgClearAdminResponse {} /// GenesisState - genesis state of x/wasm #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -311,6 +393,36 @@ pub struct GenesisState { pub contracts: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "4")] pub sequences: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub gen_msgs: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `GenesisState`. +pub mod genesis_state { + /// GenMsgs define the messages that can be executed during genesis phase in + /// order. The intention is to have more human readable data that is auditable. + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct GenMsgs { + /// sum is a single message + #[prost(oneof = "gen_msgs::Sum", tags = "1, 2, 3")] + pub sum: ::core::option::Option, + } + /// Nested message and enum types in `GenMsgs`. + pub mod gen_msgs { + /// sum is a single message + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Sum { + #[prost(message, tag = "1")] + StoreCode(super::super::MsgStoreCode), + #[prost(message, tag = "2")] + InstantiateContract(super::super::MsgInstantiateContract), + /// MsgInstantiateContract2 intentionally not supported + /// see + #[prost(message, tag = "3")] + ExecuteContract(super::super::MsgExecuteContract), + } + } } /// Code struct encompasses CodeInfo and CodeBytes #[allow(clippy::derive_partial_eq_without_eq)] @@ -336,8 +448,6 @@ pub struct Contract { pub contract_info: ::core::option::Option, #[prost(message, repeated, tag = "3")] pub contract_state: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub contract_code_history: ::prost::alloc::vec::Vec, } /// Sequence key and value of an id generation counter #[allow(clippy::derive_partial_eq_without_eq)] @@ -368,14 +478,6 @@ pub struct MsgIbcSend { #[prost(bytes = "vec", tag = "6")] pub data: ::prost::alloc::vec::Vec, } -/// MsgIBCSendResponse -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSendResponse { - /// Sequence number of the IBC packet sent - #[prost(uint64, tag = "1")] - pub sequence: u64, -} /// MsgIBCCloseChannel port and channel need to be owned by the contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -383,10 +485,7 @@ pub struct MsgIbcCloseChannel { #[prost(string, tag = "2")] pub channel: ::prost::alloc::string::String, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit StoreCodeProposal. To submit WASM code to the system, -/// a simple MsgStoreCode can be invoked from the x/gov module via -/// a v1 governance proposal. +/// StoreCodeProposal gov proposal content type to submit WASM code to the system #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreCodeProposal { @@ -408,22 +507,9 @@ pub struct StoreCodeProposal { /// UnpinCode code on upload, optional #[prost(bool, tag = "8")] pub unpin_code: bool, - /// Source is the URL where the code is hosted - #[prost(string, tag = "9")] - pub source: ::prost::alloc::string::String, - /// Builder is the docker image used to build the code deterministically, used - /// for smart contract verification - #[prost(string, tag = "10")] - pub builder: ::prost::alloc::string::String, - /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart - /// contract verification - #[prost(bytes = "vec", tag = "11")] - pub code_hash: ::prost::alloc::vec::Vec, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit InstantiateContractProposal. To instantiate a contract, -/// a simple MsgInstantiateContract can be invoked from the x/gov module via -/// a v1 governance proposal. +/// InstantiateContractProposal gov proposal content type to instantiate a +/// contract. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InstantiateContractProposal { @@ -452,49 +538,7 @@ pub struct InstantiateContractProposal { #[prost(message, repeated, tag = "8")] pub funds: ::prost::alloc::vec::Vec, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit InstantiateContract2Proposal. To instantiate contract 2, -/// a simple MsgInstantiateContract2 can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InstantiateContract2Proposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's enviroment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "4")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "5")] - pub code_id: u64, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "6")] - pub label: ::prost::alloc::string::String, - /// Msg json encode message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "7")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "8")] - pub funds: ::prost::alloc::vec::Vec, - /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - #[prost(bytes = "vec", tag = "9")] - pub salt: ::prost::alloc::vec::Vec, - /// FixMsg include the msg value into the hash for the predictable address. - /// Default is false - #[prost(bool, tag = "10")] - pub fix_msg: bool, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit MigrateContractProposal. To migrate a contract, -/// a simple MsgMigrateContract can be invoked from the x/gov module via -/// a v1 governance proposal. +/// MigrateContractProposal gov proposal content type to migrate a contract. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateContractProposal { @@ -516,10 +560,7 @@ pub struct MigrateContractProposal { #[prost(bytes = "vec", tag = "6")] pub msg: ::prost::alloc::vec::Vec, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit SudoContractProposal. To call sudo on a contract, -/// a simple MsgSudoContract can be invoked from the x/gov module via -/// a v1 governance proposal. +/// SudoContractProposal gov proposal content type to call sudo on a contract. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SudoContractProposal { @@ -536,10 +577,8 @@ pub struct SudoContractProposal { #[prost(bytes = "vec", tag = "4")] pub msg: ::prost::alloc::vec::Vec, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit ExecuteContractProposal. To call execute on a contract, -/// a simple MsgExecuteContract can be invoked from the x/gov module via -/// a v1 governance proposal. +/// ExecuteContractProposal gov proposal content type to call execute on a +/// contract. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecuteContractProposal { @@ -562,10 +601,7 @@ pub struct ExecuteContractProposal { #[prost(message, repeated, tag = "6")] pub funds: ::prost::alloc::vec::Vec, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit UpdateAdminProposal. To set an admin for a contract, -/// a simple MsgUpdateAdmin can be invoked from the x/gov module via -/// a v1 governance proposal. +/// UpdateAdminProposal gov proposal content type to set an admin for a contract. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateAdminProposal { @@ -582,10 +618,8 @@ pub struct UpdateAdminProposal { #[prost(string, tag = "4")] pub contract: ::prost::alloc::string::String, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit ClearAdminProposal. To clear the admin of a contract, -/// a simple MsgClearAdmin can be invoked from the x/gov module via -/// a v1 governance proposal. +/// ClearAdminProposal gov proposal content type to clear the admin of a +/// contract. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClearAdminProposal { @@ -599,10 +633,8 @@ pub struct ClearAdminProposal { #[prost(string, tag = "3")] pub contract: ::prost::alloc::string::String, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit PinCodesProposal. To pin a set of code ids in the wasmvm -/// cache, a simple MsgPinCodes can be invoked from the x/gov module via -/// a v1 governance proposal. +/// PinCodesProposal gov proposal content type to pin a set of code ids in the +/// wasmvm cache. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PinCodesProposal { @@ -616,10 +648,8 @@ pub struct PinCodesProposal { #[prost(uint64, repeated, packed = "false", tag = "3")] pub code_ids: ::prost::alloc::vec::Vec, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm -/// cache, a simple MsgUnpinCodes can be invoked from the x/gov module via -/// a v1 governance proposal. +/// UnpinCodesProposal gov proposal content type to unpin a set of code ids in +/// the wasmvm cache. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnpinCodesProposal { @@ -645,10 +675,8 @@ pub struct AccessConfigUpdate { #[prost(message, optional, tag = "2")] pub instantiate_permission: ::core::option::Option, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit UpdateInstantiateConfigProposal. To update instantiate config -/// to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from -/// the x/gov module via a v1 governance proposal. +/// UpdateInstantiateConfigProposal gov proposal content type to update +/// instantiate config to a set of code ids. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateInstantiateConfigProposal { @@ -663,55 +691,6 @@ pub struct UpdateInstantiateConfigProposal { #[prost(message, repeated, tag = "3")] pub access_config_updates: ::prost::alloc::vec::Vec, } -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit StoreAndInstantiateContractProposal. To store and instantiate -/// the contract, a simple MsgStoreAndInstantiateContract can be invoked from -/// the x/gov module via a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StoreAndInstantiateContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's environment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "4")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "5")] - pub instantiate_permission: ::core::option::Option, - /// UnpinCode code on upload, optional - #[prost(bool, tag = "6")] - pub unpin_code: bool, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "7")] - pub admin: ::prost::alloc::string::String, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "8")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "9")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "10")] - pub funds: ::prost::alloc::vec::Vec, - /// Source is the URL where the code is hosted - #[prost(string, tag = "11")] - pub source: ::prost::alloc::string::String, - /// Builder is the docker image used to build the code deterministically, used - /// for smart contract verification - #[prost(string, tag = "12")] - pub builder: ::prost::alloc::string::String, - /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart - /// contract verification - #[prost(bytes = "vec", tag = "13")] - pub code_hash: ::prost::alloc::vec::Vec, -} /// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC /// method #[allow(clippy::derive_partial_eq_without_eq)] @@ -934,475 +913,6 @@ pub struct QueryParamsResponse { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } -/// QueryContractsByCreatorRequest is the request type for the -/// Query/ContractsByCreator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractsByCreatorRequest { - /// CreatorAddress is the address of contract creator - #[prost(string, tag = "1")] - pub creator_address: ::prost::alloc::string::String, - /// Pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryContractsByCreatorResponse is the response type for the -/// Query/ContractsByCreator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryContractsByCreatorResponse { - /// ContractAddresses result set - #[prost(string, repeated, tag = "1")] - pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// MsgStoreCode submit Wasm code to the system -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCode { - /// Sender is the actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission access control to apply on contract creation, - /// optional - #[prost(message, optional, tag = "5")] - pub instantiate_permission: ::core::option::Option, -} -/// MsgStoreCodeResponse returns store result data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCodeResponse { - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// Checksum is the sha256 hash of the stored code - #[prost(bytes = "vec", tag = "2")] - pub checksum: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContract create a new smart contract instance for the given -/// code id. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContractResponse return instantiation result data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContractResponse { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContract2 create a new smart contract instance for the given -/// code id with a predicable address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract2 { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, - /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - #[prost(bytes = "vec", tag = "7")] - pub salt: ::prost::alloc::vec::Vec, - /// FixMsg include the msg value into the hash for the predictable address. - /// Default is false - #[prost(bool, tag = "8")] - pub fix_msg: bool, -} -/// MsgInstantiateContract2Response return instantiation result data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgInstantiateContract2Response { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgExecuteContract submits the given message data to a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecuteContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract - #[prost(bytes = "vec", tag = "3")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on execution - #[prost(message, repeated, tag = "5")] - pub funds: ::prost::alloc::vec::Vec, -} -/// MsgExecuteContractResponse returns execution result data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecuteContractResponse { - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// CodeID references the new WASM code - #[prost(uint64, tag = "3")] - pub code_id: u64, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "4")] - pub msg: ::prost::alloc::vec::Vec, -} -/// MsgMigrateContractResponse returns contract migration result data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContractResponse { - /// Data contains same raw bytes returned as data from the wasm contract. - /// (May be empty) - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgUpdateAdmin sets a new admin for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateAdmin { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// NewAdmin address to be set - #[prost(string, tag = "2")] - pub new_admin: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// MsgUpdateAdminResponse returns empty data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateAdminResponse {} -/// MsgClearAdmin removes any admin stored for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgClearAdmin { - /// Sender is the actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// MsgClearAdminResponse returns empty data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgClearAdminResponse {} -/// MsgUpdateInstantiateConfig updates instantiate config for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateInstantiateConfig { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// CodeID references the stored WASM code - #[prost(uint64, tag = "2")] - pub code_id: u64, - /// NewInstantiatePermission is the new access control - #[prost(message, optional, tag = "3")] - pub new_instantiate_permission: ::core::option::Option, -} -/// MsgUpdateInstantiateConfigResponse returns empty data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateInstantiateConfigResponse {} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/wasm parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -/// MsgSudoContract is the MsgSudoContract request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSudoContract { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract as sudo - #[prost(bytes = "vec", tag = "3")] - pub msg: ::prost::alloc::vec::Vec, -} -/// MsgSudoContractResponse defines the response structure for executing a -/// MsgSudoContract message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSudoContractResponse { - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgPinCodes is the MsgPinCodes request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPinCodes { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// CodeIDs references the new WASM codes - #[prost(uint64, repeated, packed = "false", tag = "2")] - pub code_ids: ::prost::alloc::vec::Vec, -} -/// MsgPinCodesResponse defines the response structure for executing a -/// MsgPinCodes message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPinCodesResponse {} -/// MsgUnpinCodes is the MsgUnpinCodes request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUnpinCodes { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// CodeIDs references the WASM codes - #[prost(uint64, repeated, packed = "false", tag = "2")] - pub code_ids: ::prost::alloc::vec::Vec, -} -/// MsgUnpinCodesResponse defines the response structure for executing a -/// MsgUnpinCodes message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUnpinCodesResponse {} -/// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract -/// request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreAndInstantiateContract { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "3")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "4")] - pub instantiate_permission: ::core::option::Option, - /// UnpinCode code on upload, optional. As default the uploaded contract is - /// pinned to cache. - #[prost(bool, tag = "5")] - pub unpin_code: bool, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "6")] - pub admin: ::prost::alloc::string::String, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "7")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "8")] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred from the authority account to the contract - /// on instantiation - #[prost(message, repeated, tag = "9")] - pub funds: ::prost::alloc::vec::Vec, - /// Source is the URL where the code is hosted - #[prost(string, tag = "10")] - pub source: ::prost::alloc::string::String, - /// Builder is the docker image used to build the code deterministically, used - /// for smart contract verification - #[prost(string, tag = "11")] - pub builder: ::prost::alloc::string::String, - /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart - /// contract verification - #[prost(bytes = "vec", tag = "12")] - pub code_hash: ::prost::alloc::vec::Vec, -} -/// MsgStoreAndInstantiateContractResponse defines the response structure -/// for executing a MsgStoreAndInstantiateContract message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreAndInstantiateContractResponse { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgAddCodeUploadParamsAddresses is the -/// MsgAddCodeUploadParamsAddresses request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAddCodeUploadParamsAddresses { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "2")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgAddCodeUploadParamsAddressesResponse defines the response -/// structure for executing a MsgAddCodeUploadParamsAddresses message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAddCodeUploadParamsAddressesResponse {} -/// MsgRemoveCodeUploadParamsAddresses is the -/// MsgRemoveCodeUploadParamsAddresses request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRemoveCodeUploadParamsAddresses { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "2")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgRemoveCodeUploadParamsAddressesResponse defines the response -/// structure for executing a MsgRemoveCodeUploadParamsAddresses message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRemoveCodeUploadParamsAddressesResponse {} -/// MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract -/// request type. -/// -/// Since: 0.42 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreAndMigrateContract { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "3")] - pub instantiate_permission: ::core::option::Option, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "5")] - pub msg: ::prost::alloc::vec::Vec, -} -/// MsgStoreAndMigrateContractResponse defines the response structure -/// for executing a MsgStoreAndMigrateContract message. -/// -/// Since: 0.42 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreAndMigrateContractResponse { - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "1")] - pub code_id: u64, - /// Checksum is the sha256 hash of the stored code - #[prost(bytes = "vec", tag = "2")] - pub checksum: ::prost::alloc::vec::Vec, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "3")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgUpdateContractLabel sets a new label for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateContractLabel { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// NewLabel string to be set - #[prost(string, tag = "2")] - pub new_label: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// MsgUpdateContractLabelResponse returns empty data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateContractLabelResponse {} include!("cosmwasm.wasm.v1.serde.rs"); include!("cosmwasm.wasm.v1.tonic.rs"); // @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs index 93f94624..553922eb 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs @@ -123,218 +123,6 @@ impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { ) } } -impl serde::Serialize for AcceptedMessageKeysFilter { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.keys.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.AcceptedMessageKeysFilter", len)?; - if !self.keys.is_empty() { - struct_ser.serialize_field("keys", &self.keys)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AcceptedMessageKeysFilter { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["keys"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Keys, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "keys" => Ok(GeneratedField::Keys), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AcceptedMessageKeysFilter; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.AcceptedMessageKeysFilter") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut keys__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Keys => { - if keys__.is_some() { - return Err(serde::de::Error::duplicate_field("keys")); - } - keys__ = Some(map_.next_value()?); - } - } - } - Ok(AcceptedMessageKeysFilter { - keys: keys__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.AcceptedMessageKeysFilter", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for AcceptedMessagesFilter { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.messages.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.AcceptedMessagesFilter", len)?; - if !self.messages.is_empty() { - struct_ser.serialize_field( - "messages", - &self - .messages - .iter() - .map(pbjson::private::base64::encode) - .collect::>(), - )?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AcceptedMessagesFilter { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["messages"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Messages, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "messages" => Ok(GeneratedField::Messages), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AcceptedMessagesFilter; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.AcceptedMessagesFilter") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut messages__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Messages => { - if messages__.is_some() { - return Err(serde::de::Error::duplicate_field("messages")); - } - messages__ = Some( - map_.next_value::>>()? - .into_iter() - .map(|x| x.0) - .collect(), - ); - } - } - } - Ok(AcceptedMessagesFilter { - messages: messages__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.AcceptedMessagesFilter", - FIELDS, - GeneratedVisitor, - ) - } -} impl serde::Serialize for AccessConfig { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -346,6 +134,9 @@ impl serde::Serialize for AccessConfig { if self.permission != 0 { len += 1; } + if !self.address.is_empty() { + len += 1; + } if !self.addresses.is_empty() { len += 1; } @@ -356,6 +147,9 @@ impl serde::Serialize for AccessConfig { })?; struct_ser.serialize_field("permission", &v)?; } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } if !self.addresses.is_empty() { struct_ser.serialize_field("addresses", &self.addresses)?; } @@ -368,11 +162,12 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["permission", "addresses"]; + const FIELDS: &[&str] = &["permission", "address", "addresses"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Permission, + Address, Addresses, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -399,6 +194,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { { match value { "permission" => Ok(GeneratedField::Permission), + "address" => Ok(GeneratedField::Address), "addresses" => Ok(GeneratedField::Addresses), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -420,6 +216,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { V: serde::de::MapAccess<'de>, { let mut permission__ = None; + let mut address__ = None; let mut addresses__ = None; while let Some(k) = map_.next_key()? { match k { @@ -429,6 +226,12 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { } permission__ = Some(map_.next_value::()? as i32); } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } GeneratedField::Addresses => { if addresses__.is_some() { return Err(serde::de::Error::duplicate_field("addresses")); @@ -439,6 +242,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { } Ok(AccessConfig { permission: permission__.unwrap_or_default(), + address: address__.unwrap_or_default(), addresses: addresses__.unwrap_or_default(), }) } @@ -581,6 +385,7 @@ impl serde::Serialize for AccessType { let variant = match self { Self::Unspecified => "ACCESS_TYPE_UNSPECIFIED", Self::Nobody => "ACCESS_TYPE_NOBODY", + Self::OnlyAddress => "ACCESS_TYPE_ONLY_ADDRESS", Self::Everybody => "ACCESS_TYPE_EVERYBODY", Self::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", }; @@ -596,6 +401,7 @@ impl<'de> serde::Deserialize<'de> for AccessType { const FIELDS: &[&str] = &[ "ACCESS_TYPE_UNSPECIFIED", "ACCESS_TYPE_NOBODY", + "ACCESS_TYPE_ONLY_ADDRESS", "ACCESS_TYPE_EVERYBODY", "ACCESS_TYPE_ANY_OF_ADDRESSES", ]; @@ -640,6 +446,7 @@ impl<'de> serde::Deserialize<'de> for AccessType { match value { "ACCESS_TYPE_UNSPECIFIED" => Ok(AccessType::Unspecified), "ACCESS_TYPE_NOBODY" => Ok(AccessType::Nobody), + "ACCESS_TYPE_ONLY_ADDRESS" => Ok(AccessType::OnlyAddress), "ACCESS_TYPE_EVERYBODY" => Ok(AccessType::Everybody), "ACCESS_TYPE_ANY_OF_ADDRESSES" => Ok(AccessType::AnyOfAddresses), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), @@ -749,85 +556,6 @@ impl<'de> serde::Deserialize<'de> for AccessTypeParam { ) } } -impl serde::Serialize for AllowAllMessagesFilter { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.AllowAllMessagesFilter", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AllowAllMessagesFilter { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::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 = AllowAllMessagesFilter; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.AllowAllMessagesFilter") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(AllowAllMessagesFilter {}) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.AllowAllMessagesFilter", - FIELDS, - GeneratedVisitor, - ) - } -} impl serde::Serialize for ClearAdminProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1116,130 +844,6 @@ impl<'de> serde::Deserialize<'de> for Code { deserializer.deserialize_struct("cosmwasm.wasm.v1.Code", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for CodeGrant { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.code_hash.is_empty() { - len += 1; - } - if self.instantiate_permission.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.CodeGrant", len)?; - if !self.code_hash.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "codeHash", - pbjson::private::base64::encode(&self.code_hash).as_str(), - )?; - } - if let Some(v) = self.instantiate_permission.as_ref() { - struct_ser.serialize_field("instantiatePermission", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CodeGrant { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "code_hash", - "codeHash", - "instantiate_permission", - "instantiatePermission", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CodeHash, - InstantiatePermission, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), - "instantiatePermission" | "instantiate_permission" => { - Ok(GeneratedField::InstantiatePermission) - } - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CodeGrant; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.CodeGrant") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut code_hash__ = None; - let mut instantiate_permission__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CodeHash => { - if code_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("codeHash")); - } - code_hash__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::InstantiatePermission => { - if instantiate_permission__.is_some() { - return Err(serde::de::Error::duplicate_field( - "instantiatePermission", - )); - } - instantiate_permission__ = map_.next_value()?; - } - } - } - Ok(CodeGrant { - code_hash: code_hash__.unwrap_or_default(), - instantiate_permission: instantiate_permission__, - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.CodeGrant", FIELDS, GeneratedVisitor) - } -} impl serde::Serialize for CodeInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1547,123 +1151,6 @@ impl<'de> serde::Deserialize<'de> for CodeInfoResponse { ) } } -impl serde::Serialize for CombinedLimit { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.calls_remaining != 0 { - len += 1; - } - if !self.amounts.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.CombinedLimit", len)?; - if self.calls_remaining != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "callsRemaining", - ToString::to_string(&self.calls_remaining).as_str(), - )?; - } - if !self.amounts.is_empty() { - struct_ser.serialize_field("amounts", &self.amounts)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CombinedLimit { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["calls_remaining", "callsRemaining", "amounts"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CallsRemaining, - Amounts, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "callsRemaining" | "calls_remaining" => { - Ok(GeneratedField::CallsRemaining) - } - "amounts" => Ok(GeneratedField::Amounts), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CombinedLimit; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.CombinedLimit") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut calls_remaining__ = None; - let mut amounts__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CallsRemaining => { - if calls_remaining__.is_some() { - return Err(serde::de::Error::duplicate_field("callsRemaining")); - } - calls_remaining__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Amounts => { - if amounts__.is_some() { - return Err(serde::de::Error::duplicate_field("amounts")); - } - amounts__ = Some(map_.next_value()?); - } - } - } - Ok(CombinedLimit { - calls_remaining: calls_remaining__.unwrap_or_default(), - amounts: amounts__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.CombinedLimit", FIELDS, GeneratedVisitor) - } -} impl serde::Serialize for Contract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1681,9 +1168,6 @@ impl serde::Serialize for Contract { if !self.contract_state.is_empty() { len += 1; } - if !self.contract_code_history.is_empty() { - len += 1; - } let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Contract", len)?; if !self.contract_address.is_empty() { struct_ser.serialize_field("contractAddress", &self.contract_address)?; @@ -1694,9 +1178,6 @@ impl serde::Serialize for Contract { if !self.contract_state.is_empty() { struct_ser.serialize_field("contractState", &self.contract_state)?; } - if !self.contract_code_history.is_empty() { - struct_ser.serialize_field("contractCodeHistory", &self.contract_code_history)?; - } struct_ser.end() } } @@ -1713,8 +1194,6 @@ impl<'de> serde::Deserialize<'de> for Contract { "contractInfo", "contract_state", "contractState", - "contract_code_history", - "contractCodeHistory", ]; #[allow(clippy::enum_variant_names)] @@ -1722,7 +1201,6 @@ impl<'de> serde::Deserialize<'de> for Contract { ContractAddress, ContractInfo, ContractState, - ContractCodeHistory, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -1752,9 +1230,6 @@ impl<'de> serde::Deserialize<'de> for Contract { } "contractInfo" | "contract_info" => Ok(GeneratedField::ContractInfo), "contractState" | "contract_state" => Ok(GeneratedField::ContractState), - "contractCodeHistory" | "contract_code_history" => { - Ok(GeneratedField::ContractCodeHistory) - } _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1777,7 +1252,6 @@ impl<'de> serde::Deserialize<'de> for Contract { let mut contract_address__ = None; let mut contract_info__ = None; let mut contract_state__ = None; - let mut contract_code_history__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::ContractAddress => { @@ -1798,21 +1272,12 @@ impl<'de> serde::Deserialize<'de> for Contract { } contract_state__ = Some(map_.next_value()?); } - GeneratedField::ContractCodeHistory => { - if contract_code_history__.is_some() { - return Err(serde::de::Error::duplicate_field( - "contractCodeHistory", - )); - } - contract_code_history__ = Some(map_.next_value()?); - } } } Ok(Contract { contract_address: contract_address__.unwrap_or_default(), contract_info: contract_info__, contract_state: contract_state__.unwrap_or_default(), - contract_code_history: contract_code_history__.unwrap_or_default(), }) } } @@ -2065,7 +1530,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryOperationType { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for ContractExecutionAuthorization { +impl serde::Serialize for ContractInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2073,29 +1538,81 @@ impl serde::Serialize for ContractExecutionAuthorization { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.grants.is_empty() { + if self.code_id != 0 { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.ContractExecutionAuthorization", len)?; - if !self.grants.is_empty() { - struct_ser.serialize_field("grants", &self.grants)?; + if !self.creator.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if self.created.is_some() { + len += 1; + } + if !self.ibc_port_id.is_empty() { + len += 1; + } + if self.extension.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.ContractInfo", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.creator.is_empty() { + struct_ser.serialize_field("creator", &self.creator)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if let Some(v) = self.created.as_ref() { + struct_ser.serialize_field("created", v)?; + } + if !self.ibc_port_id.is_empty() { + struct_ser.serialize_field("ibcPortId", &self.ibc_port_id)?; + } + if let Some(v) = self.extension.as_ref() { + struct_ser.serialize_field("extension", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ContractExecutionAuthorization { +impl<'de> serde::Deserialize<'de> for ContractInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["grants"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Grants, - } + const FIELDS: &[&str] = &[ + "code_id", + "codeId", + "creator", + "admin", + "label", + "created", + "ibc_port_id", + "ibcPortId", + "extension", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeId, + Creator, + Admin, + Label, + Created, + IbcPortId, + Extension, + } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2119,7 +1636,13 @@ impl<'de> serde::Deserialize<'de> for ContractExecutionAuthorization { E: serde::de::Error, { match value { - "grants" => Ok(GeneratedField::Grants), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "creator" => Ok(GeneratedField::Creator), + "admin" => Ok(GeneratedField::Admin), + "label" => Ok(GeneratedField::Label), + "created" => Ok(GeneratedField::Created), + "ibcPortId" | "ibc_port_id" => Ok(GeneratedField::IbcPortId), + "extension" => Ok(GeneratedField::Extension), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2129,43 +1652,87 @@ impl<'de> serde::Deserialize<'de> for ContractExecutionAuthorization { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ContractExecutionAuthorization; + type Value = ContractInfo; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.ContractExecutionAuthorization") + formatter.write_str("struct cosmwasm.wasm.v1.ContractInfo") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut grants__ = None; + let mut code_id__ = None; + let mut creator__ = None; + let mut admin__ = None; + let mut label__ = None; + let mut created__ = None; + let mut ibc_port_id__ = None; + let mut extension__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Grants => { - if grants__.is_some() { - return Err(serde::de::Error::duplicate_field("grants")); + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Creator => { + if creator__.is_some() { + return Err(serde::de::Error::duplicate_field("creator")); + } + creator__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Created => { + if created__.is_some() { + return Err(serde::de::Error::duplicate_field("created")); + } + created__ = map_.next_value()?; + } + GeneratedField::IbcPortId => { + if ibc_port_id__.is_some() { + return Err(serde::de::Error::duplicate_field("ibcPortId")); + } + ibc_port_id__ = Some(map_.next_value()?); + } + GeneratedField::Extension => { + if extension__.is_some() { + return Err(serde::de::Error::duplicate_field("extension")); } - grants__ = Some(map_.next_value()?); + extension__ = map_.next_value()?; } } } - Ok(ContractExecutionAuthorization { - grants: grants__.unwrap_or_default(), + Ok(ContractInfo { + code_id: code_id__.unwrap_or_default(), + creator: creator__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + label: label__.unwrap_or_default(), + created: created__, + ibc_port_id: ibc_port_id__.unwrap_or_default(), + extension: extension__, }) } } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.ContractExecutionAuthorization", - FIELDS, - GeneratedVisitor, - ) + deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractInfo", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ContractGrant { +impl serde::Serialize for ExecuteContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2173,41 +1740,73 @@ impl serde::Serialize for ContractGrant { { use serde::ser::SerializeStruct; let mut len = 0; + if !self.title.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if !self.run_as.is_empty() { + len += 1; + } if !self.contract.is_empty() { len += 1; } - if self.limit.is_some() { + if !self.msg.is_empty() { len += 1; } - if self.filter.is_some() { + if !self.funds.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.ContractGrant", len)?; + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.ExecuteContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.run_as.is_empty() { + struct_ser.serialize_field("runAs", &self.run_as)?; + } if !self.contract.is_empty() { struct_ser.serialize_field("contract", &self.contract)?; } - if let Some(v) = self.limit.as_ref() { - struct_ser.serialize_field("limit", v)?; + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; } - if let Some(v) = self.filter.as_ref() { - struct_ser.serialize_field("filter", v)?; + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ContractGrant { +impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["contract", "limit", "filter"]; + const FIELDS: &[&str] = &[ + "title", + "description", + "run_as", + "runAs", + "contract", + "msg", + "funds", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + Title, + Description, + RunAs, Contract, - Limit, - Filter, + Msg, + Funds, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2232,9 +1831,12 @@ impl<'de> serde::Deserialize<'de> for ContractGrant { E: serde::de::Error, { match value { + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "runAs" | "run_as" => Ok(GeneratedField::RunAs), "contract" => Ok(GeneratedField::Contract), - "limit" => Ok(GeneratedField::Limit), - "filter" => Ok(GeneratedField::Filter), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2244,52 +1846,86 @@ impl<'de> serde::Deserialize<'de> for ContractGrant { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ContractGrant; + type Value = ExecuteContractProposal; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.ContractGrant") + formatter.write_str("struct cosmwasm.wasm.v1.ExecuteContractProposal") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { + let mut title__ = None; + let mut description__ = None; + let mut run_as__ = None; let mut contract__ = None; - let mut limit__ = None; - let mut filter__ = None; + let mut msg__ = None; + let mut funds__ = None; while let Some(k) = map_.next_key()? { match k { + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); + } + title__ = Some(map_.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map_.next_value()?); + } + GeneratedField::RunAs => { + if run_as__.is_some() { + return Err(serde::de::Error::duplicate_field("runAs")); + } + run_as__ = Some(map_.next_value()?); + } GeneratedField::Contract => { if contract__.is_some() { return Err(serde::de::Error::duplicate_field("contract")); } contract__ = Some(map_.next_value()?); } - GeneratedField::Limit => { - if limit__.is_some() { - return Err(serde::de::Error::duplicate_field("limit")); + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); } - limit__ = map_.next_value()?; + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); } - GeneratedField::Filter => { - if filter__.is_some() { - return Err(serde::de::Error::duplicate_field("filter")); + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); } - filter__ = map_.next_value()?; + funds__ = Some(map_.next_value()?); } } } - Ok(ContractGrant { + Ok(ExecuteContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + run_as: run_as__.unwrap_or_default(), contract: contract__.unwrap_or_default(), - limit: limit__, - filter: filter__, + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractGrant", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.ExecuteContractProposal", + FIELDS, + GeneratedVisitor, + ) } } -impl serde::Serialize for ContractInfo { +impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2297,80 +1933,62 @@ impl serde::Serialize for ContractInfo { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_id != 0 { - len += 1; - } - if !self.creator.is_empty() { - len += 1; - } - if !self.admin.is_empty() { + if self.params.is_some() { len += 1; } - if !self.label.is_empty() { + if !self.codes.is_empty() { len += 1; } - if self.created.is_some() { + if !self.contracts.is_empty() { len += 1; } - if !self.ibc_port_id.is_empty() { + if !self.sequences.is_empty() { len += 1; } - if self.extension.is_some() { + if !self.gen_msgs.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.ContractInfo", len)?; - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.creator.is_empty() { - struct_ser.serialize_field("creator", &self.creator)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.GenesisState", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; + if !self.codes.is_empty() { + struct_ser.serialize_field("codes", &self.codes)?; } - if let Some(v) = self.created.as_ref() { - struct_ser.serialize_field("created", v)?; + if !self.contracts.is_empty() { + struct_ser.serialize_field("contracts", &self.contracts)?; } - if !self.ibc_port_id.is_empty() { - struct_ser.serialize_field("ibcPortId", &self.ibc_port_id)?; + if !self.sequences.is_empty() { + struct_ser.serialize_field("sequences", &self.sequences)?; } - if let Some(v) = self.extension.as_ref() { - struct_ser.serialize_field("extension", v)?; + if !self.gen_msgs.is_empty() { + struct_ser.serialize_field("genMsgs", &self.gen_msgs)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ContractInfo { +impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "code_id", - "codeId", - "creator", - "admin", - "label", - "created", - "ibc_port_id", - "ibcPortId", - "extension", + "params", + "codes", + "contracts", + "sequences", + "gen_msgs", + "genMsgs", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeId, - Creator, - Admin, - Label, - Created, - IbcPortId, - Extension, + Params, + Codes, + Contracts, + Sequences, + GenMsgs, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2395,13 +2013,11 @@ impl<'de> serde::Deserialize<'de> for ContractInfo { E: serde::de::Error, { match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "creator" => Ok(GeneratedField::Creator), - "admin" => Ok(GeneratedField::Admin), - "label" => Ok(GeneratedField::Label), - "created" => Ok(GeneratedField::Created), - "ibcPortId" | "ibc_port_id" => Ok(GeneratedField::IbcPortId), - "extension" => Ok(GeneratedField::Extension), + "params" => Ok(GeneratedField::Params), + "codes" => Ok(GeneratedField::Codes), + "contracts" => Ok(GeneratedField::Contracts), + "sequences" => Ok(GeneratedField::Sequences), + "genMsgs" | "gen_msgs" => Ok(GeneratedField::GenMsgs), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2411,87 +2027,68 @@ impl<'de> serde::Deserialize<'de> for ContractInfo { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ContractInfo; + type Value = GenesisState; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.ContractInfo") + formatter.write_str("struct cosmwasm.wasm.v1.GenesisState") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; - let mut creator__ = None; - let mut admin__ = None; - let mut label__ = None; - let mut created__ = None; - let mut ibc_port_id__ = None; - let mut extension__ = None; + let mut params__ = None; + let mut codes__ = None; + let mut contracts__ = None; + let mut sequences__ = None; + let mut gen_msgs__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Creator => { - if creator__.is_some() { - return Err(serde::de::Error::duplicate_field("creator")); - } - creator__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); } - admin__ = Some(map_.next_value()?); + params__ = map_.next_value()?; } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); + GeneratedField::Codes => { + if codes__.is_some() { + return Err(serde::de::Error::duplicate_field("codes")); } - label__ = Some(map_.next_value()?); + codes__ = Some(map_.next_value()?); } - GeneratedField::Created => { - if created__.is_some() { - return Err(serde::de::Error::duplicate_field("created")); + GeneratedField::Contracts => { + if contracts__.is_some() { + return Err(serde::de::Error::duplicate_field("contracts")); } - created__ = map_.next_value()?; + contracts__ = Some(map_.next_value()?); } - GeneratedField::IbcPortId => { - if ibc_port_id__.is_some() { - return Err(serde::de::Error::duplicate_field("ibcPortId")); + GeneratedField::Sequences => { + if sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("sequences")); } - ibc_port_id__ = Some(map_.next_value()?); + sequences__ = Some(map_.next_value()?); } - GeneratedField::Extension => { - if extension__.is_some() { - return Err(serde::de::Error::duplicate_field("extension")); + GeneratedField::GenMsgs => { + if gen_msgs__.is_some() { + return Err(serde::de::Error::duplicate_field("genMsgs")); } - extension__ = map_.next_value()?; + gen_msgs__ = Some(map_.next_value()?); } } } - Ok(ContractInfo { - code_id: code_id__.unwrap_or_default(), - creator: creator__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - label: label__.unwrap_or_default(), - created: created__, - ibc_port_id: ibc_port_id__.unwrap_or_default(), - extension: extension__, + Ok(GenesisState { + params: params__, + codes: codes__.unwrap_or_default(), + contracts: contracts__.unwrap_or_default(), + sequences: sequences__.unwrap_or_default(), + gen_msgs: gen_msgs__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractInfo", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("cosmwasm.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ContractMigrationAuthorization { +impl serde::Serialize for genesis_state::GenMsgs { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2499,28 +2096,47 @@ impl serde::Serialize for ContractMigrationAuthorization { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.grants.is_empty() { + if self.sum.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.ContractMigrationAuthorization", len)?; - if !self.grants.is_empty() { - struct_ser.serialize_field("grants", &self.grants)?; + serializer.serialize_struct("cosmwasm.wasm.v1.GenesisState.GenMsgs", len)?; + if let Some(v) = self.sum.as_ref() { + match v { + genesis_state::gen_msgs::Sum::StoreCode(v) => { + struct_ser.serialize_field("storeCode", v)?; + } + genesis_state::gen_msgs::Sum::InstantiateContract(v) => { + struct_ser.serialize_field("instantiateContract", v)?; + } + genesis_state::gen_msgs::Sum::ExecuteContract(v) => { + struct_ser.serialize_field("executeContract", v)?; + } + } } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ContractMigrationAuthorization { +impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["grants"]; + const FIELDS: &[&str] = &[ + "store_code", + "storeCode", + "instantiate_contract", + "instantiateContract", + "execute_contract", + "executeContract", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Grants, + StoreCode, + InstantiateContract, + ExecuteContract, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2545,7 +2161,13 @@ impl<'de> serde::Deserialize<'de> for ContractMigrationAuthorization { E: serde::de::Error, { match value { - "grants" => Ok(GeneratedField::Grants), + "storeCode" | "store_code" => Ok(GeneratedField::StoreCode), + "instantiateContract" | "instantiate_contract" => { + Ok(GeneratedField::InstantiateContract) + } + "executeContract" | "execute_contract" => { + Ok(GeneratedField::ExecuteContract) + } _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2555,43 +2177,61 @@ impl<'de> serde::Deserialize<'de> for ContractMigrationAuthorization { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ContractMigrationAuthorization; + type Value = genesis_state::GenMsgs; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.ContractMigrationAuthorization") + formatter.write_str("struct cosmwasm.wasm.v1.GenesisState.GenMsgs") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut grants__ = None; + let mut sum__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Grants => { - if grants__.is_some() { - return Err(serde::de::Error::duplicate_field("grants")); + GeneratedField::StoreCode => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("storeCode")); + } + sum__ = map_ + .next_value::<::std::option::Option<_>>()? + .map(genesis_state::gen_msgs::Sum::StoreCode); + } + GeneratedField::InstantiateContract => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiateContract", + )); + } + sum__ = map_ + .next_value::<::std::option::Option<_>>()? + .map(genesis_state::gen_msgs::Sum::InstantiateContract); + } + GeneratedField::ExecuteContract => { + if sum__.is_some() { + return Err(serde::de::Error::duplicate_field("executeContract")); } - grants__ = Some(map_.next_value()?); + sum__ = map_ + .next_value::<::std::option::Option<_>>()? + .map(genesis_state::gen_msgs::Sum::ExecuteContract); } } } - Ok(ContractMigrationAuthorization { - grants: grants__.unwrap_or_default(), - }) + Ok(genesis_state::GenMsgs { sum: sum__ }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.ContractMigrationAuthorization", + "cosmwasm.wasm.v1.GenesisState.GenMsgs", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for ExecuteContractProposal { +impl serde::Serialize for InstantiateContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2608,7 +2248,13 @@ impl serde::Serialize for ExecuteContractProposal { if !self.run_as.is_empty() { len += 1; } - if !self.contract.is_empty() { + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { len += 1; } if !self.msg.is_empty() { @@ -2618,7 +2264,7 @@ impl serde::Serialize for ExecuteContractProposal { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.ExecuteContractProposal", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.InstantiateContractProposal", len)?; if !self.title.is_empty() { struct_ser.serialize_field("title", &self.title)?; } @@ -2628,8 +2274,15 @@ impl serde::Serialize for ExecuteContractProposal { if !self.run_as.is_empty() { struct_ser.serialize_field("runAs", &self.run_as)?; } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; } if !self.msg.is_empty() { #[allow(clippy::needless_borrow)] @@ -2642,7 +2295,7 @@ impl serde::Serialize for ExecuteContractProposal { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { +impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -2653,7 +2306,10 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { "description", "run_as", "runAs", - "contract", + "admin", + "code_id", + "codeId", + "label", "msg", "funds", ]; @@ -2663,7 +2319,9 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { Title, Description, RunAs, - Contract, + Admin, + CodeId, + Label, Msg, Funds, } @@ -2693,7 +2351,9 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { "title" => Ok(GeneratedField::Title), "description" => Ok(GeneratedField::Description), "runAs" | "run_as" => Ok(GeneratedField::RunAs), - "contract" => Ok(GeneratedField::Contract), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), "msg" => Ok(GeneratedField::Msg), "funds" => Ok(GeneratedField::Funds), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -2705,23 +2365,25 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ExecuteContractProposal; + type Value = InstantiateContractProposal; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.ExecuteContractProposal") + formatter.write_str("struct cosmwasm.wasm.v1.InstantiateContractProposal") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut title__ = None; let mut description__ = None; let mut run_as__ = None; - let mut contract__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; let mut msg__ = None; let mut funds__ = None; while let Some(k) = map_.next_key()? { @@ -2744,11 +2406,26 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { } run_as__ = Some(map_.next_value()?); } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); } - contract__ = Some(map_.next_value()?); + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); } GeneratedField::Msg => { if msg__.is_some() { @@ -2767,24 +2444,26 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { } } } - Ok(ExecuteContractProposal { + Ok(InstantiateContractProposal { title: title__.unwrap_or_default(), description: description__.unwrap_or_default(), run_as: run_as__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), msg: msg__.unwrap_or_default(), funds: funds__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.ExecuteContractProposal", + "cosmwasm.wasm.v1.InstantiateContractProposal", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for GenesisState { +impl serde::Serialize for MigrateContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2792,48 +2471,66 @@ impl serde::Serialize for GenesisState { { use serde::ser::SerializeStruct; let mut len = 0; - if self.params.is_some() { + if !self.title.is_empty() { len += 1; } - if !self.codes.is_empty() { + if !self.description.is_empty() { len += 1; } - if !self.contracts.is_empty() { + if !self.contract.is_empty() { len += 1; } - if !self.sequences.is_empty() { + if self.code_id != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.GenesisState", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; + if !self.msg.is_empty() { + len += 1; } - if !self.codes.is_empty() { - struct_ser.serialize_field("codes", &self.codes)?; + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MigrateContractProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; } - if !self.contracts.is_empty() { - struct_ser.serialize_field("contracts", &self.contracts)?; + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; } - if !self.sequences.is_empty() { - struct_ser.serialize_field("sequences", &self.sequences)?; + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for GenesisState { +impl<'de> serde::Deserialize<'de> for MigrateContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["params", "codes", "contracts", "sequences"]; + const FIELDS: &[&str] = &[ + "title", + "description", + "contract", + "code_id", + "codeId", + "msg", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Params, - Codes, - Contracts, - Sequences, + Title, + Description, + Contract, + CodeId, + Msg, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2858,3911 +2555,10 @@ impl<'de> serde::Deserialize<'de> for GenesisState { E: serde::de::Error, { match value { - "params" => Ok(GeneratedField::Params), - "codes" => Ok(GeneratedField::Codes), - "contracts" => Ok(GeneratedField::Contracts), - "sequences" => Ok(GeneratedField::Sequences), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GenesisState; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.GenesisState") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut params__ = None; - let mut codes__ = None; - let mut contracts__ = None; - let mut sequences__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); - } - params__ = map_.next_value()?; - } - GeneratedField::Codes => { - if codes__.is_some() { - return Err(serde::de::Error::duplicate_field("codes")); - } - codes__ = Some(map_.next_value()?); - } - GeneratedField::Contracts => { - if contracts__.is_some() { - return Err(serde::de::Error::duplicate_field("contracts")); - } - contracts__ = Some(map_.next_value()?); - } - GeneratedField::Sequences => { - if sequences__.is_some() { - return Err(serde::de::Error::duplicate_field("sequences")); - } - sequences__ = Some(map_.next_value()?); - } - } - } - Ok(GenesisState { - params: params__, - codes: codes__.unwrap_or_default(), - contracts: contracts__.unwrap_or_default(), - sequences: sequences__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for InstantiateContract2Proposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.title.is_empty() { - len += 1; - } - if !self.description.is_empty() { - len += 1; - } - if !self.run_as.is_empty() { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - if !self.salt.is_empty() { - len += 1; - } - if self.fix_msg { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.InstantiateContract2Proposal", len)?; - if !self.title.is_empty() { - struct_ser.serialize_field("title", &self.title)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; - } - if !self.run_as.is_empty() { - struct_ser.serialize_field("runAs", &self.run_as)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } - if !self.salt.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("salt", pbjson::private::base64::encode(&self.salt).as_str())?; - } - if self.fix_msg { - struct_ser.serialize_field("fixMsg", &self.fix_msg)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for InstantiateContract2Proposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "title", - "description", - "run_as", - "runAs", - "admin", - "code_id", - "codeId", - "label", - "msg", - "funds", - "salt", - "fix_msg", - "fixMsg", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Title, - Description, - RunAs, - Admin, - CodeId, - Label, - Msg, - Funds, - Salt, - FixMsg, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "runAs" | "run_as" => Ok(GeneratedField::RunAs), - "admin" => Ok(GeneratedField::Admin), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "label" => Ok(GeneratedField::Label), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - "salt" => Ok(GeneratedField::Salt), - "fixMsg" | "fix_msg" => Ok(GeneratedField::FixMsg), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InstantiateContract2Proposal; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.InstantiateContract2Proposal") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut title__ = None; - let mut description__ = None; - let mut run_as__ = None; - let mut admin__ = None; - let mut code_id__ = None; - let mut label__ = None; - let mut msg__ = None; - let mut funds__ = None; - let mut salt__ = None; - let mut fix_msg__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - GeneratedField::RunAs => { - if run_as__.is_some() { - return Err(serde::de::Error::duplicate_field("runAs")); - } - run_as__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - GeneratedField::Salt => { - if salt__.is_some() { - return Err(serde::de::Error::duplicate_field("salt")); - } - salt__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::FixMsg => { - if fix_msg__.is_some() { - return Err(serde::de::Error::duplicate_field("fixMsg")); - } - fix_msg__ = Some(map_.next_value()?); - } - } - } - Ok(InstantiateContract2Proposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - run_as: run_as__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - label: label__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - salt: salt__.unwrap_or_default(), - fix_msg: fix_msg__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.InstantiateContract2Proposal", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for InstantiateContractProposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.title.is_empty() { - len += 1; - } - if !self.description.is_empty() { - len += 1; - } - if !self.run_as.is_empty() { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.InstantiateContractProposal", len)?; - if !self.title.is_empty() { - struct_ser.serialize_field("title", &self.title)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; - } - if !self.run_as.is_empty() { - struct_ser.serialize_field("runAs", &self.run_as)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "title", - "description", - "run_as", - "runAs", - "admin", - "code_id", - "codeId", - "label", - "msg", - "funds", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Title, - Description, - RunAs, - Admin, - CodeId, - Label, - Msg, - Funds, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "runAs" | "run_as" => Ok(GeneratedField::RunAs), - "admin" => Ok(GeneratedField::Admin), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "label" => Ok(GeneratedField::Label), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InstantiateContractProposal; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.InstantiateContractProposal") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut title__ = None; - let mut description__ = None; - let mut run_as__ = None; - let mut admin__ = None; - let mut code_id__ = None; - let mut label__ = None; - let mut msg__ = None; - let mut funds__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - GeneratedField::RunAs => { - if run_as__.is_some() { - return Err(serde::de::Error::duplicate_field("runAs")); - } - run_as__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - } - } - Ok(InstantiateContractProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - run_as: run_as__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - label: label__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.InstantiateContractProposal", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MaxCallsLimit { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.remaining != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MaxCallsLimit", len)?; - if self.remaining != 0 { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("remaining", ToString::to_string(&self.remaining).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MaxCallsLimit { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["remaining"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Remaining, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "remaining" => Ok(GeneratedField::Remaining), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MaxCallsLimit; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MaxCallsLimit") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut remaining__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Remaining => { - if remaining__.is_some() { - return Err(serde::de::Error::duplicate_field("remaining")); - } - remaining__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - } - } - Ok(MaxCallsLimit { - remaining: remaining__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MaxCallsLimit", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MaxFundsLimit { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.amounts.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MaxFundsLimit", len)?; - if !self.amounts.is_empty() { - struct_ser.serialize_field("amounts", &self.amounts)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MaxFundsLimit { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["amounts"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Amounts, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "amounts" => Ok(GeneratedField::Amounts), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MaxFundsLimit; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MaxFundsLimit") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut amounts__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Amounts => { - if amounts__.is_some() { - return Err(serde::de::Error::duplicate_field("amounts")); - } - amounts__ = Some(map_.next_value()?); - } - } - } - Ok(MaxFundsLimit { - amounts: amounts__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MaxFundsLimit", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MigrateContractProposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.title.is_empty() { - len += 1; - } - if !self.description.is_empty() { - len += 1; - } - if !self.contract.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MigrateContractProposal", len)?; - if !self.title.is_empty() { - struct_ser.serialize_field("title", &self.title)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; - } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MigrateContractProposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "title", - "description", - "contract", - "code_id", - "codeId", - "msg", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Title, - Description, - Contract, - CodeId, - Msg, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "contract" => Ok(GeneratedField::Contract), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "msg" => Ok(GeneratedField::Msg), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MigrateContractProposal; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MigrateContractProposal") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut title__ = None; - let mut description__ = None; - let mut contract__ = None; - let mut code_id__ = None; - let mut msg__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); - } - contract__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } - } - Ok(MigrateContractProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MigrateContractProposal", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for Model { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.key.is_empty() { - len += 1; - } - if !self.value.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Model", len)?; - if !self.key.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if !self.value.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "value", - pbjson::private::base64::encode(&self.value).as_str(), - )?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Model { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["key", "value"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Model; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.Model") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } - } - Ok(Model { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.Model", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgAddCodeUploadParamsAddresses { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.authority.is_empty() { - len += 1; - } - if !self.addresses.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", len)?; - if !self.authority.is_empty() { - struct_ser.serialize_field("authority", &self.authority)?; - } - if !self.addresses.is_empty() { - struct_ser.serialize_field("addresses", &self.addresses)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgAddCodeUploadParamsAddresses { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["authority", "addresses"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - Addresses, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "addresses" => Ok(GeneratedField::Addresses), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgAddCodeUploadParamsAddresses; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut addresses__ = 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::Addresses => { - if addresses__.is_some() { - return Err(serde::de::Error::duplicate_field("addresses")); - } - addresses__ = Some(map_.next_value()?); - } - } - } - Ok(MsgAddCodeUploadParamsAddresses { - authority: authority__.unwrap_or_default(), - addresses: addresses__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgAddCodeUploadParamsAddressesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct( - "cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", - len, - )?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgAddCodeUploadParamsAddressesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::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 = MsgAddCodeUploadParamsAddressesResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter - .write_str("struct cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgAddCodeUploadParamsAddressesResponse {}) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgClearAdmin { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.contract.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgClearAdmin { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["sender", "contract"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Contract, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "contract" => Ok(GeneratedField::Contract), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgClearAdmin; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdmin") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut contract__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); - } - contract__ = Some(map_.next_value()?); - } - } - } - Ok(MsgClearAdmin { - sender: sender__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgClearAdminResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdminResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::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 = MsgClearAdminResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdminResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgClearAdminResponse {}) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgClearAdminResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgExecuteContract { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.contract.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContract", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgExecuteContract { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["sender", "contract", "msg", "funds"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Contract, - Msg, - Funds, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "contract" => Ok(GeneratedField::Contract), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgExecuteContract; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContract") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut contract__ = None; - let mut msg__ = None; - let mut funds__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); - } - contract__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - } - } - Ok(MsgExecuteContract { - sender: sender__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgExecuteContract", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgExecuteContractResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.data.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContractResponse", len)?; - if !self.data.is_empty() { - #[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 MsgExecuteContractResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["data"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Data, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "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 = MsgExecuteContractResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContractResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } - } - Ok(MsgExecuteContractResponse { - data: data__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgExecuteContractResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgIbcCloseChannel { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.channel.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCCloseChannel", len)?; - if !self.channel.is_empty() { - struct_ser.serialize_field("channel", &self.channel)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["channel"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Channel, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "channel" => Ok(GeneratedField::Channel), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgIbcCloseChannel; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCCloseChannel") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut channel__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Channel => { - if channel__.is_some() { - return Err(serde::de::Error::duplicate_field("channel")); - } - channel__ = Some(map_.next_value()?); - } - } - } - Ok(MsgIbcCloseChannel { - channel: channel__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgIBCCloseChannel", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgIbcSend { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.channel.is_empty() { - len += 1; - } - if self.timeout_height != 0 { - len += 1; - } - if self.timeout_timestamp != 0 { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCSend", len)?; - if !self.channel.is_empty() { - struct_ser.serialize_field("channel", &self.channel)?; - } - if self.timeout_height != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "timeoutHeight", - ToString::to_string(&self.timeout_height).as_str(), - )?; - } - if self.timeout_timestamp != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "timeoutTimestamp", - ToString::to_string(&self.timeout_timestamp).as_str(), - )?; - } - if !self.data.is_empty() { - #[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 MsgIbcSend { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "channel", - "timeout_height", - "timeoutHeight", - "timeout_timestamp", - "timeoutTimestamp", - "data", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Channel, - TimeoutHeight, - TimeoutTimestamp, - Data, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "channel" => Ok(GeneratedField::Channel), - "timeoutHeight" | "timeout_height" => Ok(GeneratedField::TimeoutHeight), - "timeoutTimestamp" | "timeout_timestamp" => { - Ok(GeneratedField::TimeoutTimestamp) - } - "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 = MsgIbcSend; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCSend") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut channel__ = None; - let mut timeout_height__ = None; - let mut timeout_timestamp__ = None; - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Channel => { - if channel__.is_some() { - return Err(serde::de::Error::duplicate_field("channel")); - } - channel__ = Some(map_.next_value()?); - } - GeneratedField::TimeoutHeight => { - if timeout_height__.is_some() { - return Err(serde::de::Error::duplicate_field("timeoutHeight")); - } - timeout_height__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - 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, - ); - } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } - } - Ok(MsgIbcSend { - channel: channel__.unwrap_or_default(), - timeout_height: timeout_height__.unwrap_or_default(), - timeout_timestamp: timeout_timestamp__.unwrap_or_default(), - data: data__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgIBCSend", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgIbcSendResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.sequence != 0 { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCSendResponse", len)?; - if self.sequence != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("sequence", ToString::to_string(&self.sequence).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgIbcSendResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["sequence"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sequence, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "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 = MsgIbcSendResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCSendResponse") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sequence__ = 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, - ); - } - } - } - Ok(MsgIbcSendResponse { - sequence: sequence__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgIBCSendResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgInstantiateContract { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sender", "admin", "code_id", "codeId", "label", "msg", "funds", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Admin, - CodeId, - Label, - Msg, - Funds, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "admin" => Ok(GeneratedField::Admin), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "label" => Ok(GeneratedField::Label), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgInstantiateContract; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut admin__ = None; - let mut code_id__ = None; - let mut label__ = None; - let mut msg__ = None; - let mut funds__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - } - } - Ok(MsgInstantiateContract { - sender: sender__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - label: label__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgInstantiateContract", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgInstantiateContract2 { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - if !self.salt.is_empty() { - len += 1; - } - if self.fix_msg { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } - if !self.salt.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("salt", pbjson::private::base64::encode(&self.salt).as_str())?; - } - if self.fix_msg { - struct_ser.serialize_field("fixMsg", &self.fix_msg)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sender", "admin", "code_id", "codeId", "label", "msg", "funds", "salt", "fix_msg", - "fixMsg", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Admin, - CodeId, - Label, - Msg, - Funds, - Salt, - FixMsg, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "admin" => Ok(GeneratedField::Admin), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "label" => Ok(GeneratedField::Label), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - "salt" => Ok(GeneratedField::Salt), - "fixMsg" | "fix_msg" => Ok(GeneratedField::FixMsg), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgInstantiateContract2; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut admin__ = None; - let mut code_id__ = None; - let mut label__ = None; - let mut msg__ = None; - let mut funds__ = None; - let mut salt__ = None; - let mut fix_msg__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - GeneratedField::Salt => { - if salt__.is_some() { - return Err(serde::de::Error::duplicate_field("salt")); - } - salt__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::FixMsg => { - if fix_msg__.is_some() { - return Err(serde::de::Error::duplicate_field("fixMsg")); - } - fix_msg__ = Some(map_.next_value()?); - } - } - } - Ok(MsgInstantiateContract2 { - sender: sender__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - label: label__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - salt: salt__.unwrap_or_default(), - fix_msg: fix_msg__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgInstantiateContract2", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgInstantiateContract2Response { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2Response", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.data.is_empty() { - #[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 MsgInstantiateContract2Response { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["address", "data"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Data, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "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 = MsgInstantiateContract2Response; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2Response") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = 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, - ); - } - } - } - Ok(MsgInstantiateContract2Response { - address: address__.unwrap_or_default(), - data: data__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgInstantiateContract2Response", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgInstantiateContractResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContractResponse", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.data.is_empty() { - #[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 MsgInstantiateContractResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["address", "data"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Data, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "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 = MsgInstantiateContractResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContractResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = 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, - ); - } - } - } - Ok(MsgInstantiateContractResponse { - address: address__.unwrap_or_default(), - data: data__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgInstantiateContractResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgMigrateContract { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.contract.is_empty() { - len += 1; - } - if self.code_id != 0 { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContract", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; - } - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgMigrateContract { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["sender", "contract", "code_id", "codeId", "msg"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Contract, - CodeId, - Msg, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "contract" => Ok(GeneratedField::Contract), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "msg" => Ok(GeneratedField::Msg), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgMigrateContract; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContract") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut contract__ = None; - let mut code_id__ = None; - let mut msg__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map_.next_value()?); - } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); - } - contract__ = Some(map_.next_value()?); - } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } - } - Ok(MsgMigrateContract { - sender: sender__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgMigrateContract", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgMigrateContractResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.data.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContractResponse", len)?; - if !self.data.is_empty() { - #[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 MsgMigrateContractResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["data"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Data, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "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 = MsgMigrateContractResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContractResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } - } - Ok(MsgMigrateContractResponse { - data: data__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgMigrateContractResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgPinCodes { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.authority.is_empty() { - len += 1; - } - if !self.code_ids.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgPinCodes", len)?; - if !self.authority.is_empty() { - struct_ser.serialize_field("authority", &self.authority)?; - } - if !self.code_ids.is_empty() { - struct_ser.serialize_field( - "codeIds", - &self - .code_ids - .iter() - .map(ToString::to_string) - .collect::>(), - )?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgPinCodes { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["authority", "code_ids", "codeIds"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - CodeIds, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgPinCodes; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgPinCodes") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut code_ids__ = 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::CodeIds => { - if code_ids__.is_some() { - return Err(serde::de::Error::duplicate_field("codeIds")); - } - code_ids__ = Some( - map_.next_value::>>()? - .into_iter() - .map(|x| x.0) - .collect(), - ); - } - } - } - Ok(MsgPinCodes { - authority: authority__.unwrap_or_default(), - code_ids: code_ids__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgPinCodes", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgPinCodesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgPinCodesResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgPinCodesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::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 = MsgPinCodesResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgPinCodesResponse") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgPinCodesResponse {}) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgPinCodesResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgRemoveCodeUploadParamsAddresses { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.authority.is_empty() { - len += 1; - } - if !self.addresses.is_empty() { - len += 1; - } - let mut struct_ser = serializer - .serialize_struct("cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", len)?; - if !self.authority.is_empty() { - struct_ser.serialize_field("authority", &self.authority)?; - } - if !self.addresses.is_empty() { - struct_ser.serialize_field("addresses", &self.addresses)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgRemoveCodeUploadParamsAddresses { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["authority", "addresses"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - Addresses, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "addresses" => Ok(GeneratedField::Addresses), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgRemoveCodeUploadParamsAddresses; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut addresses__ = 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::Addresses => { - if addresses__.is_some() { - return Err(serde::de::Error::duplicate_field("addresses")); - } - addresses__ = Some(map_.next_value()?); - } - } - } - Ok(MsgRemoveCodeUploadParamsAddresses { - authority: authority__.unwrap_or_default(), - addresses: addresses__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgRemoveCodeUploadParamsAddressesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct( - "cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", - len, - )?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgRemoveCodeUploadParamsAddressesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::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 = MsgRemoveCodeUploadParamsAddressesResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter - .write_str("struct cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgRemoveCodeUploadParamsAddressesResponse {}) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgStoreAndInstantiateContract { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.authority.is_empty() { - len += 1; - } - if !self.wasm_byte_code.is_empty() { - len += 1; - } - if self.instantiate_permission.is_some() { - len += 1; - } - if self.unpin_code { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - if !self.source.is_empty() { - len += 1; - } - if !self.builder.is_empty() { - len += 1; - } - if !self.code_hash.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", len)?; - if !self.authority.is_empty() { - struct_ser.serialize_field("authority", &self.authority)?; - } - if !self.wasm_byte_code.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "wasmByteCode", - pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), - )?; - } - if let Some(v) = self.instantiate_permission.as_ref() { - struct_ser.serialize_field("instantiatePermission", v)?; - } - if self.unpin_code { - struct_ser.serialize_field("unpinCode", &self.unpin_code)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } - if !self.source.is_empty() { - struct_ser.serialize_field("source", &self.source)?; - } - if !self.builder.is_empty() { - struct_ser.serialize_field("builder", &self.builder)?; - } - if !self.code_hash.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "codeHash", - pbjson::private::base64::encode(&self.code_hash).as_str(), - )?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgStoreAndInstantiateContract { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "wasm_byte_code", - "wasmByteCode", - "instantiate_permission", - "instantiatePermission", - "unpin_code", - "unpinCode", - "admin", - "label", - "msg", - "funds", - "source", - "builder", - "code_hash", - "codeHash", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - WasmByteCode, - InstantiatePermission, - UnpinCode, - Admin, - Label, - Msg, - Funds, - Source, - Builder, - CodeHash, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), - "instantiatePermission" | "instantiate_permission" => { - Ok(GeneratedField::InstantiatePermission) - } - "unpinCode" | "unpin_code" => Ok(GeneratedField::UnpinCode), - "admin" => Ok(GeneratedField::Admin), - "label" => Ok(GeneratedField::Label), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - "source" => Ok(GeneratedField::Source), - "builder" => Ok(GeneratedField::Builder), - "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgStoreAndInstantiateContract; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreAndInstantiateContract") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut authority__ = None; - let mut wasm_byte_code__ = None; - let mut instantiate_permission__ = None; - let mut unpin_code__ = None; - let mut admin__ = None; - let mut label__ = None; - let mut msg__ = None; - let mut funds__ = None; - let mut source__ = None; - let mut builder__ = None; - let mut code_hash__ = 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::WasmByteCode => { - if wasm_byte_code__.is_some() { - return Err(serde::de::Error::duplicate_field("wasmByteCode")); - } - wasm_byte_code__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::InstantiatePermission => { - if instantiate_permission__.is_some() { - return Err(serde::de::Error::duplicate_field( - "instantiatePermission", - )); - } - instantiate_permission__ = map_.next_value()?; - } - GeneratedField::UnpinCode => { - if unpin_code__.is_some() { - return Err(serde::de::Error::duplicate_field("unpinCode")); - } - unpin_code__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - GeneratedField::Source => { - if source__.is_some() { - return Err(serde::de::Error::duplicate_field("source")); - } - source__ = Some(map_.next_value()?); - } - GeneratedField::Builder => { - if builder__.is_some() { - return Err(serde::de::Error::duplicate_field("builder")); - } - builder__ = Some(map_.next_value()?); - } - GeneratedField::CodeHash => { - if code_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("codeHash")); - } - code_hash__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } - } - Ok(MsgStoreAndInstantiateContract { - authority: authority__.unwrap_or_default(), - wasm_byte_code: wasm_byte_code__.unwrap_or_default(), - instantiate_permission: instantiate_permission__, - unpin_code: unpin_code__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - label: label__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - source: source__.unwrap_or_default(), - builder: builder__.unwrap_or_default(), - code_hash: code_hash__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgStoreAndInstantiateContractResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct( - "cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", - len, - )?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.data.is_empty() { - #[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 MsgStoreAndInstantiateContractResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &["address", "data"]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Data, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "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 = MsgStoreAndInstantiateContractResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter - .write_str("struct cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut data__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = 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, - ); - } - } - } - Ok(MsgStoreAndInstantiateContractResponse { - address: address__.unwrap_or_default(), - data: data__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgStoreAndMigrateContract { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.authority.is_empty() { - len += 1; - } - if !self.wasm_byte_code.is_empty() { - len += 1; - } - if self.instantiate_permission.is_some() { - len += 1; - } - if !self.contract.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreAndMigrateContract", len)?; - if !self.authority.is_empty() { - struct_ser.serialize_field("authority", &self.authority)?; - } - if !self.wasm_byte_code.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "wasmByteCode", - pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), - )?; - } - if let Some(v) = self.instantiate_permission.as_ref() { - struct_ser.serialize_field("instantiatePermission", v)?; - } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContract { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "authority", - "wasm_byte_code", - "wasmByteCode", - "instantiate_permission", - "instantiatePermission", - "contract", - "msg", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Authority, - WasmByteCode, - InstantiatePermission, - Contract, - Msg, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "authority" => Ok(GeneratedField::Authority), - "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), - "instantiatePermission" | "instantiate_permission" => { - Ok(GeneratedField::InstantiatePermission) - } + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), "contract" => Ok(GeneratedField::Contract), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), "msg" => Ok(GeneratedField::Msg), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -6773,48 +2569,37 @@ impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContract { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgStoreAndMigrateContract; + type Value = MigrateContractProposal; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreAndMigrateContract") + formatter.write_str("struct cosmwasm.wasm.v1.MigrateContractProposal") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut authority__ = None; - let mut wasm_byte_code__ = None; - let mut instantiate_permission__ = None; + let mut title__ = None; + let mut description__ = None; let mut contract__ = None; + let mut code_id__ = None; let mut msg__ = 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::WasmByteCode => { - if wasm_byte_code__.is_some() { - return Err(serde::de::Error::duplicate_field("wasmByteCode")); + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); } - wasm_byte_code__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + title__ = Some(map_.next_value()?); } - GeneratedField::InstantiatePermission => { - if instantiate_permission__.is_some() { - return Err(serde::de::Error::duplicate_field( - "instantiatePermission", - )); + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); } - instantiate_permission__ = map_.next_value()?; + description__ = Some(map_.next_value()?); } GeneratedField::Contract => { if contract__.is_some() { @@ -6822,6 +2607,15 @@ impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContract { } contract__ = Some(map_.next_value()?); } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } GeneratedField::Msg => { if msg__.is_some() { return Err(serde::de::Error::duplicate_field("msg")); @@ -6833,23 +2627,23 @@ impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContract { } } } - Ok(MsgStoreAndMigrateContract { - authority: authority__.unwrap_or_default(), - wasm_byte_code: wasm_byte_code__.unwrap_or_default(), - instantiate_permission: instantiate_permission__, + Ok(MigrateContractProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), contract: contract__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), msg: msg__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgStoreAndMigrateContract", + "cosmwasm.wasm.v1.MigrateContractProposal", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgStoreAndMigrateContractResponse { +impl serde::Serialize for Model { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6857,49 +2651,40 @@ impl serde::Serialize for MsgStoreAndMigrateContractResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_id != 0 { - len += 1; - } - if !self.checksum.is_empty() { + if !self.key.is_empty() { len += 1; } - if !self.data.is_empty() { + if !self.value.is_empty() { len += 1; } - let mut struct_ser = serializer - .serialize_struct("cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", len)?; - if self.code_id != 0 { + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Model", len)?; + if !self.key.is_empty() { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + struct_ser + .serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; } - if !self.checksum.is_empty() { + if !self.value.is_empty() { #[allow(clippy::needless_borrow)] struct_ser.serialize_field( - "checksum", - pbjson::private::base64::encode(&self.checksum).as_str(), + "value", + pbjson::private::base64::encode(&self.value).as_str(), )?; } - if !self.data.is_empty() { - #[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 MsgStoreAndMigrateContractResponse { +impl<'de> serde::Deserialize<'de> for Model { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_id", "codeId", "checksum", "data"]; + const FIELDS: &[&str] = &["key", "value"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeId, - Checksum, - Data, + Key, + Value, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6924,9 +2709,8 @@ impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContractResponse { E: serde::de::Error, { match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "checksum" => Ok(GeneratedField::Checksum), - "data" => Ok(GeneratedField::Data), + "key" => Ok(GeneratedField::Key), + "value" => Ok(GeneratedField::Value), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6936,68 +2720,50 @@ impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContractResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgStoreAndMigrateContractResponse; + type Value = Model; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse") + formatter.write_str("struct cosmwasm.wasm.v1.Model") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; - let mut checksum__ = None; - let mut data__ = None; + let mut key__ = None; + let mut value__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Checksum => { - if checksum__.is_some() { - return Err(serde::de::Error::duplicate_field("checksum")); + GeneratedField::Key => { + if key__.is_some() { + return Err(serde::de::Error::duplicate_field("key")); } - checksum__ = Some( + key__ = Some( map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); } - data__ = Some( + value__ = Some( map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } } } - Ok(MsgStoreAndMigrateContractResponse { - code_id: code_id__.unwrap_or_default(), - checksum: checksum__.unwrap_or_default(), - data: data__.unwrap_or_default(), + Ok(Model { + key: key__.unwrap_or_default(), + value: value__.unwrap_or_default(), }) } } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse", - FIELDS, - GeneratedVisitor, - ) + deserializer.deserialize_struct("cosmwasm.wasm.v1.Model", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgStoreCode { +impl serde::Serialize for MsgClearAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7008,48 +2774,31 @@ impl serde::Serialize for MsgStoreCode { if !self.sender.is_empty() { len += 1; } - if !self.wasm_byte_code.is_empty() { - len += 1; - } - if self.instantiate_permission.is_some() { + if !self.contract.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCode", len)?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", len)?; if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; } - if !self.wasm_byte_code.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "wasmByteCode", - pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), - )?; - } - if let Some(v) = self.instantiate_permission.as_ref() { - struct_ser.serialize_field("instantiatePermission", v)?; + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgStoreCode { +impl<'de> serde::Deserialize<'de> for MsgClearAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "sender", - "wasm_byte_code", - "wasmByteCode", - "instantiate_permission", - "instantiatePermission", - ]; + const FIELDS: &[&str] = &["sender", "contract"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Sender, - WasmByteCode, - InstantiatePermission, + Contract, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7075,10 +2824,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { { match value { "sender" => Ok(GeneratedField::Sender), - "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), - "instantiatePermission" | "instantiate_permission" => { - Ok(GeneratedField::InstantiatePermission) - } + "contract" => Ok(GeneratedField::Contract), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7088,19 +2834,18 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgStoreCode; + type Value = MsgClearAdmin; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCode") + formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdmin") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut sender__ = None; - let mut wasm_byte_code__ = None; - let mut instantiate_permission__ = None; + let mut contract__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Sender => { @@ -7109,78 +2854,46 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { } sender__ = Some(map_.next_value()?); } - GeneratedField::WasmByteCode => { - if wasm_byte_code__.is_some() { - return Err(serde::de::Error::duplicate_field("wasmByteCode")); - } - wasm_byte_code__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::InstantiatePermission => { - if instantiate_permission__.is_some() { - return Err(serde::de::Error::duplicate_field( - "instantiatePermission", - )); + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); } - instantiate_permission__ = map_.next_value()?; + contract__ = Some(map_.next_value()?); } } } - Ok(MsgStoreCode { + Ok(MsgClearAdmin { sender: sender__.unwrap_or_default(), - wasm_byte_code: wasm_byte_code__.unwrap_or_default(), - instantiate_permission: instantiate_permission__, + contract: contract__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgStoreCode", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgStoreCodeResponse { +impl serde::Serialize for MsgClearAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let mut len = 0; - if self.code_id != 0 { - len += 1; - } - if !self.checksum.is_empty() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCodeResponse", len)?; - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if !self.checksum.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "checksum", - pbjson::private::base64::encode(&self.checksum).as_str(), - )?; - } + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgClearAdminResponse", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { +impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_id", "codeId", "checksum"]; + const FIELDS: &[&str] = &[]; #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CodeId, - Checksum, - } + enum GeneratedField {} impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7203,11 +2916,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { where E: serde::de::Error, { - match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "checksum" => Ok(GeneratedField::Checksum), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -7215,57 +2924,33 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgStoreCodeResponse; + type Value = MsgClearAdminResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCodeResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgClearAdminResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; - let mut checksum__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); - } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); - } - GeneratedField::Checksum => { - if checksum__.is_some() { - return Err(serde::de::Error::duplicate_field("checksum")); - } - checksum__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(MsgStoreCodeResponse { - code_id: code_id__.unwrap_or_default(), - checksum: checksum__.unwrap_or_default(), - }) + Ok(MsgClearAdminResponse {}) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgStoreCodeResponse", + "cosmwasm.wasm.v1.MsgClearAdminResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgSudoContract { +impl serde::Serialize for MsgExecuteContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7273,7 +2958,7 @@ impl serde::Serialize for MsgSudoContract { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.authority.is_empty() { + if !self.sender.is_empty() { len += 1; } if !self.contract.is_empty() { @@ -7282,10 +2967,13 @@ impl serde::Serialize for MsgSudoContract { if !self.msg.is_empty() { len += 1; } + if !self.funds.is_empty() { + len += 1; + } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgSudoContract", len)?; - if !self.authority.is_empty() { - struct_ser.serialize_field("authority", &self.authority)?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; } if !self.contract.is_empty() { struct_ser.serialize_field("contract", &self.contract)?; @@ -7295,22 +2983,26 @@ impl serde::Serialize for MsgSudoContract { struct_ser .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgSudoContract { +impl<'de> serde::Deserialize<'de> for MsgExecuteContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["authority", "contract", "msg"]; + const FIELDS: &[&str] = &["sender", "contract", "msg", "funds"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Authority, + Sender, Contract, Msg, + Funds, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7335,9 +3027,10 @@ impl<'de> serde::Deserialize<'de> for MsgSudoContract { E: serde::de::Error, { match value { - "authority" => Ok(GeneratedField::Authority), + "sender" => Ok(GeneratedField::Sender), "contract" => Ok(GeneratedField::Contract), "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7347,26 +3040,27 @@ impl<'de> serde::Deserialize<'de> for MsgSudoContract { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSudoContract; + type Value = MsgExecuteContract; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgSudoContract") + formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContract") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut authority__ = None; + let mut sender__ = None; let mut contract__ = None; let mut msg__ = None; + let mut funds__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); } - authority__ = Some(map_.next_value()?); + sender__ = Some(map_.next_value()?); } GeneratedField::Contract => { if contract__.is_some() { @@ -7383,23 +3077,30 @@ impl<'de> serde::Deserialize<'de> for MsgSudoContract { .0, ); } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } } } - Ok(MsgSudoContract { - authority: authority__.unwrap_or_default(), + Ok(MsgExecuteContract { + sender: sender__.unwrap_or_default(), contract: contract__.unwrap_or_default(), msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgSudoContract", + "cosmwasm.wasm.v1.MsgExecuteContract", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgSudoContractResponse { +impl serde::Serialize for MsgExecuteContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7411,7 +3112,7 @@ impl serde::Serialize for MsgSudoContractResponse { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgSudoContractResponse", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgExecuteContractResponse", len)?; if !self.data.is_empty() { #[allow(clippy::needless_borrow)] struct_ser @@ -7420,7 +3121,7 @@ impl serde::Serialize for MsgSudoContractResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgSudoContractResponse { +impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -7465,16 +3166,16 @@ impl<'de> serde::Deserialize<'de> for MsgSudoContractResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgSudoContractResponse; + type Value = MsgExecuteContractResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgSudoContractResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgExecuteContractResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -7492,19 +3193,19 @@ impl<'de> serde::Deserialize<'de> for MsgSudoContractResponse { } } } - Ok(MsgSudoContractResponse { + Ok(MsgExecuteContractResponse { data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgSudoContractResponse", + "cosmwasm.wasm.v1.MsgExecuteContractResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgUnpinCodes { +impl serde::Serialize for MsgIbcCloseChannel { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7512,41 +3213,28 @@ impl serde::Serialize for MsgUnpinCodes { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.authority.is_empty() { - len += 1; - } - if !self.code_ids.is_empty() { + if !self.channel.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgUnpinCodes", len)?; - if !self.authority.is_empty() { - struct_ser.serialize_field("authority", &self.authority)?; - } - if !self.code_ids.is_empty() { - struct_ser.serialize_field( - "codeIds", - &self - .code_ids - .iter() - .map(ToString::to_string) - .collect::>(), - )?; + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCCloseChannel", len)?; + if !self.channel.is_empty() { + struct_ser.serialize_field("channel", &self.channel)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgUnpinCodes { +impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["authority", "code_ids", "codeIds"]; + const FIELDS: &[&str] = &["channel"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Authority, - CodeIds, + Channel, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7571,8 +3259,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnpinCodes { E: serde::de::Error, { match value { - "authority" => Ok(GeneratedField::Authority), - "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + "channel" => Ok(GeneratedField::Channel), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7582,128 +3269,40 @@ impl<'de> serde::Deserialize<'de> for MsgUnpinCodes { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUnpinCodes; + type Value = MsgIbcCloseChannel; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUnpinCodes") + formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCCloseChannel") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut authority__ = None; - let mut code_ids__ = None; + let mut channel__ = 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::CodeIds => { - if code_ids__.is_some() { - return Err(serde::de::Error::duplicate_field("codeIds")); + GeneratedField::Channel => { + if channel__.is_some() { + return Err(serde::de::Error::duplicate_field("channel")); } - code_ids__ = Some( - map_.next_value::>>()? - .into_iter() - .map(|x| x.0) - .collect(), - ); + channel__ = Some(map_.next_value()?); } } } - Ok(MsgUnpinCodes { - authority: authority__.unwrap_or_default(), - code_ids: code_ids__.unwrap_or_default(), + Ok(MsgIbcCloseChannel { + channel: channel__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUnpinCodes", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for MsgUnpinCodesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgUnpinCodesResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUnpinCodesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::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 = MsgUnpinCodesResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUnpinCodesResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgUnpinCodesResponse {}) - } - } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUnpinCodesResponse", + "cosmwasm.wasm.v1.MsgIBCCloseChannel", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgUpdateAdmin { +impl serde::Serialize for MsgIbcSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7711,41 +3310,65 @@ impl serde::Serialize for MsgUpdateAdmin { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sender.is_empty() { + if !self.channel.is_empty() { len += 1; } - if !self.new_admin.is_empty() { + if self.timeout_height != 0 { len += 1; } - if !self.contract.is_empty() { + if self.timeout_timestamp != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; + if !self.data.is_empty() { + len += 1; } - if !self.new_admin.is_empty() { - struct_ser.serialize_field("newAdmin", &self.new_admin)?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgIBCSend", len)?; + if !self.channel.is_empty() { + struct_ser.serialize_field("channel", &self.channel)?; } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; + if self.timeout_height != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "timeoutHeight", + ToString::to_string(&self.timeout_height).as_str(), + )?; + } + if self.timeout_timestamp != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "timeoutTimestamp", + ToString::to_string(&self.timeout_timestamp).as_str(), + )?; + } + if !self.data.is_empty() { + #[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 MsgUpdateAdmin { +impl<'de> serde::Deserialize<'de> for MsgIbcSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["sender", "new_admin", "newAdmin", "contract"]; + const FIELDS: &[&str] = &[ + "channel", + "timeout_height", + "timeoutHeight", + "timeout_timestamp", + "timeoutTimestamp", + "data", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sender, - NewAdmin, - Contract, + Channel, + TimeoutHeight, + TimeoutTimestamp, + Data, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7770,9 +3393,12 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { E: serde::de::Error, { match value { - "sender" => Ok(GeneratedField::Sender), - "newAdmin" | "new_admin" => Ok(GeneratedField::NewAdmin), - "contract" => Ok(GeneratedField::Contract), + "channel" => Ok(GeneratedField::Channel), + "timeoutHeight" | "timeout_height" => Ok(GeneratedField::TimeoutHeight), + "timeoutTimestamp" | "timeout_timestamp" => { + Ok(GeneratedField::TimeoutTimestamp) + } + "data" => Ok(GeneratedField::Data), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7782,74 +3408,139 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateAdmin; + type Value = MsgIbcSend; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdmin") + formatter.write_str("struct cosmwasm.wasm.v1.MsgIBCSend") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sender__ = None; - let mut new_admin__ = None; - let mut contract__ = None; + let mut channel__ = None; + let mut timeout_height__ = None; + let mut timeout_timestamp__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); + GeneratedField::Channel => { + if channel__.is_some() { + return Err(serde::de::Error::duplicate_field("channel")); } - sender__ = Some(map_.next_value()?); + channel__ = Some(map_.next_value()?); } - GeneratedField::NewAdmin => { - if new_admin__.is_some() { - return Err(serde::de::Error::duplicate_field("newAdmin")); + GeneratedField::TimeoutHeight => { + if timeout_height__.is_some() { + return Err(serde::de::Error::duplicate_field("timeoutHeight")); } - new_admin__ = Some(map_.next_value()?); + timeout_height__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); + GeneratedField::TimeoutTimestamp => { + if timeout_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("timeoutTimestamp")); } - contract__ = Some(map_.next_value()?); + timeout_timestamp__ = 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(MsgUpdateAdmin { - sender: sender__.unwrap_or_default(), - new_admin: new_admin__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), + Ok(MsgIbcSend { + channel: channel__.unwrap_or_default(), + timeout_height: timeout_height__.unwrap_or_default(), + timeout_timestamp: timeout_timestamp__.unwrap_or_default(), + data: data__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgIBCSend", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MsgUpdateAdminResponse { +impl serde::Serialize for MsgInstantiateContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdminResponse", len)?; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { +impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[]; + const FIELDS: &[&str] = &[ + "sender", "admin", "code_id", "codeId", "label", "msg", "funds", + ]; #[allow(clippy::enum_variant_names)] - enum GeneratedField {} + enum GeneratedField { + Sender, + Admin, + CodeId, + Label, + Msg, + Funds, + } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7872,7 +3563,15 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { where E: serde::de::Error, { - Err(serde::de::Error::unknown_field(value, FIELDS)) + match value { + "sender" => Ok(GeneratedField::Sender), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -7880,33 +3579,89 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateAdminResponse; + type Value = MsgInstantiateContract; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdminResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; + let mut sender__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map_.next_value()?); + } + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); + } + admin__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + } } - Ok(MsgUpdateAdminResponse {}) + Ok(MsgInstantiateContract { + sender: sender__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUpdateAdminResponse", + "cosmwasm.wasm.v1.MsgInstantiateContract", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgUpdateContractLabel { +impl serde::Serialize for MsgInstantiateContract2 { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7917,39 +3672,82 @@ impl serde::Serialize for MsgUpdateContractLabel { if !self.sender.is_empty() { len += 1; } - if !self.new_label.is_empty() { - len += 1; + if !self.admin.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.msg.is_empty() { + len += 1; + } + if !self.funds.is_empty() { + len += 1; + } + if !self.salt.is_empty() { + len += 1; + } + if self.fix_msg { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.admin.is_empty() { + struct_ser.serialize_field("admin", &self.admin)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; } - if !self.contract.is_empty() { - len += 1; + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateContractLabel", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; + if !self.funds.is_empty() { + struct_ser.serialize_field("funds", &self.funds)?; } - if !self.new_label.is_empty() { - struct_ser.serialize_field("newLabel", &self.new_label)?; + if !self.salt.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("salt", pbjson::private::base64::encode(&self.salt).as_str())?; } - if !self.contract.is_empty() { - struct_ser.serialize_field("contract", &self.contract)?; + if self.fix_msg { + struct_ser.serialize_field("fixMsg", &self.fix_msg)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgUpdateContractLabel { +impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["sender", "new_label", "newLabel", "contract"]; + const FIELDS: &[&str] = &[ + "sender", "admin", "code_id", "codeId", "label", "msg", "funds", "salt", "fix_msg", + "fixMsg", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Sender, - NewLabel, - Contract, + Admin, + CodeId, + Label, + Msg, + Funds, + Salt, + FixMsg, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7975,8 +3773,13 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateContractLabel { { match value { "sender" => Ok(GeneratedField::Sender), - "newLabel" | "new_label" => Ok(GeneratedField::NewLabel), - "contract" => Ok(GeneratedField::Contract), + "admin" => Ok(GeneratedField::Admin), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "label" => Ok(GeneratedField::Label), + "msg" => Ok(GeneratedField::Msg), + "funds" => Ok(GeneratedField::Funds), + "salt" => Ok(GeneratedField::Salt), + "fixMsg" | "fix_msg" => Ok(GeneratedField::FixMsg), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7986,22 +3789,27 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateContractLabel { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateContractLabel; + type Value = MsgInstantiateContract2; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateContractLabel") + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { let mut sender__ = None; - let mut new_label__ = None; - let mut contract__ = None; + let mut admin__ = None; + let mut code_id__ = None; + let mut label__ = None; + let mut msg__ = None; + let mut funds__ = None; + let mut salt__ = None; + let mut fix_msg__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Sender => { @@ -8010,114 +3818,79 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateContractLabel { } sender__ = Some(map_.next_value()?); } - GeneratedField::NewLabel => { - if new_label__.is_some() { - return Err(serde::de::Error::duplicate_field("newLabel")); + GeneratedField::Admin => { + if admin__.is_some() { + return Err(serde::de::Error::duplicate_field("admin")); } - new_label__ = Some(map_.next_value()?); + admin__ = Some(map_.next_value()?); } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); } - contract__ = Some(map_.next_value()?); + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map_.next_value()?); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Funds => { + if funds__.is_some() { + return Err(serde::de::Error::duplicate_field("funds")); + } + funds__ = Some(map_.next_value()?); + } + GeneratedField::Salt => { + if salt__.is_some() { + return Err(serde::de::Error::duplicate_field("salt")); + } + salt__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::FixMsg => { + if fix_msg__.is_some() { + return Err(serde::de::Error::duplicate_field("fixMsg")); + } + fix_msg__ = Some(map_.next_value()?); } } } - Ok(MsgUpdateContractLabel { + Ok(MsgInstantiateContract2 { sender: sender__.unwrap_or_default(), - new_label: new_label__.unwrap_or_default(), - contract: contract__.unwrap_or_default(), + admin: admin__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + label: label__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + funds: funds__.unwrap_or_default(), + salt: salt__.unwrap_or_default(), + fix_msg: fix_msg__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUpdateContractLabel", - FIELDS, - GeneratedVisitor, - ) - } -} -impl serde::Serialize for MsgUpdateContractLabelResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for MsgUpdateContractLabelResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::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) -> std::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 std::fmt::Formatter<'_>, - ) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::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 = MsgUpdateContractLabelResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateContractLabelResponse") - } - - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; - } - Ok(MsgUpdateContractLabelResponse {}) - } - } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUpdateContractLabelResponse", + "cosmwasm.wasm.v1.MsgInstantiateContract2", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgUpdateInstantiateConfig { +impl serde::Serialize for MsgInstantiateContract2Response { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8125,49 +3898,37 @@ impl serde::Serialize for MsgUpdateInstantiateConfig { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if self.code_id != 0 { + if !self.address.is_empty() { len += 1; } - if self.new_instantiate_permission.is_some() { + if !self.data.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContract2Response", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; } - if self.code_id != 0 { + if !self.data.is_empty() { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; - } - if let Some(v) = self.new_instantiate_permission.as_ref() { - struct_ser.serialize_field("newInstantiatePermission", v)?; + struct_ser + .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgUpdateInstantiateConfig { +impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "sender", - "code_id", - "codeId", - "new_instantiate_permission", - "newInstantiatePermission", - ]; + const FIELDS: &[&str] = &["address", "data"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sender, - CodeId, - NewInstantiatePermission, + Address, + Data, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -8192,11 +3953,8 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateInstantiateConfig { E: serde::de::Error, { match value { - "sender" => Ok(GeneratedField::Sender), - "codeId" | "code_id" => Ok(GeneratedField::CodeId), - "newInstantiatePermission" | "new_instantiate_permission" => { - Ok(GeneratedField::NewInstantiatePermission) - } + "address" => Ok(GeneratedField::Address), + "data" => Ok(GeneratedField::Data), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8206,86 +3964,93 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateInstantiateConfig { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateInstantiateConfig; + type Value = MsgInstantiateContract2Response; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateInstantiateConfig") + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContract2Response") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sender__ = None; - let mut code_id__ = None; - let mut new_instantiate_permission__ = None; + let mut address__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - sender__ = Some(map_.next_value()?); + address__ = Some(map_.next_value()?); } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } - GeneratedField::NewInstantiatePermission => { - if new_instantiate_permission__.is_some() { - return Err(serde::de::Error::duplicate_field( - "newInstantiatePermission", - )); - } - new_instantiate_permission__ = map_.next_value()?; - } } } - Ok(MsgUpdateInstantiateConfig { - sender: sender__.unwrap_or_default(), - code_id: code_id__.unwrap_or_default(), - new_instantiate_permission: new_instantiate_permission__, + Ok(MsgInstantiateContract2Response { + address: address__.unwrap_or_default(), + data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + "cosmwasm.wasm.v1.MsgInstantiateContract2Response", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgUpdateInstantiateConfigResponse { +impl serde::Serialize for MsgInstantiateContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer - .serialize_struct("cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", len)?; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgInstantiateContractResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.data.is_empty() { + #[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 MsgUpdateInstantiateConfigResponse { +impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[]; + const FIELDS: &[&str] = &["address", "data"]; #[allow(clippy::enum_variant_names)] - enum GeneratedField {} + enum GeneratedField { + Address, + Data, + } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8308,7 +4073,11 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateInstantiateConfigResponse { where E: serde::de::Error, { - Err(serde::de::Error::unknown_field(value, FIELDS)) + match value { + "address" => Ok(GeneratedField::Address), + "data" => Ok(GeneratedField::Data), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -8316,33 +4085,54 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateInstantiateConfigResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateInstantiateConfigResponse; + type Value = MsgInstantiateContractResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgInstantiateContractResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; + let mut address__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = 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, + ); + } + } } - Ok(MsgUpdateInstantiateConfigResponse {}) + Ok(MsgInstantiateContractResponse { + address: address__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse", + "cosmwasm.wasm.v1.MsgInstantiateContractResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgUpdateParams { +impl serde::Serialize for MsgMigrateContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8350,35 +4140,52 @@ impl serde::Serialize for MsgUpdateParams { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.authority.is_empty() { + if !self.sender.is_empty() { len += 1; } - if self.params.is_some() { + if !self.contract.is_empty() { + len += 1; + } + if self.code_id != 0 { + len += 1; + } + if !self.msg.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateParams", len)?; - if !self.authority.is_empty() { - struct_ser.serialize_field("authority", &self.authority)?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContract", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; } - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; + } + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if !self.msg.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser + .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MsgUpdateParams { +impl<'de> serde::Deserialize<'de> for MsgMigrateContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["authority", "params"]; + const FIELDS: &[&str] = &["sender", "contract", "code_id", "codeId", "msg"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Authority, - Params, + Sender, + Contract, + CodeId, + Msg, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -8403,8 +4210,10 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateParams { E: serde::de::Error, { match value { - "authority" => Ok(GeneratedField::Authority), - "params" => Ok(GeneratedField::Params), + "sender" => Ok(GeneratedField::Sender), + "contract" => Ok(GeneratedField::Contract), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "msg" => Ok(GeneratedField::Msg), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8414,70 +4223,102 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateParams { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParams; + type Value = MsgMigrateContract; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateParams") + formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContract") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut authority__ = None; - let mut params__ = None; + let mut sender__ = None; + let mut contract__ = None; + let mut code_id__ = None; + let mut msg__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Authority => { - if authority__.is_some() { - return Err(serde::de::Error::duplicate_field("authority")); + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); } - authority__ = Some(map_.next_value()?); + sender__ = Some(map_.next_value()?); } - GeneratedField::Params => { - if params__.is_some() { - return Err(serde::de::Error::duplicate_field("params")); + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); } - params__ = map_.next_value()?; + contract__ = Some(map_.next_value()?); + } + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); } } } - Ok(MsgUpdateParams { - authority: authority__.unwrap_or_default(), - params: params__, + Ok(MsgMigrateContract { + sender: sender__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), + code_id: code_id__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUpdateParams", + "cosmwasm.wasm.v1.MsgMigrateContract", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for MsgUpdateParamsResponse { +impl serde::Serialize for MsgMigrateContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateParamsResponse", len)?; + let mut len = 0; + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgMigrateContractResponse", len)?; + if !self.data.is_empty() { + #[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 MsgUpdateParamsResponse { +impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[]; + const FIELDS: &[&str] = &["data"]; #[allow(clippy::enum_variant_names)] - enum GeneratedField {} + enum GeneratedField { + Data, + } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8500,7 +4341,10 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateParamsResponse { where E: serde::de::Error, { - Err(serde::de::Error::unknown_field(value, FIELDS)) + match value { + "data" => Ok(GeneratedField::Data), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -8508,33 +4352,46 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateParamsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = MsgUpdateParamsResponse; + type Value = MsgMigrateContractResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateParamsResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgMigrateContractResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + } } - Ok(MsgUpdateParamsResponse {}) + Ok(MsgMigrateContractResponse { + data: data__.unwrap_or_default(), + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.MsgUpdateParamsResponse", + "cosmwasm.wasm.v1.MsgMigrateContractResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for Params { +impl serde::Serialize for MsgStoreCode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8542,45 +4399,51 @@ impl serde::Serialize for Params { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_upload_access.is_some() { + if !self.sender.is_empty() { len += 1; } - if self.instantiate_default_permission != 0 { + if !self.wasm_byte_code.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Params", len)?; - if let Some(v) = self.code_upload_access.as_ref() { - struct_ser.serialize_field("codeUploadAccess", v)?; + if self.instantiate_permission.is_some() { + len += 1; } - if self.instantiate_default_permission != 0 { - let v = AccessType::try_from(self.instantiate_default_permission).map_err(|_| { - serde::ser::Error::custom(format!( - "Invalid variant {}", - self.instantiate_default_permission - )) - })?; - struct_ser.serialize_field("instantiateDefaultPermission", &v)?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCode", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.wasm_byte_code.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "wasmByteCode", + pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), + )?; + } + if let Some(v) = self.instantiate_permission.as_ref() { + struct_ser.serialize_field("instantiatePermission", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for Params { +impl<'de> serde::Deserialize<'de> for MsgStoreCode { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "code_upload_access", - "codeUploadAccess", - "instantiate_default_permission", - "instantiateDefaultPermission", + "sender", + "wasm_byte_code", + "wasmByteCode", + "instantiate_permission", + "instantiatePermission", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeUploadAccess, - InstantiateDefaultPermission, + Sender, + WasmByteCode, + InstantiatePermission, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -8605,11 +4468,10 @@ impl<'de> serde::Deserialize<'de> for Params { E: serde::de::Error, { match value { - "codeUploadAccess" | "code_upload_access" => { - Ok(GeneratedField::CodeUploadAccess) - } - "instantiateDefaultPermission" | "instantiate_default_permission" => { - Ok(GeneratedField::InstantiateDefaultPermission) + "sender" => Ok(GeneratedField::Sender), + "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), + "instantiatePermission" | "instantiate_permission" => { + Ok(GeneratedField::InstantiatePermission) } _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -8620,48 +4482,57 @@ impl<'de> serde::Deserialize<'de> for Params { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Params; + type Value = MsgStoreCode; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.Params") + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCode") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_upload_access__ = None; - let mut instantiate_default_permission__ = None; + let mut sender__ = None; + let mut wasm_byte_code__ = None; + let mut instantiate_permission__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeUploadAccess => { - if code_upload_access__.is_some() { - return Err(serde::de::Error::duplicate_field("codeUploadAccess")); + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); } - code_upload_access__ = map_.next_value()?; + sender__ = Some(map_.next_value()?); } - GeneratedField::InstantiateDefaultPermission => { - if instantiate_default_permission__.is_some() { + GeneratedField::WasmByteCode => { + if wasm_byte_code__.is_some() { + return Err(serde::de::Error::duplicate_field("wasmByteCode")); + } + wasm_byte_code__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::InstantiatePermission => { + if instantiate_permission__.is_some() { return Err(serde::de::Error::duplicate_field( - "instantiateDefaultPermission", + "instantiatePermission", )); } - instantiate_default_permission__ = - Some(map_.next_value::()? as i32); + instantiate_permission__ = map_.next_value()?; } } } - Ok(Params { - code_upload_access: code_upload_access__, - instantiate_default_permission: instantiate_default_permission__ - .unwrap_or_default(), + Ok(MsgStoreCode { + sender: sender__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.Params", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgStoreCode", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for PinCodesProposal { +impl serde::Serialize for MsgStoreCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8669,49 +4540,40 @@ impl serde::Serialize for PinCodesProposal { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.title.is_empty() { - len += 1; - } - if !self.description.is_empty() { + if self.code_id != 0 { len += 1; } - if !self.code_ids.is_empty() { + if !self.checksum.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.PinCodesProposal", len)?; - if !self.title.is_empty() { - struct_ser.serialize_field("title", &self.title)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; + serializer.serialize_struct("cosmwasm.wasm.v1.MsgStoreCodeResponse", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; } - if !self.code_ids.is_empty() { + if !self.checksum.is_empty() { + #[allow(clippy::needless_borrow)] struct_ser.serialize_field( - "codeIds", - &self - .code_ids - .iter() - .map(ToString::to_string) - .collect::>(), + "checksum", + pbjson::private::base64::encode(&self.checksum).as_str(), )?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for PinCodesProposal { +impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["title", "description", "code_ids", "codeIds"]; + const FIELDS: &[&str] = &["code_id", "codeId", "checksum"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Title, - Description, - CodeIds, + CodeId, + Checksum, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -8736,9 +4598,8 @@ impl<'de> serde::Deserialize<'de> for PinCodesProposal { E: serde::de::Error, { match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "checksum" => Ok(GeneratedField::Checksum), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8748,61 +4609,57 @@ impl<'de> serde::Deserialize<'de> for PinCodesProposal { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PinCodesProposal; + type Value = MsgStoreCodeResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.PinCodesProposal") + formatter.write_str("struct cosmwasm.wasm.v1.MsgStoreCodeResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut title__ = None; - let mut description__ = None; - let mut code_ids__ = None; + let mut code_id__ = None; + let mut checksum__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); } - description__ = Some(map_.next_value()?); + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); } - GeneratedField::CodeIds => { - if code_ids__.is_some() { - return Err(serde::de::Error::duplicate_field("codeIds")); + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); } - code_ids__ = Some( - map_.next_value::>>()? - .into_iter() - .map(|x| x.0) - .collect(), + checksum__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, ); } } } - Ok(PinCodesProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - code_ids: code_ids__.unwrap_or_default(), + Ok(MsgStoreCodeResponse { + code_id: code_id__.unwrap_or_default(), + checksum: checksum__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.PinCodesProposal", + "cosmwasm.wasm.v1.MsgStoreCodeResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryAllContractStateRequest { +impl serde::Serialize for MsgUpdateAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8810,35 +4667,41 @@ impl serde::Serialize for QueryAllContractStateRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { + if !self.sender.is_empty() { len += 1; } - if self.pagination.is_some() { + if !self.new_admin.is_empty() { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; + if !self.contract.is_empty() { + len += 1; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.new_admin.is_empty() { + struct_ser.serialize_field("newAdmin", &self.new_admin)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { +impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "pagination"]; + const FIELDS: &[&str] = &["sender", "new_admin", "newAdmin", "contract"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, - Pagination, + Sender, + NewAdmin, + Contract, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -8863,8 +4726,9 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), - "pagination" => Ok(GeneratedField::Pagination), + "sender" => Ok(GeneratedField::Sender), + "newAdmin" | "new_admin" => Ok(GeneratedField::NewAdmin), + "contract" => Ok(GeneratedField::Contract), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8874,88 +4738,74 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAllContractStateRequest; + type Value = MsgUpdateAdmin; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateRequest") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdmin") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; - let mut pagination__ = None; + let mut sender__ = None; + let mut new_admin__ = None; + let mut contract__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); } - address__ = Some(map_.next_value()?); + sender__ = Some(map_.next_value()?); } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::NewAdmin => { + if new_admin__.is_some() { + return Err(serde::de::Error::duplicate_field("newAdmin")); } - pagination__ = map_.next_value()?; + new_admin__ = Some(map_.next_value()?); + } + GeneratedField::Contract => { + if contract__.is_some() { + return Err(serde::de::Error::duplicate_field("contract")); + } + contract__ = Some(map_.next_value()?); } } } - Ok(QueryAllContractStateRequest { - address: address__.unwrap_or_default(), - pagination: pagination__, + Ok(MsgUpdateAdmin { + sender: sender__.unwrap_or_default(), + new_admin: new_admin__.unwrap_or_default(), + contract: contract__.unwrap_or_default(), }) } } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryAllContractStateRequest", - FIELDS, - GeneratedVisitor, - ) + deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryAllContractStateResponse { +impl serde::Serialize for MsgUpdateAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let mut len = 0; - if !self.models.is_empty() { - len += 1; - } - if self.pagination.is_some() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateResponse", len)?; - if !self.models.is_empty() { - struct_ser.serialize_field("models", &self.models)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.MsgUpdateAdminResponse", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { +impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["models", "pagination"]; + const FIELDS: &[&str] = &[]; - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Models, - Pagination, - } + #[allow(clippy::enum_variant_names)] + enum GeneratedField {} impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8978,11 +4828,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { where E: serde::de::Error, { - match value { - "models" => Ok(GeneratedField::Models), - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -8990,51 +4836,33 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryAllContractStateResponse; + type Value = MsgUpdateAdminResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateResponse") + formatter.write_str("struct cosmwasm.wasm.v1.MsgUpdateAdminResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut models__ = None; - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Models => { - if models__.is_some() { - return Err(serde::de::Error::duplicate_field("models")); - } - models__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(QueryAllContractStateResponse { - models: models__.unwrap_or_default(), - pagination: pagination__, - }) + Ok(MsgUpdateAdminResponse {}) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryAllContractStateResponse", + "cosmwasm.wasm.v1.MsgUpdateAdminResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryCodeRequest { +impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9042,29 +4870,45 @@ impl serde::Serialize for QueryCodeRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_id != 0 { + if self.code_upload_access.is_some() { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeRequest", len)?; - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + if self.instantiate_default_permission != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Params", len)?; + if let Some(v) = self.code_upload_access.as_ref() { + struct_ser.serialize_field("codeUploadAccess", v)?; + } + if self.instantiate_default_permission != 0 { + let v = AccessType::try_from(self.instantiate_default_permission).map_err(|_| { + serde::ser::Error::custom(format!( + "Invalid variant {}", + self.instantiate_default_permission + )) + })?; + struct_ser.serialize_field("instantiateDefaultPermission", &v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryCodeRequest { +impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_id", "codeId"]; + const FIELDS: &[&str] = &[ + "code_upload_access", + "codeUploadAccess", + "instantiate_default_permission", + "instantiateDefaultPermission", + ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeId, + CodeUploadAccess, + InstantiateDefaultPermission, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -9089,7 +4933,12 @@ impl<'de> serde::Deserialize<'de> for QueryCodeRequest { E: serde::de::Error, { match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "codeUploadAccess" | "code_upload_access" => { + Ok(GeneratedField::CodeUploadAccess) + } + "instantiateDefaultPermission" | "instantiate_default_permission" => { + Ok(GeneratedField::InstantiateDefaultPermission) + } _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9099,43 +4948,48 @@ impl<'de> serde::Deserialize<'de> for QueryCodeRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCodeRequest; + type Value = Params; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeRequest") + formatter.write_str("struct cosmwasm.wasm.v1.Params") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; + let mut code_upload_access__ = None; + let mut instantiate_default_permission__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); + GeneratedField::CodeUploadAccess => { + if code_upload_access__.is_some() { + return Err(serde::de::Error::duplicate_field("codeUploadAccess")); } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + code_upload_access__ = map_.next_value()?; + } + GeneratedField::InstantiateDefaultPermission => { + if instantiate_default_permission__.is_some() { + return Err(serde::de::Error::duplicate_field( + "instantiateDefaultPermission", + )); + } + instantiate_default_permission__ = + Some(map_.next_value::()? as i32); } } } - Ok(QueryCodeRequest { - code_id: code_id__.unwrap_or_default(), + Ok(Params { + code_upload_access: code_upload_access__, + instantiate_default_permission: instantiate_default_permission__ + .unwrap_or_default(), }) } } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryCodeRequest", - FIELDS, - GeneratedVisitor, - ) + deserializer.deserialize_struct("cosmwasm.wasm.v1.Params", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for QueryCodeResponse { +impl serde::Serialize for PinCodesProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9143,37 +4997,49 @@ impl serde::Serialize for QueryCodeResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_info.is_some() { + if !self.title.is_empty() { len += 1; } - if !self.data.is_empty() { + if !self.description.is_empty() { + len += 1; + } + if !self.code_ids.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeResponse", len)?; - if let Some(v) = self.code_info.as_ref() { - struct_ser.serialize_field("codeInfo", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.PinCodesProposal", len)?; + if !self.title.is_empty() { + struct_ser.serialize_field("title", &self.title)?; } - if !self.data.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if !self.code_ids.is_empty() { + struct_ser.serialize_field( + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), + )?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryCodeResponse { +impl<'de> serde::Deserialize<'de> for PinCodesProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_info", "codeInfo", "data"]; + const FIELDS: &[&str] = &["title", "description", "code_ids", "codeIds"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeInfo, - Data, + Title, + Description, + CodeIds, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -9198,8 +5064,9 @@ impl<'de> serde::Deserialize<'de> for QueryCodeResponse { E: serde::de::Error, { match value { - "codeInfo" | "code_info" => Ok(GeneratedField::CodeInfo), - "data" => Ok(GeneratedField::Data), + "title" => Ok(GeneratedField::Title), + "description" => Ok(GeneratedField::Description), + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9209,51 +5076,61 @@ impl<'de> serde::Deserialize<'de> for QueryCodeResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCodeResponse; + type Value = PinCodesProposal; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeResponse") + formatter.write_str("struct cosmwasm.wasm.v1.PinCodesProposal") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_info__ = None; - let mut data__ = None; + let mut title__ = None; + let mut description__ = None; + let mut code_ids__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeInfo => { - if code_info__.is_some() { - return Err(serde::de::Error::duplicate_field("codeInfo")); + GeneratedField::Title => { + if title__.is_some() { + return Err(serde::de::Error::duplicate_field("title")); } - code_info__ = map_.next_value()?; + title__ = Some(map_.next_value()?); } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, + description__ = Some(map_.next_value()?); + } + GeneratedField::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); + } + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), ); } } } - Ok(QueryCodeResponse { - code_info: code_info__, - data: data__.unwrap_or_default(), + Ok(PinCodesProposal { + title: title__.unwrap_or_default(), + description: description__.unwrap_or_default(), + code_ids: code_ids__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryCodeResponse", + "cosmwasm.wasm.v1.PinCodesProposal", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryCodesRequest { +impl serde::Serialize for QueryAllContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9261,27 +5138,34 @@ impl serde::Serialize for QueryCodesRequest { { use serde::ser::SerializeStruct; let mut len = 0; + if !self.address.is_empty() { + len += 1; + } if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesRequest", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryCodesRequest { +impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["pagination"]; + const FIELDS: &[&str] = &["address", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + Address, Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -9307,6 +5191,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { E: serde::de::Error, { match value { + "address" => Ok(GeneratedField::Address), "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -9317,19 +5202,29 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCodesRequest; + type Value = QueryAllContractStateRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { + let mut address__ = None; let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map_.next_value()?); + } GeneratedField::Pagination => { if pagination__.is_some() { return Err(serde::de::Error::duplicate_field("pagination")); @@ -9338,19 +5233,20 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { } } } - Ok(QueryCodesRequest { + Ok(QueryAllContractStateRequest { + address: address__.unwrap_or_default(), pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryCodesRequest", + "cosmwasm.wasm.v1.QueryAllContractStateRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryCodesResponse { +impl serde::Serialize for QueryAllContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9358,16 +5254,16 @@ impl serde::Serialize for QueryCodesResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.code_infos.is_empty() { + if !self.models.is_empty() { len += 1; } if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesResponse", len)?; - if !self.code_infos.is_empty() { - struct_ser.serialize_field("codeInfos", &self.code_infos)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryAllContractStateResponse", len)?; + if !self.models.is_empty() { + struct_ser.serialize_field("models", &self.models)?; } if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; @@ -9375,17 +5271,17 @@ impl serde::Serialize for QueryCodesResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryCodesResponse { +impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_infos", "codeInfos", "pagination"]; + const FIELDS: &[&str] = &["models", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeInfos, + Models, Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -9411,7 +5307,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { E: serde::de::Error, { match value { - "codeInfos" | "code_infos" => Ok(GeneratedField::CodeInfos), + "models" => Ok(GeneratedField::Models), "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -9422,25 +5318,28 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryCodesResponse; + type Value = QueryAllContractStateResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryAllContractStateResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_infos__ = None; + let mut models__ = None; let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeInfos => { - if code_infos__.is_some() { - return Err(serde::de::Error::duplicate_field("codeInfos")); + GeneratedField::Models => { + if models__.is_some() { + return Err(serde::de::Error::duplicate_field("models")); } - code_infos__ = Some(map_.next_value()?); + models__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { @@ -9450,20 +5349,20 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { } } } - Ok(QueryCodesResponse { - code_infos: code_infos__.unwrap_or_default(), + Ok(QueryAllContractStateResponse { + models: models__.unwrap_or_default(), pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryCodesResponse", + "cosmwasm.wasm.v1.QueryAllContractStateResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractHistoryRequest { +impl serde::Serialize for QueryCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9471,35 +5370,29 @@ impl serde::Serialize for QueryContractHistoryRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if self.pagination.is_some() { + if self.code_id != 0 { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeRequest", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { +impl<'de> serde::Deserialize<'de> for QueryCodeRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "pagination"]; + const FIELDS: &[&str] = &["code_id", "codeId"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, - Pagination, + CodeId, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -9524,8 +5417,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), - "pagination" => Ok(GeneratedField::Pagination), + "codeId" | "code_id" => Ok(GeneratedField::CodeId), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9535,51 +5427,43 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractHistoryRequest; + type Value = QueryCodeRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeRequest") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; - let mut pagination__ = None; + let mut code_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); } - pagination__ = map_.next_value()?; + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); } } } - Ok(QueryContractHistoryRequest { - address: address__.unwrap_or_default(), - pagination: pagination__, + Ok(QueryCodeRequest { + code_id: code_id__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractHistoryRequest", + "cosmwasm.wasm.v1.QueryCodeRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractHistoryResponse { +impl serde::Serialize for QueryCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9587,35 +5471,37 @@ impl serde::Serialize for QueryContractHistoryResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.entries.is_empty() { + if self.code_info.is_some() { len += 1; } - if self.pagination.is_some() { + if !self.data.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryResponse", len)?; - if !self.entries.is_empty() { - struct_ser.serialize_field("entries", &self.entries)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodeResponse", len)?; + if let Some(v) = self.code_info.as_ref() { + struct_ser.serialize_field("codeInfo", v)?; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + if !self.data.is_empty() { + #[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 QueryContractHistoryResponse { +impl<'de> serde::Deserialize<'de> for QueryCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["entries", "pagination"]; + const FIELDS: &[&str] = &["code_info", "codeInfo", "data"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Entries, - Pagination, + CodeInfo, + Data, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -9640,8 +5526,8 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { E: serde::de::Error, { match value { - "entries" => Ok(GeneratedField::Entries), - "pagination" => Ok(GeneratedField::Pagination), + "codeInfo" | "code_info" => Ok(GeneratedField::CodeInfo), + "data" => Ok(GeneratedField::Data), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9651,51 +5537,51 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractHistoryResponse; + type Value = QueryCodeResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodeResponse") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut entries__ = None; - let mut pagination__ = None; + let mut code_info__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Entries => { - if entries__.is_some() { - return Err(serde::de::Error::duplicate_field("entries")); + GeneratedField::CodeInfo => { + if code_info__.is_some() { + return Err(serde::de::Error::duplicate_field("codeInfo")); } - entries__ = Some(map_.next_value()?); + code_info__ = map_.next_value()?; } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - pagination__ = map_.next_value()?; + data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); } } } - Ok(QueryContractHistoryResponse { - entries: entries__.unwrap_or_default(), - pagination: pagination__, + Ok(QueryCodeResponse { + code_info: code_info__, + data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractHistoryResponse", + "cosmwasm.wasm.v1.QueryCodeResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractInfoRequest { +impl serde::Serialize for QueryCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9703,28 +5589,28 @@ impl serde::Serialize for QueryContractInfoRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { +impl<'de> serde::Deserialize<'de> for QueryCodesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address"]; + const FIELDS: &[&str] = &["pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -9749,7 +5635,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9759,43 +5645,40 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractInfoRequest; + type Value = QueryCodesRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesRequest") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - address__ = Some(map_.next_value()?); + pagination__ = map_.next_value()?; } } } - Ok(QueryContractInfoRequest { - address: address__.unwrap_or_default(), + Ok(QueryCodesRequest { + pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractInfoRequest", + "cosmwasm.wasm.v1.QueryCodesRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractInfoResponse { +impl serde::Serialize for QueryCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9803,35 +5686,35 @@ impl serde::Serialize for QueryContractInfoResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { + if !self.code_infos.is_empty() { len += 1; } - if self.contract_info.is_some() { + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoResponse", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryCodesResponse", len)?; + if !self.code_infos.is_empty() { + struct_ser.serialize_field("codeInfos", &self.code_infos)?; } - if let Some(v) = self.contract_info.as_ref() { - struct_ser.serialize_field("contractInfo", v)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { +impl<'de> serde::Deserialize<'de> for QueryCodesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "contract_info", "contractInfo"]; + const FIELDS: &[&str] = &["code_infos", "codeInfos", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, - ContractInfo, + CodeInfos, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -9856,8 +5739,8 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), - "contractInfo" | "contract_info" => Ok(GeneratedField::ContractInfo), + "codeInfos" | "code_infos" => Ok(GeneratedField::CodeInfos), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9867,51 +5750,48 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractInfoResponse; + type Value = QueryCodesResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryCodesResponse") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; - let mut contract_info__ = None; + let mut code_infos__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); + GeneratedField::CodeInfos => { + if code_infos__.is_some() { + return Err(serde::de::Error::duplicate_field("codeInfos")); } - address__ = Some(map_.next_value()?); + code_infos__ = Some(map_.next_value()?); } - GeneratedField::ContractInfo => { - if contract_info__.is_some() { - return Err(serde::de::Error::duplicate_field("contractInfo")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - contract_info__ = map_.next_value()?; + pagination__ = map_.next_value()?; } } } - Ok(QueryContractInfoResponse { - address: address__.unwrap_or_default(), - contract_info: contract_info__, + Ok(QueryCodesResponse { + code_infos: code_infos__.unwrap_or_default(), + pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractInfoResponse", + "cosmwasm.wasm.v1.QueryCodesResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractsByCodeRequest { +impl serde::Serialize for QueryContractHistoryRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9919,17 +5799,16 @@ impl serde::Serialize for QueryContractsByCodeRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.code_id != 0 { + if !self.address.is_empty() { len += 1; } if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeRequest", len)?; - if self.code_id != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; } if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; @@ -9937,17 +5816,17 @@ impl serde::Serialize for QueryContractsByCodeRequest { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { +impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_id", "codeId", "pagination"]; + const FIELDS: &[&str] = &["address", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeId, + Address, Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -9973,7 +5852,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { E: serde::de::Error, { match value { - "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "address" => Ok(GeneratedField::Address), "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -9984,31 +5863,28 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractsByCodeRequest; + type Value = QueryContractHistoryRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryRequest") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_id__ = None; + let mut address__ = None; let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + address__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { @@ -10018,20 +5894,20 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { } } } - Ok(QueryContractsByCodeRequest { - code_id: code_id__.unwrap_or_default(), + Ok(QueryContractHistoryRequest { + address: address__.unwrap_or_default(), pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractsByCodeRequest", + "cosmwasm.wasm.v1.QueryContractHistoryRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractsByCodeResponse { +impl serde::Serialize for QueryContractHistoryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10039,16 +5915,16 @@ impl serde::Serialize for QueryContractsByCodeResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.contracts.is_empty() { + if !self.entries.is_empty() { len += 1; } if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeResponse", len)?; - if !self.contracts.is_empty() { - struct_ser.serialize_field("contracts", &self.contracts)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractHistoryResponse", len)?; + if !self.entries.is_empty() { + struct_ser.serialize_field("entries", &self.entries)?; } if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; @@ -10056,17 +5932,17 @@ impl serde::Serialize for QueryContractsByCodeResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { +impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["contracts", "pagination"]; + const FIELDS: &[&str] = &["entries", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Contracts, + Entries, Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -10092,7 +5968,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { E: serde::de::Error, { match value { - "contracts" => Ok(GeneratedField::Contracts), + "entries" => Ok(GeneratedField::Entries), "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -10103,28 +5979,28 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractsByCodeResponse; + type Value = QueryContractHistoryResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractHistoryResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut contracts__ = None; + let mut entries__ = None; let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Contracts => { - if contracts__.is_some() { - return Err(serde::de::Error::duplicate_field("contracts")); + GeneratedField::Entries => { + if entries__.is_some() { + return Err(serde::de::Error::duplicate_field("entries")); } - contracts__ = Some(map_.next_value()?); + entries__ = Some(map_.next_value()?); } GeneratedField::Pagination => { if pagination__.is_some() { @@ -10134,20 +6010,20 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { } } } - Ok(QueryContractsByCodeResponse { - contracts: contracts__.unwrap_or_default(), + Ok(QueryContractHistoryResponse { + entries: entries__.unwrap_or_default(), pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractsByCodeResponse", + "cosmwasm.wasm.v1.QueryContractHistoryResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractsByCreatorRequest { +impl serde::Serialize for QueryContractInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10155,35 +6031,28 @@ impl serde::Serialize for QueryContractsByCreatorRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.creator_address.is_empty() { - len += 1; - } - if self.pagination.is_some() { + if !self.address.is_empty() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCreatorRequest", len)?; - if !self.creator_address.is_empty() { - struct_ser.serialize_field("creatorAddress", &self.creator_address)?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractsByCreatorRequest { +impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["creator_address", "creatorAddress", "pagination"]; + const FIELDS: &[&str] = &["address"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CreatorAddress, - Pagination, + Address, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -10208,10 +6077,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCreatorRequest { E: serde::de::Error, { match value { - "creatorAddress" | "creator_address" => { - Ok(GeneratedField::CreatorAddress) - } - "pagination" => Ok(GeneratedField::Pagination), + "address" => Ok(GeneratedField::Address), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10221,51 +6087,43 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCreatorRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractsByCreatorRequest; + type Value = QueryContractInfoRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCreatorRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoRequest") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut creator_address__ = None; - let mut pagination__ = None; + let mut address__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CreatorAddress => { - if creator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("creatorAddress")); - } - creator_address__ = Some(map_.next_value()?); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - pagination__ = map_.next_value()?; + address__ = Some(map_.next_value()?); } } } - Ok(QueryContractsByCreatorRequest { - creator_address: creator_address__.unwrap_or_default(), - pagination: pagination__, + Ok(QueryContractInfoRequest { + address: address__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractsByCreatorRequest", + "cosmwasm.wasm.v1.QueryContractInfoRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryContractsByCreatorResponse { +impl serde::Serialize for QueryContractInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10273,35 +6131,35 @@ impl serde::Serialize for QueryContractsByCreatorResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.contract_addresses.is_empty() { + if !self.address.is_empty() { len += 1; } - if self.pagination.is_some() { + if self.contract_info.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCreatorResponse", len)?; - if !self.contract_addresses.is_empty() { - struct_ser.serialize_field("contractAddresses", &self.contract_addresses)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractInfoResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + if let Some(v) = self.contract_info.as_ref() { + struct_ser.serialize_field("contractInfo", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryContractsByCreatorResponse { +impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["contract_addresses", "contractAddresses", "pagination"]; + const FIELDS: &[&str] = &["address", "contract_info", "contractInfo"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - ContractAddresses, - Pagination, + Address, + ContractInfo, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -10326,10 +6184,8 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCreatorResponse { E: serde::de::Error, { match value { - "contractAddresses" | "contract_addresses" => { - Ok(GeneratedField::ContractAddresses) - } - "pagination" => Ok(GeneratedField::Pagination), + "address" => Ok(GeneratedField::Address), + "contractInfo" | "contract_info" => Ok(GeneratedField::ContractInfo), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10339,72 +6195,89 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCreatorResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryContractsByCreatorResponse; + type Value = QueryContractInfoResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCreatorResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractInfoResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut contract_addresses__ = None; - let mut pagination__ = None; + let mut address__ = None; + let mut contract_info__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::ContractAddresses => { - if contract_addresses__.is_some() { - return Err(serde::de::Error::duplicate_field("contractAddresses")); + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - contract_addresses__ = Some(map_.next_value()?); + address__ = Some(map_.next_value()?); } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::ContractInfo => { + if contract_info__.is_some() { + return Err(serde::de::Error::duplicate_field("contractInfo")); } - pagination__ = map_.next_value()?; + contract_info__ = map_.next_value()?; } } } - Ok(QueryContractsByCreatorResponse { - contract_addresses: contract_addresses__.unwrap_or_default(), - pagination: pagination__, + Ok(QueryContractInfoResponse { + address: address__.unwrap_or_default(), + contract_info: contract_info__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryContractsByCreatorResponse", + "cosmwasm.wasm.v1.QueryContractInfoResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryParamsRequest { +impl serde::Serialize for QueryContractsByCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsRequest", len)?; + let mut len = 0; + if self.code_id != 0 { + len += 1; + } + if self.pagination.is_some() { + len += 1; + } + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeRequest", len)?; + if self.code_id != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("codeId", ToString::to_string(&self.code_id).as_str())?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryParamsRequest { +impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[]; + const FIELDS: &[&str] = &["code_id", "codeId", "pagination"]; #[allow(clippy::enum_variant_names)] - enum GeneratedField {} + enum GeneratedField { + CodeId, + Pagination, + } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -10427,7 +6300,11 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { where E: serde::de::Error, { - Err(serde::de::Error::unknown_field(value, FIELDS)) + match value { + "codeId" | "code_id" => Ok(GeneratedField::CodeId), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -10435,30 +6312,54 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsRequest; + type Value = QueryContractsByCodeRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; + let mut code_id__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::CodeId => { + if code_id__.is_some() { + return Err(serde::de::Error::duplicate_field("codeId")); + } + code_id__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } } - Ok(QueryParamsRequest {}) + Ok(QueryContractsByCodeRequest { + code_id: code_id__.unwrap_or_default(), + pagination: pagination__, + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryParamsRequest", + "cosmwasm.wasm.v1.QueryContractsByCodeRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryParamsResponse { +impl serde::Serialize for QueryContractsByCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10466,28 +6367,35 @@ impl serde::Serialize for QueryParamsResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if self.params.is_some() { + if !self.contracts.is_empty() { + len += 1; + } + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsResponse", len)?; - if let Some(v) = self.params.as_ref() { - struct_ser.serialize_field("params", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryContractsByCodeResponse", len)?; + if !self.contracts.is_empty() { + struct_ser.serialize_field("contracts", &self.contracts)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryParamsResponse { +impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["params"]; + const FIELDS: &[&str] = &["contracts", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Params, + Contracts, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -10512,7 +6420,8 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { E: serde::de::Error, { match value { - "params" => Ok(GeneratedField::Params), + "contracts" => Ok(GeneratedField::Contracts), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10522,68 +6431,72 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryParamsResponse; + type Value = QueryContractsByCodeResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryContractsByCodeResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut params__ = None; + let mut contracts__ = None; + let mut pagination__ = 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::Contracts => { + if contracts__.is_some() { + return Err(serde::de::Error::duplicate_field("contracts")); } - params__ = map_.next_value()?; + contracts__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; } } } - Ok(QueryParamsResponse { params: params__ }) + Ok(QueryContractsByCodeResponse { + contracts: contracts__.unwrap_or_default(), + pagination: pagination__, + }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryParamsResponse", + "cosmwasm.wasm.v1.QueryContractsByCodeResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryPinnedCodesRequest { +impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let mut len = 0; - if self.pagination.is_some() { - len += 1; - } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesRequest", len)?; - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; - } + let len = 0; + let struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsRequest", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { +impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["pagination"]; + const FIELDS: &[&str] = &[]; #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Pagination, - } + enum GeneratedField {} impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -10606,10 +6519,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { where E: serde::de::Error, { - match value { - "pagination" => Ok(GeneratedField::Pagination), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -10617,43 +6527,30 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPinnedCodesRequest; + type Value = QueryParamsRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsRequest") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut pagination__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); - } - pagination__ = map_.next_value()?; - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(QueryPinnedCodesRequest { - pagination: pagination__, - }) + Ok(QueryParamsRequest {}) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryPinnedCodesRequest", + "cosmwasm.wasm.v1.QueryParamsRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryPinnedCodesResponse { +impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10661,42 +6558,28 @@ impl serde::Serialize for QueryPinnedCodesResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.code_ids.is_empty() { - len += 1; - } - if self.pagination.is_some() { + if self.params.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesResponse", len)?; - if !self.code_ids.is_empty() { - struct_ser.serialize_field( - "codeIds", - &self - .code_ids - .iter() - .map(ToString::to_string) - .collect::>(), - )?; - } - if let Some(v) = self.pagination.as_ref() { - struct_ser.serialize_field("pagination", v)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryParamsResponse", len)?; + if let Some(v) = self.params.as_ref() { + struct_ser.serialize_field("params", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { +impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["code_ids", "codeIds", "pagination"]; + const FIELDS: &[&str] = &["params"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CodeIds, - Pagination, + Params, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -10721,8 +6604,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { E: serde::de::Error, { match value { - "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), - "pagination" => Ok(GeneratedField::Pagination), + "params" => Ok(GeneratedField::Params), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10732,56 +6614,38 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryPinnedCodesResponse; + type Value = QueryParamsResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryParamsResponse") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut code_ids__ = None; - let mut pagination__ = None; + let mut params__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CodeIds => { - if code_ids__.is_some() { - return Err(serde::de::Error::duplicate_field("codeIds")); - } - code_ids__ = Some( - map_.next_value::>>()? - .into_iter() - .map(|x| x.0) - .collect(), - ); - } - GeneratedField::Pagination => { - if pagination__.is_some() { - return Err(serde::de::Error::duplicate_field("pagination")); + GeneratedField::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); } - pagination__ = map_.next_value()?; + params__ = map_.next_value()?; } } } - Ok(QueryPinnedCodesResponse { - code_ids: code_ids__.unwrap_or_default(), - pagination: pagination__, - }) + Ok(QueryParamsResponse { params: params__ }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryPinnedCodesResponse", + "cosmwasm.wasm.v1.QueryParamsResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryRawContractStateRequest { +impl serde::Serialize for QueryPinnedCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10789,39 +6653,28 @@ impl serde::Serialize for QueryRawContractStateRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if !self.query_data.is_empty() { + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.query_data.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "queryData", - pbjson::private::base64::encode(&self.query_data).as_str(), - )?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { +impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["address", "query_data", "queryData"]; + const FIELDS: &[&str] = &["pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Address, - QueryData, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -10846,8 +6699,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { E: serde::de::Error, { match value { - "address" => Ok(GeneratedField::Address), - "queryData" | "query_data" => Ok(GeneratedField::QueryData), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10857,54 +6709,43 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryRawContractStateRequest; + type Value = QueryPinnedCodesRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesRequest") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut address__ = None; - let mut query_data__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map_.next_value()?); - } - GeneratedField::QueryData => { - if query_data__.is_some() { - return Err(serde::de::Error::duplicate_field("queryData")); + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); } - query_data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + pagination__ = map_.next_value()?; } } } - Ok(QueryRawContractStateRequest { - address: address__.unwrap_or_default(), - query_data: query_data__.unwrap_or_default(), + Ok(QueryPinnedCodesRequest { + pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryRawContractStateRequest", + "cosmwasm.wasm.v1.QueryPinnedCodesRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QueryRawContractStateResponse { +impl serde::Serialize for QueryPinnedCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10912,30 +6753,42 @@ impl serde::Serialize for QueryRawContractStateResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.data.is_empty() { + if !self.code_ids.is_empty() { + len += 1; + } + if self.pagination.is_some() { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateResponse", len)?; - if !self.data.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryPinnedCodesResponse", len)?; + if !self.code_ids.is_empty() { + struct_ser.serialize_field( + "codeIds", + &self + .code_ids + .iter() + .map(ToString::to_string) + .collect::>(), + )?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { +impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["data"]; + const FIELDS: &[&str] = &["code_ids", "codeIds", "pagination"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Data, + CodeIds, + Pagination, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -10960,7 +6813,8 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { E: serde::de::Error, { match value { - "data" => Ok(GeneratedField::Data), + "codeIds" | "code_ids" => Ok(GeneratedField::CodeIds), + "pagination" => Ok(GeneratedField::Pagination), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -10970,46 +6824,56 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QueryRawContractStateResponse; + type Value = QueryPinnedCodesResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryPinnedCodesResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut data__ = None; + let mut code_ids__ = None; + let mut pagination__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); + GeneratedField::CodeIds => { + if code_ids__.is_some() { + return Err(serde::de::Error::duplicate_field("codeIds")); } - data__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, + code_ids__ = Some( + map_.next_value::>>()? + .into_iter() + .map(|x| x.0) + .collect(), ); } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } } } - Ok(QueryRawContractStateResponse { - data: data__.unwrap_or_default(), + Ok(QueryPinnedCodesResponse { + code_ids: code_ids__.unwrap_or_default(), + pagination: pagination__, }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QueryRawContractStateResponse", + "cosmwasm.wasm.v1.QueryPinnedCodesResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QuerySmartContractStateRequest { +impl serde::Serialize for QueryRawContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -11024,7 +6888,7 @@ impl serde::Serialize for QuerySmartContractStateRequest { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateRequest", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateRequest", len)?; if !self.address.is_empty() { struct_ser.serialize_field("address", &self.address)?; } @@ -11038,7 +6902,7 @@ impl serde::Serialize for QuerySmartContractStateRequest { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { +impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -11085,16 +6949,16 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySmartContractStateRequest; + type Value = QueryRawContractStateRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateRequest") + formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateRequest") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -11119,20 +6983,20 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { } } } - Ok(QuerySmartContractStateRequest { + Ok(QueryRawContractStateRequest { address: address__.unwrap_or_default(), query_data: query_data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QuerySmartContractStateRequest", + "cosmwasm.wasm.v1.QueryRawContractStateRequest", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for QuerySmartContractStateResponse { +impl serde::Serialize for QueryRawContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -11144,7 +7008,7 @@ impl serde::Serialize for QuerySmartContractStateResponse { len += 1; } let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateResponse", len)?; + serializer.serialize_struct("cosmwasm.wasm.v1.QueryRawContractStateResponse", len)?; if !self.data.is_empty() { #[allow(clippy::needless_borrow)] struct_ser @@ -11153,7 +7017,7 @@ impl serde::Serialize for QuerySmartContractStateResponse { struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { +impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -11198,16 +7062,16 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = QuerySmartContractStateResponse; + type Value = QueryRawContractStateResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateResponse") + formatter.write_str("struct cosmwasm.wasm.v1.QueryRawContractStateResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { @@ -11225,19 +7089,19 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { } } } - Ok(QuerySmartContractStateResponse { + Ok(QueryRawContractStateResponse { data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.QuerySmartContractStateResponse", + "cosmwasm.wasm.v1.QueryRawContractStateResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for Sequence { +impl serde::Serialize for QuerySmartContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -11245,39 +7109,39 @@ impl serde::Serialize for Sequence { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.id_key.is_empty() { + if !self.address.is_empty() { len += 1; } - if self.value != 0 { + if !self.query_data.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Sequence", len)?; - if !self.id_key.is_empty() { + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.query_data.is_empty() { #[allow(clippy::needless_borrow)] struct_ser.serialize_field( - "idKey", - pbjson::private::base64::encode(&self.id_key).as_str(), + "queryData", + pbjson::private::base64::encode(&self.query_data).as_str(), )?; } - if self.value != 0 { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", ToString::to_string(&self.value).as_str())?; - } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for Sequence { +impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["id_key", "idKey", "value"]; + const FIELDS: &[&str] = &["address", "query_data", "queryData"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - IdKey, - Value, + Address, + QueryData, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -11302,8 +7166,8 @@ impl<'de> serde::Deserialize<'de> for Sequence { E: serde::de::Error, { match value { - "idKey" | "id_key" => Ok(GeneratedField::IdKey), - "value" => Ok(GeneratedField::Value), + "address" => Ok(GeneratedField::Address), + "queryData" | "query_data" => Ok(GeneratedField::QueryData), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -11313,50 +7177,54 @@ impl<'de> serde::Deserialize<'de> for Sequence { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Sequence; + type Value = QuerySmartContractStateRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.Sequence") + formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map( + self, + mut map_: V, + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut id_key__ = None; - let mut value__ = None; + let mut address__ = None; + let mut query_data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::IdKey => { - if id_key__.is_some() { - return Err(serde::de::Error::duplicate_field("idKey")); + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); } - id_key__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + address__ = Some(map_.next_value()?); } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); + GeneratedField::QueryData => { + if query_data__.is_some() { + return Err(serde::de::Error::duplicate_field("queryData")); } - value__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + query_data__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } } } - Ok(Sequence { - id_key: id_key__.unwrap_or_default(), - value: value__.unwrap_or_default(), + Ok(QuerySmartContractStateRequest { + address: address__.unwrap_or_default(), + query_data: query_data__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("cosmwasm.wasm.v1.Sequence", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.QuerySmartContractStateRequest", + FIELDS, + GeneratedVisitor, + ) } } -impl serde::Serialize for StoreAndInstantiateContractProposal { +impl serde::Serialize for QuerySmartContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -11364,141 +7232,30 @@ impl serde::Serialize for StoreAndInstantiateContractProposal { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.title.is_empty() { - len += 1; - } - if !self.description.is_empty() { - len += 1; - } - if !self.run_as.is_empty() { - len += 1; - } - if !self.wasm_byte_code.is_empty() { - len += 1; - } - if self.instantiate_permission.is_some() { - len += 1; - } - if self.unpin_code { - len += 1; - } - if !self.admin.is_empty() { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.msg.is_empty() { - len += 1; - } - if !self.funds.is_empty() { - len += 1; - } - if !self.source.is_empty() { - len += 1; - } - if !self.builder.is_empty() { - len += 1; - } - if !self.code_hash.is_empty() { - len += 1; - } - let mut struct_ser = serializer - .serialize_struct("cosmwasm.wasm.v1.StoreAndInstantiateContractProposal", len)?; - if !self.title.is_empty() { - struct_ser.serialize_field("title", &self.title)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; - } - if !self.run_as.is_empty() { - struct_ser.serialize_field("runAs", &self.run_as)?; - } - if !self.wasm_byte_code.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "wasmByteCode", - pbjson::private::base64::encode(&self.wasm_byte_code).as_str(), - )?; - } - if let Some(v) = self.instantiate_permission.as_ref() { - struct_ser.serialize_field("instantiatePermission", v)?; - } - if self.unpin_code { - struct_ser.serialize_field("unpinCode", &self.unpin_code)?; - } - if !self.admin.is_empty() { - struct_ser.serialize_field("admin", &self.admin)?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.msg.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; - } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; - } - if !self.source.is_empty() { - struct_ser.serialize_field("source", &self.source)?; - } - if !self.builder.is_empty() { - struct_ser.serialize_field("builder", &self.builder)?; + if !self.data.is_empty() { + len += 1; } - if !self.code_hash.is_empty() { + let mut struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.QuerySmartContractStateResponse", len)?; + if !self.data.is_empty() { #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "codeHash", - pbjson::private::base64::encode(&self.code_hash).as_str(), - )?; + struct_ser + .serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for StoreAndInstantiateContractProposal { +impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &[ - "title", - "description", - "run_as", - "runAs", - "wasm_byte_code", - "wasmByteCode", - "instantiate_permission", - "instantiatePermission", - "unpin_code", - "unpinCode", - "admin", - "label", - "msg", - "funds", - "source", - "builder", - "code_hash", - "codeHash", - ]; + const FIELDS: &[&str] = &["data"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Title, - Description, - RunAs, - WasmByteCode, - InstantiatePermission, - UnpinCode, - Admin, - Label, - Msg, - Funds, - Source, - Builder, - CodeHash, + Data, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -11523,21 +7280,7 @@ impl<'de> serde::Deserialize<'de> for StoreAndInstantiateContractProposal { E: serde::de::Error, { match value { - "title" => Ok(GeneratedField::Title), - "description" => Ok(GeneratedField::Description), - "runAs" | "run_as" => Ok(GeneratedField::RunAs), - "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), - "instantiatePermission" | "instantiate_permission" => { - Ok(GeneratedField::InstantiatePermission) - } - "unpinCode" | "unpin_code" => Ok(GeneratedField::UnpinCode), - "admin" => Ok(GeneratedField::Admin), - "label" => Ok(GeneratedField::Label), - "msg" => Ok(GeneratedField::Msg), - "funds" => Ok(GeneratedField::Funds), - "source" => Ok(GeneratedField::Source), - "builder" => Ok(GeneratedField::Builder), - "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), + "data" => Ok(GeneratedField::Data), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -11547,150 +7290,46 @@ impl<'de> serde::Deserialize<'de> for StoreAndInstantiateContractProposal { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = StoreAndInstantiateContractProposal; + type Value = QuerySmartContractStateResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.StoreAndInstantiateContractProposal") + formatter.write_str("struct cosmwasm.wasm.v1.QuerySmartContractStateResponse") } fn visit_map( self, mut map_: V, - ) -> std::result::Result + ) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut title__ = None; - let mut description__ = None; - let mut run_as__ = None; - let mut wasm_byte_code__ = None; - let mut instantiate_permission__ = None; - let mut unpin_code__ = None; - let mut admin__ = None; - let mut label__ = None; - let mut msg__ = None; - let mut funds__ = None; - let mut source__ = None; - let mut builder__ = None; - let mut code_hash__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Title => { - if title__.is_some() { - return Err(serde::de::Error::duplicate_field("title")); - } - title__ = Some(map_.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map_.next_value()?); - } - GeneratedField::RunAs => { - if run_as__.is_some() { - return Err(serde::de::Error::duplicate_field("runAs")); - } - run_as__ = Some(map_.next_value()?); - } - GeneratedField::WasmByteCode => { - if wasm_byte_code__.is_some() { - return Err(serde::de::Error::duplicate_field("wasmByteCode")); - } - wasm_byte_code__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::InstantiatePermission => { - if instantiate_permission__.is_some() { - return Err(serde::de::Error::duplicate_field( - "instantiatePermission", - )); - } - instantiate_permission__ = map_.next_value()?; - } - GeneratedField::UnpinCode => { - if unpin_code__.is_some() { - return Err(serde::de::Error::duplicate_field("unpinCode")); - } - unpin_code__ = Some(map_.next_value()?); - } - GeneratedField::Admin => { - if admin__.is_some() { - return Err(serde::de::Error::duplicate_field("admin")); - } - admin__ = Some(map_.next_value()?); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map_.next_value()?); - } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); - } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } - GeneratedField::Funds => { - if funds__.is_some() { - return Err(serde::de::Error::duplicate_field("funds")); - } - funds__ = Some(map_.next_value()?); - } - GeneratedField::Source => { - if source__.is_some() { - return Err(serde::de::Error::duplicate_field("source")); - } - source__ = Some(map_.next_value()?); - } - GeneratedField::Builder => { - if builder__.is_some() { - return Err(serde::de::Error::duplicate_field("builder")); - } - builder__ = Some(map_.next_value()?); - } - GeneratedField::CodeHash => { - if code_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("codeHash")); + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - code_hash__ = Some( + data__ = Some( map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? .0, ); } } } - Ok(StoreAndInstantiateContractProposal { - title: title__.unwrap_or_default(), - description: description__.unwrap_or_default(), - run_as: run_as__.unwrap_or_default(), - wasm_byte_code: wasm_byte_code__.unwrap_or_default(), - instantiate_permission: instantiate_permission__, - unpin_code: unpin_code__.unwrap_or_default(), - admin: admin__.unwrap_or_default(), - label: label__.unwrap_or_default(), - msg: msg__.unwrap_or_default(), - funds: funds__.unwrap_or_default(), - source: source__.unwrap_or_default(), - builder: builder__.unwrap_or_default(), - code_hash: code_hash__.unwrap_or_default(), + Ok(QuerySmartContractStateResponse { + data: data__.unwrap_or_default(), }) } } deserializer.deserialize_struct( - "cosmwasm.wasm.v1.StoreAndInstantiateContractProposal", + "cosmwasm.wasm.v1.QuerySmartContractStateResponse", FIELDS, GeneratedVisitor, ) } } -impl serde::Serialize for StoreCodeAuthorization { +impl serde::Serialize for Sequence { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -11698,28 +7337,39 @@ impl serde::Serialize for StoreCodeAuthorization { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.grants.is_empty() { + if !self.id_key.is_empty() { len += 1; } - let mut struct_ser = - serializer.serialize_struct("cosmwasm.wasm.v1.StoreCodeAuthorization", len)?; - if !self.grants.is_empty() { - struct_ser.serialize_field("grants", &self.grants)?; + if self.value != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.Sequence", len)?; + if !self.id_key.is_empty() { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field( + "idKey", + pbjson::private::base64::encode(&self.id_key).as_str(), + )?; + } + if self.value != 0 { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("value", ToString::to_string(&self.value).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for StoreCodeAuthorization { +impl<'de> serde::Deserialize<'de> for Sequence { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["grants"]; + const FIELDS: &[&str] = &["id_key", "idKey", "value"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Grants, + IdKey, + Value, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -11744,7 +7394,8 @@ impl<'de> serde::Deserialize<'de> for StoreCodeAuthorization { E: serde::de::Error, { match value { - "grants" => Ok(GeneratedField::Grants), + "idKey" | "id_key" => Ok(GeneratedField::IdKey), + "value" => Ok(GeneratedField::Value), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -11754,40 +7405,47 @@ impl<'de> serde::Deserialize<'de> for StoreCodeAuthorization { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = StoreCodeAuthorization; + type Value = Sequence; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.StoreCodeAuthorization") + formatter.write_str("struct cosmwasm.wasm.v1.Sequence") } - fn visit_map( - self, - mut map_: V, - ) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut grants__ = None; + let mut id_key__ = None; + let mut value__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Grants => { - if grants__.is_some() { - return Err(serde::de::Error::duplicate_field("grants")); + GeneratedField::IdKey => { + if id_key__.is_some() { + return Err(serde::de::Error::duplicate_field("idKey")); + } + id_key__ = Some( + map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? + .0, + ); + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); } - grants__ = Some(map_.next_value()?); + value__ = Some( + map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? + .0, + ); } } } - Ok(StoreCodeAuthorization { - grants: grants__.unwrap_or_default(), + Ok(Sequence { + id_key: id_key__.unwrap_or_default(), + value: value__.unwrap_or_default(), }) } } - deserializer.deserialize_struct( - "cosmwasm.wasm.v1.StoreCodeAuthorization", - FIELDS, - GeneratedVisitor, - ) + deserializer.deserialize_struct("cosmwasm.wasm.v1.Sequence", FIELDS, GeneratedVisitor) } } impl serde::Serialize for StoreCodeProposal { @@ -11816,15 +7474,6 @@ impl serde::Serialize for StoreCodeProposal { if self.unpin_code { len += 1; } - if !self.source.is_empty() { - len += 1; - } - if !self.builder.is_empty() { - len += 1; - } - if !self.code_hash.is_empty() { - len += 1; - } let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.StoreCodeProposal", len)?; if !self.title.is_empty() { @@ -11849,19 +7498,6 @@ impl serde::Serialize for StoreCodeProposal { if self.unpin_code { struct_ser.serialize_field("unpinCode", &self.unpin_code)?; } - if !self.source.is_empty() { - struct_ser.serialize_field("source", &self.source)?; - } - if !self.builder.is_empty() { - struct_ser.serialize_field("builder", &self.builder)?; - } - if !self.code_hash.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "codeHash", - pbjson::private::base64::encode(&self.code_hash).as_str(), - )?; - } struct_ser.end() } } @@ -11882,10 +7518,6 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { "instantiatePermission", "unpin_code", "unpinCode", - "source", - "builder", - "code_hash", - "codeHash", ]; #[allow(clippy::enum_variant_names)] @@ -11896,9 +7528,6 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { WasmByteCode, InstantiatePermission, UnpinCode, - Source, - Builder, - CodeHash, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -11931,9 +7560,6 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { Ok(GeneratedField::InstantiatePermission) } "unpinCode" | "unpin_code" => Ok(GeneratedField::UnpinCode), - "source" => Ok(GeneratedField::Source), - "builder" => Ok(GeneratedField::Builder), - "codeHash" | "code_hash" => Ok(GeneratedField::CodeHash), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -11959,9 +7585,6 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { let mut wasm_byte_code__ = None; let mut instantiate_permission__ = None; let mut unpin_code__ = None; - let mut source__ = None; - let mut builder__ = None; - let mut code_hash__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Title => { @@ -12005,27 +7628,6 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { } unpin_code__ = Some(map_.next_value()?); } - GeneratedField::Source => { - if source__.is_some() { - return Err(serde::de::Error::duplicate_field("source")); - } - source__ = Some(map_.next_value()?); - } - GeneratedField::Builder => { - if builder__.is_some() { - return Err(serde::de::Error::duplicate_field("builder")); - } - builder__ = Some(map_.next_value()?); - } - GeneratedField::CodeHash => { - if code_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("codeHash")); - } - code_hash__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); - } } } Ok(StoreCodeProposal { @@ -12035,9 +7637,6 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { wasm_byte_code: wasm_byte_code__.unwrap_or_default(), instantiate_permission: instantiate_permission__, unpin_code: unpin_code__.unwrap_or_default(), - source: source__.unwrap_or_default(), - builder: builder__.unwrap_or_default(), - code_hash: code_hash__.unwrap_or_default(), }) } } diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs index 54bf671d..8393eea9 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs @@ -1,16 +1,16 @@ // @generated /// Generated client implementations. #[cfg(feature = "grpc")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -21,7 +21,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -36,10 +36,7 @@ pub mod query_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -52,7 +49,7 @@ pub mod query_client { >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -85,47 +82,10 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn contract_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, 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("/cosmwasm.wasm.v1.Query/ContractInfo"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractInfo")); - self.inner.unary(req, path, codec).await - } - pub async fn contract_history( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, 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("/cosmwasm.wasm.v1.Query/ContractHistory"); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractHistory")); - self.inner.unary(req, path, codec).await - } - pub async fn contracts_by_code( + pub async fn store_code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -134,39 +94,19 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCode"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/StoreCode"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractsByCode")); - self.inner.unary(req, path, codec).await - } - pub async fn all_contract_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, 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("/cosmwasm.wasm.v1.Query/AllContractState"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "AllContractState", - )); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "StoreCode")); self.inner.unary(req, path, codec).await } - pub async fn raw_contract_state( + pub async fn instantiate_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -175,19 +115,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/RawContractState"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "RawContractState", + "cosmwasm.wasm.v1.Msg", + "InstantiateContract", )); self.inner.unary(req, path, codec).await } - pub async fn smart_contract_state( + pub async fn instantiate_contract2( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -198,18 +138,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/SmartContractState"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract2"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "SmartContractState", + "cosmwasm.wasm.v1.Msg", + "InstantiateContract2", )); self.inner.unary(req, path, codec).await } - pub async fn code( + pub async fn execute_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -217,16 +158,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Code"); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ExecuteContract"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Code")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ExecuteContract")); self.inner.unary(req, path, codec).await } - pub async fn codes( + pub async fn migrate_contract( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -235,16 +177,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Codes"); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/MigrateContract"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Codes")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "MigrateContract")); self.inner.unary(req, path, codec).await } - pub async fn pinned_codes( + pub async fn update_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -253,16 +196,16 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/PinnedCodes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateAdmin"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "PinnedCodes")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateAdmin")); self.inner.unary(req, path, codec).await } - pub async fn params( + pub async fn clear_admin( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -271,49 +214,26 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Params"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ClearAdmin"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - pub async fn contracts_by_creator( - &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("/cosmwasm.wasm.v1.Query/ContractsByCreator"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Query", - "ContractsByCreator", - )); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ClearAdmin")); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. #[cfg(feature = "grpc")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -324,7 +244,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -339,7 +259,10 @@ pub mod msg_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -352,7 +275,7 @@ pub mod msg_client { >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -385,10 +308,10 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - pub async fn store_code( + pub async fn contract_info( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -397,62 +320,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/StoreCode"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractInfo"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "StoreCode")); - self.inner.unary(req, path, codec).await - } - pub async fn instantiate_contract( - &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("/cosmwasm.wasm.v1.Msg/InstantiateContract"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "InstantiateContract", - )); - self.inner.unary(req, path, codec).await - } - pub async fn instantiate_contract2( - &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("/cosmwasm.wasm.v1.Msg/InstantiateContract2"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "InstantiateContract2", - )); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractInfo")); self.inner.unary(req, path, codec).await } - pub async fn execute_contract( + pub async fn contract_history( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -462,16 +339,16 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ExecuteContract"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractHistory"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ExecuteContract")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractHistory")); self.inner.unary(req, path, codec).await } - pub async fn migrate_contract( + pub async fn contracts_by_code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -481,16 +358,16 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = - http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/MigrateContract"); + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCode"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "MigrateContract")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "ContractsByCode")); self.inner.unary(req, path, codec).await } - pub async fn update_admin( + pub async fn all_contract_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -499,16 +376,19 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateAdmin"); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/AllContractState"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateAdmin")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Query", + "AllContractState", + )); self.inner.unary(req, path, codec).await } - pub async fn clear_admin( + pub async fn raw_contract_state( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -517,17 +397,20 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ClearAdmin"); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/RawContractState"); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "ClearAdmin")); + req.extensions_mut().insert(GrpcMethod::new( + "cosmwasm.wasm.v1.Query", + "RawContractState", + )); self.inner.unary(req, path, codec).await } - pub async fn update_instantiate_config( + pub async fn smart_contract_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { @@ -537,21 +420,19 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmwasm.wasm.v1.Msg/UpdateInstantiateConfig", - ); + let path = + http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/SmartContractState"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "UpdateInstantiateConfig", + "cosmwasm.wasm.v1.Query", + "SmartContractState", )); self.inner.unary(req, path, codec).await } - pub async fn update_params( + pub async fn code( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, @@ -559,16 +440,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateParams"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Code"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UpdateParams")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Code")); self.inner.unary(req, path, codec).await } - pub async fn sudo_contract( + pub async fn codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -577,16 +458,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/SudoContract"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Codes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "SudoContract")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Codes")); self.inner.unary(req, path, codec).await } - pub async fn pin_codes( + pub async fn pinned_codes( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -595,16 +476,16 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/PinCodes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/PinnedCodes"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "PinCodes")); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "PinnedCodes")); self.inner.unary(req, path, codec).await } - pub async fn unpin_codes( + pub async fn params( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( @@ -613,129 +494,10 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UnpinCodes"); + let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Params"); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmwasm.wasm.v1.Msg", "UnpinCodes")); - self.inner.unary(req, path, codec).await - } - pub async fn store_and_instantiate_contract( - &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( - "/cosmwasm.wasm.v1.Msg/StoreAndInstantiateContract", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "StoreAndInstantiateContract", - )); - self.inner.unary(req, path, codec).await - } - pub async fn remove_code_upload_params_addresses( - &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( - "/cosmwasm.wasm.v1.Msg/RemoveCodeUploadParamsAddresses", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "RemoveCodeUploadParamsAddresses", - )); - self.inner.unary(req, path, codec).await - } - pub async fn add_code_upload_params_addresses( - &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( - "/cosmwasm.wasm.v1.Msg/AddCodeUploadParamsAddresses", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "AddCodeUploadParamsAddresses", - )); - self.inner.unary(req, path, codec).await - } - pub async fn store_and_migrate_contract( - &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( - "/cosmwasm.wasm.v1.Msg/StoreAndMigrateContract", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "StoreAndMigrateContract", - )); - self.inner.unary(req, path, codec).await - } - pub async fn update_contract_label( - &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("/cosmwasm.wasm.v1.Msg/UpdateContractLabel"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "cosmwasm.wasm.v1.Msg", - "UpdateContractLabel", - )); + .insert(GrpcMethod::new("cosmwasm.wasm.v1.Query", "Params")); self.inner.unary(req, path, codec).await } } diff --git a/proto-build/buf.sdk.gen.yaml b/proto-build/buf.sdk.gen.yaml index c299ce78..f563d128 100644 --- a/proto-build/buf.sdk.gen.yaml +++ b/proto-build/buf.sdk.gen.yaml @@ -4,7 +4,8 @@ plugins: out: . opt: - compile_well_known_types - - extern_path=.google.protobuf=::pbjson_types +# - extern_path=.google.protobuf=::pbjson_types + - extern_path=.google.protobuf=::tendermint_proto::google::protobuf - extern_path=.tendermint=::tendermint_proto::v0_34 - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0 out: . diff --git a/proto-build/buf.wasmd.gen.yaml b/proto-build/buf.wasmd.gen.yaml index b01a4695..1618dd1e 100644 --- a/proto-build/buf.wasmd.gen.yaml +++ b/proto-build/buf.wasmd.gen.yaml @@ -4,7 +4,7 @@ plugins: out: . opt: - compile_well_known_types - - extern_path=.google.protobuf=::pbjson_types + - extern_path=.google.protobuf=::tendermint_proto::google::protobuf - extern_path=.tendermint=::tendermint_proto::v0_34 - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0 out: . diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index eda065f3..cca40af6 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -20,13 +20,13 @@ use walkdir::WalkDir; static QUIET: AtomicBool = AtomicBool::new(false); /// The Cosmos SDK commit or tag to be cloned and used to build the proto files -const COSMOS_SDK_REV: &str = "v0.47.10"; +const COSMOS_SDK_REV: &str = "v0.46.15"; /// The Cosmos ibc-go commit or tag to be cloned and used to build the proto files const IBC_REV: &str = "v3.0.0"; /// The wasmd commit or tag to be cloned and used to build the proto files -const WASMD_REV: &str = "v0.45.0"; +const WASMD_REV: &str = "v0.29.2"; // All paths must end with a / and either be absolute or include a ./ to reference the current // working directory. diff --git a/wasmd b/wasmd index 7165e41c..e4a2bfb5 160000 --- a/wasmd +++ b/wasmd @@ -1 +1 @@ -Subproject commit 7165e41cbf14d60a9fef4fb1e04c2c2e5e4e0cf4 +Subproject commit e4a2bfb5616c4ce3ddbc994a17c20b6de5fccad1 From 6755fa0cd0673e3537adf18fb1011ec549c6e6b6 Mon Sep 17 00:00:00 2001 From: "Tony Arcieri (iqlusion)" Date: Fri, 9 Aug 2024 07:35:44 -0600 Subject: [PATCH 20/31] Bump tendermint-rs crates to v0.39.1 (#483) Also removes `[patch.crates-io]` from Cargo.toml These releases include some various bugfixes and API changes we need. --- Cargo.lock | 19 +++++++++---------- Cargo.toml | 3 --- cosmos-sdk-proto/Cargo.toml | 2 +- cosmrs/Cargo.toml | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20f8cf17..1dc73ad9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1800,9 +1800,9 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.39.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a80791cbd52540b05798837bf2d07cb53bd7b59eaffc2e5181196361926daec" +checksum = "2f3afea7809ffaaf1e5d9c3c9997cb3a834df7e94fbfab2fad2bc4577f1cde41" dependencies = [ "bytes", "digest 0.10.7", @@ -1814,7 +1814,6 @@ dependencies = [ "num-traits", "once_cell", "prost", - "prost-types", "ripemd", "serde", "serde_bytes", @@ -1831,9 +1830,9 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.39.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a61aff4a3fc93807f5a38d10c3abbf26f3260eda376360307ccad30c34ce4d7" +checksum = "d8add7b85b0282e5901521f78fe441956ac1e2752452f4e1f2c0ce7e1f10d485" dependencies = [ "flex-error", "serde", @@ -1845,13 +1844,13 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.39.0" -source = "git+https://github.com/informalsystems/tendermint-rs#f1ebab84321de74d7770672d54f4bdf28a9ac65c" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3abf34ecf33125621519e9952688e7a59a98232d51538037ba21fbe526a802" dependencies = [ "bytes", "flex-error", "prost", - "prost-types", "serde", "serde_bytes", "subtle-encoding", @@ -1860,9 +1859,9 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.39.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc330a25442d7f6b64e94029de18f4cf4f1e408aa129ef07eca9a5afd33cbb2f" +checksum = "9693f42544bf3b41be3cbbfa418650c86e137fb8f5a57981659a84b677721ecf" dependencies = [ "async-trait", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 7a19b098..8f6cd616 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,3 @@ members = [ "cosmos-sdk-proto", "cosmrs" ] - -[patch.crates-io] -tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs" } diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 40a51377..4592d16d 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -17,7 +17,7 @@ rust-version = "1.72" [dependencies] prost = { version = "0.13", default-features = false } -tendermint-proto = "0.39" +tendermint-proto = "0.39.1" # Optional dependencies tonic = { version = "0.12", optional = true, default-features = false, features = ["codegen", "prost"] } diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml index dcee740e..fb399e97 100644 --- a/cosmrs/Cargo.toml +++ b/cosmrs/Cargo.toml @@ -21,12 +21,12 @@ serde = { version = "1", features = ["serde_derive"] } serde_json = "1" signature = { version = "2", features = ["std"] } subtle-encoding = { version = "0.5", features = ["bech32-preview"] } -tendermint = { version = "0.39", features = ["secp256k1"] } +tendermint = { version = "0.39.1", features = ["secp256k1"] } thiserror = "1" # optional dependencies bip32 = { version = "0.5", optional = true, default-features = false, features = ["alloc", "secp256k1"] } -tendermint-rpc = { version = "0.39", optional = true, features = ["http-client"] } +tendermint-rpc = { version = "0.39.1", optional = true, features = ["http-client"] } tokio = { version = "1", optional = true } [dev-dependencies] From b716d6d4f12c246444204ff6cbc581247c9f60bd Mon Sep 17 00:00:00 2001 From: Ash <96692350+ash-burnt@users.noreply.github.com> Date: Fri, 9 Aug 2024 07:34:49 -0700 Subject: [PATCH 21/31] Update cosmos-sdk-proto/Cargo.toml Co-authored-by: Tony Arcieri (iqlusion) --- cosmos-sdk-proto/Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 4440aa1f..3b2bc546 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -17,7 +17,6 @@ rust-version = "1.72" [dependencies] prost = { version = "0.13", default-features = false } -prost-types = "0.13" tendermint-proto = "0.39" serde = "1.0.203" From b7e04cc69e0654a103d798729b56dc8861e01927 Mon Sep 17 00:00:00 2001 From: Ash Date: Fri, 9 Aug 2024 07:35:27 -0700 Subject: [PATCH 22/31] remove comment --- proto-build/buf.sdk.gen.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/proto-build/buf.sdk.gen.yaml b/proto-build/buf.sdk.gen.yaml index f563d128..12f7ef23 100644 --- a/proto-build/buf.sdk.gen.yaml +++ b/proto-build/buf.sdk.gen.yaml @@ -4,7 +4,6 @@ plugins: out: . opt: - compile_well_known_types -# - extern_path=.google.protobuf=::pbjson_types - extern_path=.google.protobuf=::tendermint_proto::google::protobuf - extern_path=.tendermint=::tendermint_proto::v0_34 - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0 From 8474c92649a99c8389d1288edd34ddfbdfaca330 Mon Sep 17 00:00:00 2001 From: Ash Date: Fri, 9 Aug 2024 09:35:25 -0700 Subject: [PATCH 23/31] cargo changes --- Cargo.lock | 138 ++++++----------------------------------------------- 1 file changed, 15 insertions(+), 123 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7064da1a..0a020b17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -254,15 +254,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "num-traits", -] - [[package]] name = "const-oid" version = "0.9.5" @@ -289,10 +280,7 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" name = "cosmos-sdk-proto" version = "0.24.0-pre" dependencies = [ - "informalsystems-pbjson", - "informalsystems-pbjson-types", - "prost 0.13.1", - "prost-types 0.13.1", + "prost", "serde", "tendermint-proto", "tonic", @@ -949,40 +937,6 @@ dependencies = [ "hashbrown 0.14.1", ] -[[package]] -name = "informalsystems-pbjson" -version = "0.7.0" -source = "git+https://github.com/informalsystems/pbjson.git#d08d90e71ec342f199a11e0a6f5a594723275ee8" -dependencies = [ - "base64 0.21.4", - "serde", -] - -[[package]] -name = "informalsystems-pbjson-build" -version = "0.7.0" -source = "git+https://github.com/informalsystems/pbjson.git#d08d90e71ec342f199a11e0a6f5a594723275ee8" -dependencies = [ - "heck", - "itertools 0.12.1", - "prost 0.12.6", - "prost-types 0.12.6", -] - -[[package]] -name = "informalsystems-pbjson-types" -version = "0.7.0" -source = "git+https://github.com/informalsystems/pbjson.git#d08d90e71ec342f199a11e0a6f5a594723275ee8" -dependencies = [ - "bytes", - "chrono", - "informalsystems-pbjson", - "informalsystems-pbjson-build", - "prost 0.12.6", - "prost-build 0.12.6", - "serde", -] - [[package]] name = "ipnet" version = "2.8.0" @@ -998,15 +952,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.9" @@ -1258,16 +1203,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive 0.12.6", -] - [[package]] name = "prost" version = "0.13.1" @@ -1275,28 +1210,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" dependencies = [ "bytes", - "prost-derive 0.13.1", -] - -[[package]] -name = "prost-build" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" -dependencies = [ - "bytes", - "heck", - "itertools 0.10.5", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost 0.12.6", - "prost-types 0.12.6", - "regex", - "syn", - "tempfile", + "prost-derive", ] [[package]] @@ -1307,32 +1221,19 @@ checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" dependencies = [ "bytes", "heck", - "itertools 0.10.5", + "itertools", "log", "multimap", "once_cell", "petgraph", "prettyplease", - "prost 0.13.1", - "prost-types 0.13.1", + "prost", + "prost-types", "regex", "syn", "tempfile", ] -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "prost-derive" version = "0.13.1" @@ -1340,36 +1241,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools", "proc-macro2", "quote", "syn", ] -[[package]] -name = "prost-types" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" -dependencies = [ - "prost 0.12.6", -] - [[package]] name = "prost-types" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" dependencies = [ - "prost 0.13.1", + "prost", ] [[package]] name = "proto-build" version = "0.1.0" dependencies = [ - "prost 0.13.1", - "prost-build 0.13.1", + "prost", + "prost-build", "regex", "tonic", "tonic-build", @@ -1922,8 +1814,8 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost 0.13.1", - "prost-types 0.13.1", + "prost", + "prost-types", "ripemd", "serde", "serde_bytes", @@ -1959,8 +1851,8 @@ source = "git+https://github.com/informalsystems/tendermint-rs#f1ebab84321de74d7 dependencies = [ "bytes", "flex-error", - "prost 0.13.1", - "prost-types 0.13.1", + "prost", + "prost-types", "serde", "serde_bytes", "subtle-encoding", @@ -2179,7 +2071,7 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost 0.13.1", + "prost", "socket2 0.5.7", "tokio", "tokio-stream", @@ -2197,7 +2089,7 @@ checksum = "568392c5a2bd0020723e3f387891176aabafe36fd9fcd074ad309dfa0c8eb964" dependencies = [ "prettyplease", "proc-macro2", - "prost-build 0.13.1", + "prost-build", "quote", "syn", ] From 096016876b49dc09b923f67c65268152d13fc152 Mon Sep 17 00:00:00 2001 From: Ash Date: Fri, 9 Aug 2024 09:58:07 -0700 Subject: [PATCH 24/31] formatting --- proto-build/src/main.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index cca40af6..8ad99cbe 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -426,14 +426,20 @@ fn apply_patches(proto_dir: &Path) { } for (pattern, replacement) in [ - ("stake_authorization::Validators::AllowList", "stake_authorization::Policy::AllowList"), - ("stake_authorization::Validators::DenyList", "stake_authorization::Policy::DenyList"), + ( + "stake_authorization::Validators::AllowList", + "stake_authorization::Policy::AllowList", + ), + ( + "stake_authorization::Validators::DenyList", + "stake_authorization::Policy::DenyList", + ), ] { patch_file( &proto_dir.join("cosmos-sdk/cosmos.staking.v1beta1.serde.rs"), &Regex::new(pattern).unwrap(), replacement, ) - .expect("error patching cosmos.staking.v1beta1.serde.rs"); + .expect("error patching cosmos.staking.v1beta1.serde.rs"); } } From e8b7d0558a4ba29f955ea51ca2c57aeba487aa4d Mon Sep 17 00:00:00 2001 From: Ash Date: Fri, 9 Aug 2024 10:00:54 -0700 Subject: [PATCH 25/31] cosmwasm authorizations don't exist in this version --- cosmos-sdk-proto/src/type_names.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/cosmos-sdk-proto/src/type_names.rs b/cosmos-sdk-proto/src/type_names.rs index f7746d88..7871dced 100644 --- a/cosmos-sdk-proto/src/type_names.rs +++ b/cosmos-sdk-proto/src/type_names.rs @@ -504,19 +504,4 @@ mod wasm { COSMWASM_PACKAGE, "MsgClearAdminResponse" ); - impl_name!( - cosmwasm::wasm::v1::ContractExecutionAuthorization, - COSMWASM_PACKAGE, - "ContractExecutionAuthorization" - ); - impl_name!( - cosmwasm::wasm::v1::StoreCodeAuthorization, - COSMWASM_PACKAGE, - "StoreCodeAuthorization" - ); - impl_name!( - cosmwasm::wasm::v1::ContractMigrationAuthorization, - COSMWASM_PACKAGE, - "ContractMigrationAuthorization" - ); } From 304bc5d569c9073df742583546a852c000712847 Mon Sep 17 00:00:00 2001 From: Ash Date: Fri, 9 Aug 2024 10:25:21 -0700 Subject: [PATCH 26/31] bring in pbjson for serialization --- Cargo.lock | 11 +++++++++++ cosmos-sdk-proto/Cargo.toml | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 60f85653..eb8a86da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,6 +280,7 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" name = "cosmos-sdk-proto" version = "0.24.0-pre" dependencies = [ + "informalsystems-pbjson", "prost", "serde", "tendermint-proto", @@ -937,6 +938,16 @@ dependencies = [ "hashbrown 0.14.1", ] +[[package]] +name = "informalsystems-pbjson" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa4a0980c8379295100d70854354e78df2ee1c6ca0f96ffe89afeb3140e3a3d" +dependencies = [ + "base64 0.21.4", + "serde", +] + [[package]] name = "ipnet" version = "2.8.0" diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index b639b6cc..347c6085 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -18,7 +18,8 @@ rust-version = "1.72" [dependencies] prost = { version = "0.13", default-features = false } tendermint-proto = "0.39.1" -serde = "1.0.203" +serde = { version = "1.0.203", default-features = false } +pbjson = { package = "informalsystems-pbjson", version = "0.7" } # Optional dependencies tonic = { version = "0.12", optional = true, default-features = false, features = ["codegen", "prost"] } From 395d8d7ab907d64c0b1f36a96c3c0b677e1cf9da Mon Sep 17 00:00:00 2001 From: Ash <96692350+ash-burnt@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:42:38 -0700 Subject: [PATCH 27/31] Update cosmos-sdk-proto/Cargo.toml Co-authored-by: Tony Arcieri (iqlusion) --- cosmos-sdk-proto/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 347c6085..adbbea4d 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -18,7 +18,7 @@ rust-version = "1.72" [dependencies] prost = { version = "0.13", default-features = false } tendermint-proto = "0.39.1" -serde = { version = "1.0.203", default-features = false } +serde = { version = "1.0.203", default-features = false, features = ["alloc"] } pbjson = { package = "informalsystems-pbjson", version = "0.7" } # Optional dependencies From 39988e6c4c8f44e291d85c3042869bd87f59c251 Mon Sep 17 00:00:00 2001 From: Ash <96692350+ash-burnt@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:51:48 -0700 Subject: [PATCH 28/31] Update cosmos-sdk-proto/Cargo.toml Co-authored-by: Tony Arcieri (iqlusion) --- cosmos-sdk-proto/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index adbbea4d..509deacf 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -18,7 +18,7 @@ rust-version = "1.72" [dependencies] prost = { version = "0.13", default-features = false } tendermint-proto = "0.39.1" -serde = { version = "1.0.203", default-features = false, features = ["alloc"] } +serde = "1.0.203" pbjson = { package = "informalsystems-pbjson", version = "0.7" } # Optional dependencies From 608a33754691f1d2ff5dc4fd50d3403fae62b9af Mon Sep 17 00:00:00 2001 From: Ash Date: Fri, 9 Aug 2024 11:31:06 -0700 Subject: [PATCH 29/31] move serialization into a feature tag --- cosmos-sdk-proto/Cargo.toml | 5 +- .../cosmos.app.module.v1alpha1.serde.rs | 3 + .../cosmos-sdk/cosmos.app.v1alpha1.serde.rs | 21 ++ .../cosmos-sdk/cosmos.auth.v1beta1.serde.rs | 66 +++++ .../cosmos-sdk/cosmos.authz.v1beta1.serde.rs | 57 +++++ .../cosmos-sdk/cosmos.bank.v1beta1.serde.rs | 99 +++++++ .../cosmos.base.abci.v1beta1.serde.rs | 30 +++ .../cosmos.base.kv.v1beta1.serde.rs | 6 + .../cosmos.base.node.v1beta1.serde.rs | 6 + .../cosmos.base.query.v1beta1.serde.rs | 6 + .../cosmos.base.reflection.v1beta1.serde.rs | 12 + .../cosmos.base.reflection.v2alpha1.serde.rs | 78 ++++++ .../cosmos.base.snapshots.v1beta1.serde.rs | 27 ++ .../cosmos.base.store.v1beta1.serde.rs | 18 ++ .../cosmos.base.tendermint.v1beta1.serde.rs | 63 +++++ .../cosmos-sdk/cosmos.base.v1beta1.serde.rs | 12 + .../cosmos.capability.v1beta1.serde.rs | 15 ++ .../cosmos-sdk/cosmos.crisis.v1beta1.serde.rs | 9 + .../cosmos-sdk/cosmos.crypto.ed25519.serde.rs | 6 + .../cosmos-sdk/cosmos.crypto.hd.v1.serde.rs | 3 + .../cosmos.crypto.keyring.v1.serde.rs | 15 ++ .../cosmos.crypto.multisig.serde.rs | 3 + .../cosmos.crypto.multisig.v1beta1.serde.rs | 6 + .../cosmos.crypto.secp256k1.serde.rs | 6 + .../cosmos.crypto.secp256r1.serde.rs | 6 + .../cosmos.distribution.v1beta1.serde.rs | 138 ++++++++++ .../cosmos.evidence.v1beta1.serde.rs | 24 ++ .../cosmos.feegrant.v1beta1.serde.rs | 45 ++++ .../cosmos.genutil.v1beta1.serde.rs | 3 + .../prost/cosmos-sdk/cosmos.gov.v1.serde.rs | 109 ++++++++ .../cosmos-sdk/cosmos.gov.v1beta1.serde.rs | 106 ++++++++ .../prost/cosmos-sdk/cosmos.group.v1.serde.rs | 242 ++++++++++++++++++ .../cosmos-sdk/cosmos.mint.v1beta1.serde.rs | 27 ++ .../cosmos-sdk/cosmos.nft.v1beta1.serde.rs | 69 +++++ .../cosmos.orm.module.v1alpha1.serde.rs | 3 + .../prost/cosmos-sdk/cosmos.orm.v1.serde.rs | 12 + .../cosmos-sdk/cosmos.orm.v1alpha1.serde.rs | 8 + .../cosmos-sdk/cosmos.params.v1beta1.serde.rs | 21 ++ .../cosmos.slashing.v1beta1.serde.rs | 42 +++ .../cosmos.staking.v1beta1.serde.rs | 196 ++++++++++++++ .../cosmos.tx.signing.v1beta1.serde.rs | 17 ++ .../cosmos-sdk/cosmos.tx.v1beta1.serde.rs | 73 ++++++ .../cosmos.upgrade.v1beta1.serde.rs | 54 ++++ .../cosmos.vesting.v1beta1.serde.rs | 36 +++ .../prost/cosmos-sdk/cosmos_proto.serde.rs | 8 + .../wasmd/cosmos.base.query.v1beta1.serde.rs | 6 + .../prost/wasmd/cosmos.base.v1beta1.serde.rs | 12 + .../src/prost/wasmd/cosmos_proto.serde.rs | 8 + .../src/prost/wasmd/cosmwasm.wasm.v1.serde.rs | 187 ++++++++++++++ proto-build/src/main.rs | 5 + 50 files changed, 2027 insertions(+), 2 deletions(-) diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 509deacf..8939b736 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -18,11 +18,11 @@ rust-version = "1.72" [dependencies] prost = { version = "0.13", default-features = false } tendermint-proto = "0.39.1" -serde = "1.0.203" -pbjson = { package = "informalsystems-pbjson", version = "0.7" } # Optional dependencies tonic = { version = "0.12", optional = true, default-features = false, features = ["codegen", "prost"] } +serde = { version = "1.0.203", optional = true, default-features = false, features = ["alloc"] } +pbjson = { package = "informalsystems-pbjson", optional = true, version = "0.7" } [features] default = ["grpc-transport"] @@ -30,6 +30,7 @@ std = ["prost/std", "tendermint-proto/std"] grpc = ["std", "tonic"] grpc-transport = ["grpc", "tonic/transport"] cosmwasm = [] +serialization = ["serde", "tendermint-proto/std", "pbjson"] [package.metadata.docs.rs] all-features = true diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs index ed715133..b1386481 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Module { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -11,6 +12,7 @@ impl serde::Serialize for Module { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Module { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -21,6 +23,7 @@ impl<'de> serde::Deserialize<'de> for Module { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs index 276109cc..e57ec165 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Config { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -17,6 +18,7 @@ impl serde::Serialize for Config { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Config { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -29,6 +31,7 @@ impl<'de> serde::Deserialize<'de> for Config { enum GeneratedField { Modules, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -91,6 +94,7 @@ impl<'de> serde::Deserialize<'de> for Config { deserializer.deserialize_struct("cosmos.app.v1alpha1.Config", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MigrateFromInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -110,6 +114,7 @@ impl serde::Serialize for MigrateFromInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MigrateFromInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -122,6 +127,7 @@ impl<'de> serde::Deserialize<'de> for MigrateFromInfo { enum GeneratedField { Module, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -188,6 +194,7 @@ impl<'de> serde::Deserialize<'de> for MigrateFromInfo { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ModuleConfig { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -213,6 +220,7 @@ impl serde::Serialize for ModuleConfig { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ModuleConfig { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -226,6 +234,7 @@ impl<'de> serde::Deserialize<'de> for ModuleConfig { Name, Config, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -301,6 +310,7 @@ impl<'de> serde::Deserialize<'de> for ModuleConfig { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ModuleDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -332,6 +342,7 @@ impl serde::Serialize for ModuleDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ModuleDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -353,6 +364,7 @@ impl<'de> serde::Deserialize<'de> for ModuleDescriptor { UsePackage, CanMigrateFrom, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -439,6 +451,7 @@ impl<'de> serde::Deserialize<'de> for ModuleDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PackageReference { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -464,6 +477,7 @@ impl serde::Serialize for PackageReference { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PackageReference { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -477,6 +491,7 @@ impl<'de> serde::Deserialize<'de> for PackageReference { Name, Revision, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -555,6 +570,7 @@ impl<'de> serde::Deserialize<'de> for PackageReference { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryConfigRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -568,6 +584,7 @@ impl serde::Serialize for QueryConfigRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryConfigRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -578,6 +595,7 @@ impl<'de> serde::Deserialize<'de> for QueryConfigRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -631,6 +649,7 @@ impl<'de> serde::Deserialize<'de> for QueryConfigRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryConfigResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -650,6 +669,7 @@ impl serde::Serialize for QueryConfigResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryConfigResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -662,6 +682,7 @@ impl<'de> serde::Deserialize<'de> for QueryConfigResponse { enum GeneratedField { Config, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs index 05c7bef7..a6cb36c3 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for AddressBytesToStringRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -22,6 +23,7 @@ impl serde::Serialize for AddressBytesToStringRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -34,6 +36,7 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { enum GeneratedField { AddressBytes, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -106,6 +109,7 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AddressBytesToStringResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -125,6 +129,7 @@ impl serde::Serialize for AddressBytesToStringResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -137,6 +142,7 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { enum GeneratedField { AddressString, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -206,6 +212,7 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AddressStringToBytesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -225,6 +232,7 @@ impl serde::Serialize for AddressStringToBytesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -237,6 +245,7 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { enum GeneratedField { AddressString, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -306,6 +315,7 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AddressStringToBytesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -329,6 +339,7 @@ impl serde::Serialize for AddressStringToBytesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -341,6 +352,7 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { enum GeneratedField { AddressBytes, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -413,6 +425,7 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for BaseAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -454,6 +467,7 @@ impl serde::Serialize for BaseAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for BaseAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -476,6 +490,7 @@ impl<'de> serde::Deserialize<'de> for BaseAccount { AccountNumber, Sequence, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -571,6 +586,7 @@ impl<'de> serde::Deserialize<'de> for BaseAccount { deserializer.deserialize_struct("cosmos.auth.v1beta1.BaseAccount", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Bech32PrefixRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -584,6 +600,7 @@ impl serde::Serialize for Bech32PrefixRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -594,6 +611,7 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -647,6 +665,7 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Bech32PrefixResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -666,6 +685,7 @@ impl serde::Serialize for Bech32PrefixResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -678,6 +698,7 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { enum GeneratedField { Bech32Prefix, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -747,6 +768,7 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -772,6 +794,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -785,6 +808,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Params, Accounts, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -860,6 +884,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ModuleAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -891,6 +916,7 @@ impl serde::Serialize for ModuleAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ModuleAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -905,6 +931,7 @@ impl<'de> serde::Deserialize<'de> for ModuleAccount { Name, Permissions, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -989,6 +1016,7 @@ impl<'de> serde::Deserialize<'de> for ModuleAccount { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1051,6 +1079,7 @@ impl serde::Serialize for Params { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1078,6 +1107,7 @@ impl<'de> serde::Deserialize<'de> for Params { SigVerifyCostEd25519, SigVerifyCostSecp256k1, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1203,6 +1233,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.auth.v1beta1.Params", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAccountAddressByIdRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1223,6 +1254,7 @@ impl serde::Serialize for QueryAccountAddressByIdRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1235,6 +1267,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { enum GeneratedField { Id, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1307,6 +1340,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAccountAddressByIdResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1326,6 +1360,7 @@ impl serde::Serialize for QueryAccountAddressByIdResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1338,6 +1373,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { enum GeneratedField { AccountAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1409,6 +1445,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAccountRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1428,6 +1465,7 @@ impl serde::Serialize for QueryAccountRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAccountRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1440,6 +1478,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountRequest { enum GeneratedField { Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1506,6 +1545,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAccountResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1525,6 +1565,7 @@ impl serde::Serialize for QueryAccountResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAccountResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1537,6 +1578,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountResponse { enum GeneratedField { Account, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1604,6 +1646,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAccountsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1623,6 +1666,7 @@ impl serde::Serialize for QueryAccountsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1635,6 +1679,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1704,6 +1749,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAccountsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1729,6 +1775,7 @@ impl serde::Serialize for QueryAccountsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1742,6 +1789,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { Accounts, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1820,6 +1868,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryModuleAccountByNameRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1839,6 +1888,7 @@ impl serde::Serialize for QueryModuleAccountByNameRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1851,6 +1901,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { enum GeneratedField { Name, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1920,6 +1971,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryModuleAccountByNameResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1939,6 +1991,7 @@ impl serde::Serialize for QueryModuleAccountByNameResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1951,6 +2004,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { enum GeneratedField { Account, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2018,6 +2072,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryModuleAccountsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2031,6 +2086,7 @@ impl serde::Serialize for QueryModuleAccountsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2041,6 +2097,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2097,6 +2154,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryModuleAccountsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2116,6 +2174,7 @@ impl serde::Serialize for QueryModuleAccountsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2128,6 +2187,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { enum GeneratedField { Accounts, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2197,6 +2257,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2210,6 +2271,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2220,6 +2282,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2273,6 +2336,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2292,6 +2356,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2304,6 +2369,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs index 8e69edd5..4e8bceaf 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for EventGrant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -29,6 +30,7 @@ impl serde::Serialize for EventGrant { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventGrant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -43,6 +45,7 @@ impl<'de> serde::Deserialize<'de> for EventGrant { Granter, Grantee, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -123,6 +126,7 @@ impl<'de> serde::Deserialize<'de> for EventGrant { deserializer.deserialize_struct("cosmos.authz.v1beta1.EventGrant", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventRevoke { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -154,6 +158,7 @@ impl serde::Serialize for EventRevoke { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventRevoke { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -168,6 +173,7 @@ impl<'de> serde::Deserialize<'de> for EventRevoke { Granter, Grantee, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -252,6 +258,7 @@ impl<'de> serde::Deserialize<'de> for EventRevoke { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenericAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -271,6 +278,7 @@ impl serde::Serialize for GenericAuthorization { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenericAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -283,6 +291,7 @@ impl<'de> serde::Deserialize<'de> for GenericAuthorization { enum GeneratedField { Msg, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -352,6 +361,7 @@ impl<'de> serde::Deserialize<'de> for GenericAuthorization { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -371,6 +381,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -383,6 +394,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { Authorization, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -449,6 +461,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Grant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -473,6 +486,7 @@ impl serde::Serialize for Grant { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Grant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -486,6 +500,7 @@ impl<'de> serde::Deserialize<'de> for Grant { Authorization, Expiration, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -557,6 +572,7 @@ impl<'de> serde::Deserialize<'de> for Grant { deserializer.deserialize_struct("cosmos.authz.v1beta1.Grant", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GrantAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -594,6 +610,7 @@ impl serde::Serialize for GrantAuthorization { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GrantAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -609,6 +626,7 @@ impl<'de> serde::Deserialize<'de> for GrantAuthorization { Authorization, Expiration, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -702,6 +720,7 @@ impl<'de> serde::Deserialize<'de> for GrantAuthorization { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GrantQueueItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -721,6 +740,7 @@ impl serde::Serialize for GrantQueueItem { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GrantQueueItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -733,6 +753,7 @@ impl<'de> serde::Deserialize<'de> for GrantQueueItem { enum GeneratedField { MsgTypeUrls, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -799,6 +820,7 @@ impl<'de> serde::Deserialize<'de> for GrantQueueItem { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgExec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -823,6 +845,7 @@ impl serde::Serialize for MsgExec { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgExec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -836,6 +859,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { Grantee, Msgs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -907,6 +931,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgExec", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgExecResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -933,6 +958,7 @@ impl serde::Serialize for MsgExecResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgExecResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -945,6 +971,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { enum GeneratedField { Results, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1016,6 +1043,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgGrant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1046,6 +1074,7 @@ impl serde::Serialize for MsgGrant { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgGrant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1060,6 +1089,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrant { Grantee, Grant, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1140,6 +1170,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrant { deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgGrant", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgGrantResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1153,6 +1184,7 @@ impl serde::Serialize for MsgGrantResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgGrantResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1163,6 +1195,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1216,6 +1249,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgRevoke { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1246,6 +1280,7 @@ impl serde::Serialize for MsgRevoke { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgRevoke { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1260,6 +1295,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevoke { Grantee, MsgTypeUrl, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1340,6 +1376,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevoke { deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgRevoke", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgRevokeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1353,6 +1390,7 @@ impl serde::Serialize for MsgRevokeResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgRevokeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1363,6 +1401,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1416,6 +1455,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGranteeGrantsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1441,6 +1481,7 @@ impl serde::Serialize for QueryGranteeGrantsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1454,6 +1495,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsRequest { Grantee, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1532,6 +1574,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGranteeGrantsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1557,6 +1600,7 @@ impl serde::Serialize for QueryGranteeGrantsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1570,6 +1614,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsResponse { Grants, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1648,6 +1693,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGranterGrantsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1673,6 +1719,7 @@ impl serde::Serialize for QueryGranterGrantsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGranterGrantsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1686,6 +1733,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsRequest { Granter, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1764,6 +1812,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGranterGrantsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1789,6 +1838,7 @@ impl serde::Serialize for QueryGranterGrantsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGranterGrantsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1802,6 +1852,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsResponse { Grants, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1880,6 +1931,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGrantsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1917,6 +1969,7 @@ impl serde::Serialize for QueryGrantsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1938,6 +1991,7 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { MsgTypeUrl, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2031,6 +2085,7 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGrantsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2056,6 +2111,7 @@ impl serde::Serialize for QueryGrantsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGrantsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2069,6 +2125,7 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsResponse { Grants, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs index b94ff2a1..df4c2a39 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Balance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -23,6 +24,7 @@ impl serde::Serialize for Balance { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Balance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -36,6 +38,7 @@ impl<'de> serde::Deserialize<'de> for Balance { Address, Coins, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -107,6 +110,7 @@ impl<'de> serde::Deserialize<'de> for Balance { deserializer.deserialize_struct("cosmos.bank.v1beta1.Balance", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DenomOwner { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -131,6 +135,7 @@ impl serde::Serialize for DenomOwner { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DenomOwner { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -144,6 +149,7 @@ impl<'de> serde::Deserialize<'de> for DenomOwner { Address, Balance, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -215,6 +221,7 @@ impl<'de> serde::Deserialize<'de> for DenomOwner { deserializer.deserialize_struct("cosmos.bank.v1beta1.DenomOwner", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DenomUnit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -245,6 +252,7 @@ impl serde::Serialize for DenomUnit { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DenomUnit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -259,6 +267,7 @@ impl<'de> serde::Deserialize<'de> for DenomUnit { Exponent, Aliases, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -342,6 +351,7 @@ impl<'de> serde::Deserialize<'de> for DenomUnit { deserializer.deserialize_struct("cosmos.bank.v1beta1.DenomUnit", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -379,6 +389,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -400,6 +411,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Supply, DenomMetadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -493,6 +505,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Input { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -517,6 +530,7 @@ impl serde::Serialize for Input { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Input { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -530,6 +544,7 @@ impl<'de> serde::Deserialize<'de> for Input { Address, Coins, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -601,6 +616,7 @@ impl<'de> serde::Deserialize<'de> for Input { deserializer.deserialize_struct("cosmos.bank.v1beta1.Input", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Metadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -661,6 +677,7 @@ impl serde::Serialize for Metadata { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Metadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -691,6 +708,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { Uri, UriHash, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -816,6 +834,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { deserializer.deserialize_struct("cosmos.bank.v1beta1.Metadata", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgMultiSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -841,6 +860,7 @@ impl serde::Serialize for MsgMultiSend { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgMultiSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -854,6 +874,7 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSend { Inputs, Outputs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -929,6 +950,7 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSend { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgMultiSendResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -942,6 +964,7 @@ impl serde::Serialize for MsgMultiSendResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -952,6 +975,7 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1008,6 +1032,7 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1038,6 +1063,7 @@ impl serde::Serialize for MsgSend { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1058,6 +1084,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { ToAddress, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1138,6 +1165,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgSend", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSendResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1150,6 +1178,7 @@ impl serde::Serialize for MsgSendResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSendResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1160,6 +1189,7 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1213,6 +1243,7 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Output { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1237,6 +1268,7 @@ impl serde::Serialize for Output { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Output { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1250,6 +1282,7 @@ impl<'de> serde::Deserialize<'de> for Output { Address, Coins, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1321,6 +1354,7 @@ impl<'de> serde::Deserialize<'de> for Output { deserializer.deserialize_struct("cosmos.bank.v1beta1.Output", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1345,6 +1379,7 @@ impl serde::Serialize for Params { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1363,6 +1398,7 @@ impl<'de> serde::Deserialize<'de> for Params { SendEnabled, DefaultSendEnabled, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1438,6 +1474,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.bank.v1beta1.Params", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllBalancesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1463,6 +1500,7 @@ impl serde::Serialize for QueryAllBalancesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1476,6 +1514,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { Address, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1554,6 +1593,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllBalancesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1579,6 +1619,7 @@ impl serde::Serialize for QueryAllBalancesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1592,6 +1633,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { Balances, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1670,6 +1712,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryBalanceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1695,6 +1738,7 @@ impl serde::Serialize for QueryBalanceRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1708,6 +1752,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { Address, Denom, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1783,6 +1828,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryBalanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1802,6 +1848,7 @@ impl serde::Serialize for QueryBalanceResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1814,6 +1861,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { enum GeneratedField { Balance, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1881,6 +1929,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDenomMetadataRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1900,6 +1949,7 @@ impl serde::Serialize for QueryDenomMetadataRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1912,6 +1962,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { enum GeneratedField { Denom, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1981,6 +2032,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDenomMetadataResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2000,6 +2052,7 @@ impl serde::Serialize for QueryDenomMetadataResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2012,6 +2065,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { enum GeneratedField { Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2081,6 +2135,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDenomOwnersRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2106,6 +2161,7 @@ impl serde::Serialize for QueryDenomOwnersRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2119,6 +2175,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { Denom, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2197,6 +2254,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDenomOwnersResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2222,6 +2280,7 @@ impl serde::Serialize for QueryDenomOwnersResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2235,6 +2294,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { DenomOwners, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2313,6 +2373,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDenomsMetadataRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2332,6 +2393,7 @@ impl serde::Serialize for QueryDenomsMetadataRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2344,6 +2406,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2413,6 +2476,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDenomsMetadataResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2438,6 +2502,7 @@ impl serde::Serialize for QueryDenomsMetadataResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2451,6 +2516,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { Metadatas, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2529,6 +2595,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2542,6 +2609,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2552,6 +2620,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2605,6 +2674,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2624,6 +2694,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2636,6 +2707,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2700,6 +2772,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySpendableBalancesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2725,6 +2798,7 @@ impl serde::Serialize for QuerySpendableBalancesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2738,6 +2812,7 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { Address, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2816,6 +2891,7 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySpendableBalancesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2841,6 +2917,7 @@ impl serde::Serialize for QuerySpendableBalancesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2854,6 +2931,7 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { Balances, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2932,6 +3010,7 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySupplyOfRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2951,6 +3030,7 @@ impl serde::Serialize for QuerySupplyOfRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2963,6 +3043,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { enum GeneratedField { Denom, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3032,6 +3113,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySupplyOfResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3051,6 +3133,7 @@ impl serde::Serialize for QuerySupplyOfResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3063,6 +3146,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { enum GeneratedField { Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3130,6 +3214,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryTotalSupplyRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3149,6 +3234,7 @@ impl serde::Serialize for QueryTotalSupplyRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3161,6 +3247,7 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3230,6 +3317,7 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryTotalSupplyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3255,6 +3343,7 @@ impl serde::Serialize for QueryTotalSupplyResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3268,6 +3357,7 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { Supply, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3346,6 +3436,7 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SendAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3365,6 +3456,7 @@ impl serde::Serialize for SendAuthorization { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SendAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3377,6 +3469,7 @@ impl<'de> serde::Deserialize<'de> for SendAuthorization { enum GeneratedField { SpendLimit, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3443,6 +3536,7 @@ impl<'de> serde::Deserialize<'de> for SendAuthorization { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SendEnabled { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3467,6 +3561,7 @@ impl serde::Serialize for SendEnabled { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SendEnabled { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3480,6 +3575,7 @@ impl<'de> serde::Deserialize<'de> for SendEnabled { Denom, Enabled, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3551,6 +3647,7 @@ impl<'de> serde::Deserialize<'de> for SendEnabled { deserializer.deserialize_struct("cosmos.bank.v1beta1.SendEnabled", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Supply { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3569,6 +3666,7 @@ impl serde::Serialize for Supply { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Supply { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3581,6 +3679,7 @@ impl<'de> serde::Deserialize<'de> for Supply { enum GeneratedField { Total, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs index 564486fd..adc0f5fd 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for AbciMessageLog { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -30,6 +31,7 @@ impl serde::Serialize for AbciMessageLog { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AbciMessageLog { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -44,6 +46,7 @@ impl<'de> serde::Deserialize<'de> for AbciMessageLog { Log, Events, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -131,6 +134,7 @@ impl<'de> serde::Deserialize<'de> for AbciMessageLog { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Attribute { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -156,6 +160,7 @@ impl serde::Serialize for Attribute { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Attribute { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -169,6 +174,7 @@ impl<'de> serde::Deserialize<'de> for Attribute { Key, Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -244,6 +250,7 @@ impl<'de> serde::Deserialize<'de> for Attribute { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GasInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -272,6 +279,7 @@ impl serde::Serialize for GasInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GasInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -285,6 +293,7 @@ impl<'de> serde::Deserialize<'de> for GasInfo { GasWanted, GasUsed, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -366,6 +375,7 @@ impl<'de> serde::Deserialize<'de> for GasInfo { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgData { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -393,6 +403,7 @@ impl serde::Serialize for MsgData { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgData { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -406,6 +417,7 @@ impl<'de> serde::Deserialize<'de> for MsgData { MsgType, Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -484,6 +496,7 @@ impl<'de> serde::Deserialize<'de> for MsgData { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Result { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -522,6 +535,7 @@ impl serde::Serialize for Result { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Result { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -537,6 +551,7 @@ impl<'de> serde::Deserialize<'de> for Result { Events, MsgResponses, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -629,6 +644,7 @@ impl<'de> serde::Deserialize<'de> for Result { deserializer.deserialize_struct("cosmos.base.abci.v1beta1.Result", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SearchTxsResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -690,6 +706,7 @@ impl serde::Serialize for SearchTxsResult { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SearchTxsResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -717,6 +734,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { Limit, Txs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -843,6 +861,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SimulationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -868,6 +887,7 @@ impl serde::Serialize for SimulationResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SimulationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -881,6 +901,7 @@ impl<'de> serde::Deserialize<'de> for SimulationResponse { GasInfo, Result, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -956,6 +977,7 @@ impl<'de> serde::Deserialize<'de> for SimulationResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for StringEvent { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -981,6 +1003,7 @@ impl serde::Serialize for StringEvent { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for StringEvent { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -994,6 +1017,7 @@ impl<'de> serde::Deserialize<'de> for StringEvent { Type, Attributes, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1069,6 +1093,7 @@ impl<'de> serde::Deserialize<'de> for StringEvent { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TxMsgData { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1094,6 +1119,7 @@ impl serde::Serialize for TxMsgData { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TxMsgData { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1107,6 +1133,7 @@ impl<'de> serde::Deserialize<'de> for TxMsgData { Data, MsgResponses, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1182,6 +1209,7 @@ impl<'de> serde::Deserialize<'de> for TxMsgData { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TxResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1277,6 +1305,7 @@ impl serde::Serialize for TxResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TxResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1318,6 +1347,7 @@ impl<'de> serde::Deserialize<'de> for TxResponse { Timestamp, Events, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs index eeed8c9c..83ff2e50 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Pair { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -29,6 +30,7 @@ impl serde::Serialize for Pair { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Pair { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -42,6 +44,7 @@ impl<'de> serde::Deserialize<'de> for Pair { Key, Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -119,6 +122,7 @@ impl<'de> serde::Deserialize<'de> for Pair { deserializer.deserialize_struct("cosmos.base.kv.v1beta1.Pair", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Pairs { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -137,6 +141,7 @@ impl serde::Serialize for Pairs { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Pairs { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -149,6 +154,7 @@ impl<'de> serde::Deserialize<'de> for Pairs { enum GeneratedField { Pairs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs index 54ab64bb..b36e4abc 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for ConfigRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -12,6 +13,7 @@ impl serde::Serialize for ConfigRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ConfigRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -22,6 +24,7 @@ impl<'de> serde::Deserialize<'de> for ConfigRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -75,6 +78,7 @@ impl<'de> serde::Deserialize<'de> for ConfigRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ConfigResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -94,6 +98,7 @@ impl serde::Serialize for ConfigResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ConfigResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -106,6 +111,7 @@ impl<'de> serde::Deserialize<'de> for ConfigResponse { enum GeneratedField { MinimumGasPrice, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs index a0a7ca8d..650edac4 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for PageRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -46,6 +47,7 @@ impl serde::Serialize for PageRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PageRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -69,6 +71,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { CountTotal, Reverse, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -180,6 +183,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PageResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -210,6 +214,7 @@ impl serde::Serialize for PageResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PageResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -223,6 +228,7 @@ impl<'de> serde::Deserialize<'de> for PageResponse { NextKey, Total, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs index f58bcae2..1c5447df 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for ListAllInterfacesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -14,6 +15,7 @@ impl serde::Serialize for ListAllInterfacesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -24,6 +26,7 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -81,6 +84,7 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ListAllInterfacesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -102,6 +106,7 @@ impl serde::Serialize for ListAllInterfacesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -114,6 +119,7 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { enum GeneratedField { InterfaceNames, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -186,6 +192,7 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ListImplementationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -207,6 +214,7 @@ impl serde::Serialize for ListImplementationsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -219,6 +227,7 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { enum GeneratedField { InterfaceName, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -289,6 +298,7 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ListImplementationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -313,6 +323,7 @@ impl serde::Serialize for ListImplementationsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ListImplementationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -325,6 +336,7 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsResponse { enum GeneratedField { ImplementationMessageNames, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs index 56c02fcb..c0422442 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for AppDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -48,6 +49,7 @@ impl serde::Serialize for AppDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AppDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -73,6 +75,7 @@ impl<'de> serde::Deserialize<'de> for AppDescriptor { QueryServices, Tx, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -184,6 +187,7 @@ impl<'de> serde::Deserialize<'de> for AppDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AuthnDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -203,6 +207,7 @@ impl serde::Serialize for AuthnDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AuthnDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -215,6 +220,7 @@ impl<'de> serde::Deserialize<'de> for AuthnDescriptor { enum GeneratedField { SignModes, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -281,6 +287,7 @@ impl<'de> serde::Deserialize<'de> for AuthnDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ChainDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -300,6 +307,7 @@ impl serde::Serialize for ChainDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ChainDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -312,6 +320,7 @@ impl<'de> serde::Deserialize<'de> for ChainDescriptor { enum GeneratedField { Id, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -378,6 +387,7 @@ impl<'de> serde::Deserialize<'de> for ChainDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for CodecDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -397,6 +407,7 @@ impl serde::Serialize for CodecDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CodecDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -409,6 +420,7 @@ impl<'de> serde::Deserialize<'de> for CodecDescriptor { enum GeneratedField { Interfaces, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -475,6 +487,7 @@ impl<'de> serde::Deserialize<'de> for CodecDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ConfigurationDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -499,6 +512,7 @@ impl serde::Serialize for ConfigurationDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -514,6 +528,7 @@ impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { enum GeneratedField { Bech32AccountAddressPrefix, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -589,6 +604,7 @@ impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetAuthnDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -604,6 +620,7 @@ impl serde::Serialize for GetAuthnDescriptorRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -614,6 +631,7 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -671,6 +689,7 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetAuthnDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -692,6 +711,7 @@ impl serde::Serialize for GetAuthnDescriptorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -704,6 +724,7 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { enum GeneratedField { Authn, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -772,6 +793,7 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetChainDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -787,6 +809,7 @@ impl serde::Serialize for GetChainDescriptorRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -797,6 +820,7 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -854,6 +878,7 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetChainDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -875,6 +900,7 @@ impl serde::Serialize for GetChainDescriptorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -887,6 +913,7 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { enum GeneratedField { Chain, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -955,6 +982,7 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetCodecDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -970,6 +998,7 @@ impl serde::Serialize for GetCodecDescriptorRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -980,6 +1009,7 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1037,6 +1067,7 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetCodecDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1058,6 +1089,7 @@ impl serde::Serialize for GetCodecDescriptorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1070,6 +1102,7 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { enum GeneratedField { Codec, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1138,6 +1171,7 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetConfigurationDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1153,6 +1187,7 @@ impl serde::Serialize for GetConfigurationDescriptorRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1163,6 +1198,7 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1221,6 +1257,7 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetConfigurationDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1242,6 +1279,7 @@ impl serde::Serialize for GetConfigurationDescriptorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1254,6 +1292,7 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { enum GeneratedField { Config, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1323,6 +1362,7 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetQueryServicesDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1338,6 +1378,7 @@ impl serde::Serialize for GetQueryServicesDescriptorRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1348,6 +1389,7 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1406,6 +1448,7 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetQueryServicesDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1427,6 +1470,7 @@ impl serde::Serialize for GetQueryServicesDescriptorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1439,6 +1483,7 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { enum GeneratedField { Queries, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1508,6 +1553,7 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetTxDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1523,6 +1569,7 @@ impl serde::Serialize for GetTxDescriptorRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1533,6 +1580,7 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1589,6 +1637,7 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetTxDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1610,6 +1659,7 @@ impl serde::Serialize for GetTxDescriptorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1622,6 +1672,7 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { enum GeneratedField { Tx, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1690,6 +1741,7 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for InterfaceAcceptingMessageDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1717,6 +1769,7 @@ impl serde::Serialize for InterfaceAcceptingMessageDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1730,6 +1783,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { Fullname, FieldDescriptorNames, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1814,6 +1868,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for InterfaceDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1848,6 +1903,7 @@ impl serde::Serialize for InterfaceDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1868,6 +1924,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { InterfaceAcceptingMessages, InterfaceImplementers, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1961,6 +2018,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for InterfaceImplementerDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1988,6 +2046,7 @@ impl serde::Serialize for InterfaceImplementerDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2001,6 +2060,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { Fullname, TypeUrl, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2081,6 +2141,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2100,6 +2161,7 @@ impl serde::Serialize for MsgDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2112,6 +2174,7 @@ impl<'de> serde::Deserialize<'de> for MsgDescriptor { enum GeneratedField { MsgTypeUrl, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2178,6 +2241,7 @@ impl<'de> serde::Deserialize<'de> for MsgDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryMethodDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2203,6 +2267,7 @@ impl serde::Serialize for QueryMethodDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2216,6 +2281,7 @@ impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { Name, FullQueryPath, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2296,6 +2362,7 @@ impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryServiceDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2329,6 +2396,7 @@ impl serde::Serialize for QueryServiceDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2343,6 +2411,7 @@ impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { IsModule, Methods, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2430,6 +2499,7 @@ impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryServicesDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2451,6 +2521,7 @@ impl serde::Serialize for QueryServicesDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2463,6 +2534,7 @@ impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { enum GeneratedField { QueryServices, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2533,6 +2605,7 @@ impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SigningModeDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2567,6 +2640,7 @@ impl serde::Serialize for SigningModeDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2586,6 +2660,7 @@ impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { Number, AuthnInfoProviderMethodFullname, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2682,6 +2757,7 @@ impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TxDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2707,6 +2783,7 @@ impl serde::Serialize for TxDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TxDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2720,6 +2797,7 @@ impl<'de> serde::Deserialize<'de> for TxDescriptor { Fullname, Msgs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs index e0fdf274..17b3932d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Metadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,6 +26,7 @@ impl serde::Serialize for Metadata { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Metadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { enum GeneratedField { ChunkHashes, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -108,6 +111,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Snapshot { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -154,6 +158,7 @@ impl serde::Serialize for Snapshot { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Snapshot { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -170,6 +175,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { Hash, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -284,6 +290,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SnapshotExtensionMeta { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -309,6 +316,7 @@ impl serde::Serialize for SnapshotExtensionMeta { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -322,6 +330,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { Name, Format, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -403,6 +412,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SnapshotExtensionPayload { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -428,6 +438,7 @@ impl serde::Serialize for SnapshotExtensionPayload { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -440,6 +451,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { enum GeneratedField { Payload, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -512,6 +524,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SnapshotIavlItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -556,6 +569,7 @@ impl serde::Serialize for SnapshotIavlItem { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -571,6 +585,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { Version, Height, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -676,6 +691,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SnapshotItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -714,6 +730,7 @@ impl serde::Serialize for SnapshotItem { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SnapshotItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -739,6 +756,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { Kv, Schema, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -852,6 +870,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SnapshotKvItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -883,6 +902,7 @@ impl serde::Serialize for SnapshotKvItem { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SnapshotKvItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -896,6 +916,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotKvItem { Key, Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -977,6 +998,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotKvItem { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SnapshotSchema { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1003,6 +1025,7 @@ impl serde::Serialize for SnapshotSchema { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SnapshotSchema { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1015,6 +1038,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotSchema { enum GeneratedField { Keys, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1086,6 +1110,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotSchema { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SnapshotStoreItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1105,6 +1130,7 @@ impl serde::Serialize for SnapshotStoreItem { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SnapshotStoreItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1117,6 +1143,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotStoreItem { enum GeneratedField { Name, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs index e3f007fb..26441973 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for BlockMetadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -48,6 +49,7 @@ impl serde::Serialize for BlockMetadata { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for BlockMetadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -78,6 +80,7 @@ impl<'de> serde::Deserialize<'de> for BlockMetadata { ResponseEndBlock, ResponseCommit, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -201,6 +204,7 @@ impl<'de> serde::Deserialize<'de> for BlockMetadata { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for block_metadata::DeliverTx { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -226,6 +230,7 @@ impl serde::Serialize for block_metadata::DeliverTx { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -239,6 +244,7 @@ impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { Request, Response, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -317,6 +323,7 @@ impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for CommitId { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -345,6 +352,7 @@ impl serde::Serialize for CommitId { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CommitId { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -358,6 +366,7 @@ impl<'de> serde::Deserialize<'de> for CommitId { Version, Hash, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -439,6 +448,7 @@ impl<'de> serde::Deserialize<'de> for CommitId { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for CommitInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -465,6 +475,7 @@ impl serde::Serialize for CommitInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CommitInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -478,6 +489,7 @@ impl<'de> serde::Deserialize<'de> for CommitInfo { Version, StoreInfos, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -556,6 +568,7 @@ impl<'de> serde::Deserialize<'de> for CommitInfo { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for StoreInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -581,6 +594,7 @@ impl serde::Serialize for StoreInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for StoreInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -594,6 +608,7 @@ impl<'de> serde::Deserialize<'de> for StoreInfo { Name, CommitId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -669,6 +684,7 @@ impl<'de> serde::Deserialize<'de> for StoreInfo { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for StoreKvPair { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -712,6 +728,7 @@ impl serde::Serialize for StoreKvPair { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for StoreKvPair { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -727,6 +744,7 @@ impl<'de> serde::Deserialize<'de> for StoreKvPair { Key, Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs index 8e2e11a7..469e7630 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for AbciQueryRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -39,6 +40,7 @@ impl serde::Serialize for AbciQueryRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AbciQueryRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -54,6 +56,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryRequest { Height, Prove, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -153,6 +156,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AbciQueryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -228,6 +232,7 @@ impl serde::Serialize for AbciQueryResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AbciQueryResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -259,6 +264,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { Height, Codespace, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -412,6 +418,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Block { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -449,6 +456,7 @@ impl serde::Serialize for Block { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Block { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -464,6 +472,7 @@ impl<'de> serde::Deserialize<'de> for Block { Evidence, LastCommit, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -557,6 +566,7 @@ impl<'de> serde::Deserialize<'de> for Block { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetBlockByHeightRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -579,6 +589,7 @@ impl serde::Serialize for GetBlockByHeightRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetBlockByHeightRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -591,6 +602,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightRequest { enum GeneratedField { Height, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -663,6 +675,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetBlockByHeightResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -696,6 +709,7 @@ impl serde::Serialize for GetBlockByHeightResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -710,6 +724,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { Block, SdkBlock, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -798,6 +813,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetLatestBlockRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -811,6 +827,7 @@ impl serde::Serialize for GetLatestBlockRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetLatestBlockRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -821,6 +838,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -877,6 +895,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetLatestBlockResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -908,6 +927,7 @@ impl serde::Serialize for GetLatestBlockResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -922,6 +942,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { Block, SdkBlock, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1009,6 +1030,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetLatestValidatorSetRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1030,6 +1052,7 @@ impl serde::Serialize for GetLatestValidatorSetRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1042,6 +1065,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1112,6 +1136,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetLatestValidatorSetResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1149,6 +1174,7 @@ impl serde::Serialize for GetLatestValidatorSetResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1163,6 +1189,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { Validators, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1255,6 +1282,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetNodeInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1268,6 +1296,7 @@ impl serde::Serialize for GetNodeInfoRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1278,6 +1307,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1331,6 +1361,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetNodeInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1356,6 +1387,7 @@ impl serde::Serialize for GetNodeInfoResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1374,6 +1406,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { DefaultNodeInfo, ApplicationVersion, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1455,6 +1488,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetSyncingRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1468,6 +1502,7 @@ impl serde::Serialize for GetSyncingRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetSyncingRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1478,6 +1513,7 @@ impl<'de> serde::Deserialize<'de> for GetSyncingRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1531,6 +1567,7 @@ impl<'de> serde::Deserialize<'de> for GetSyncingRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetSyncingResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1550,6 +1587,7 @@ impl serde::Serialize for GetSyncingResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetSyncingResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1562,6 +1600,7 @@ impl<'de> serde::Deserialize<'de> for GetSyncingResponse { enum GeneratedField { Syncing, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1628,6 +1667,7 @@ impl<'de> serde::Deserialize<'de> for GetSyncingResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetValidatorSetByHeightRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1656,6 +1696,7 @@ impl serde::Serialize for GetValidatorSetByHeightRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1669,6 +1710,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { Height, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1752,6 +1794,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetValidatorSetByHeightResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1789,6 +1832,7 @@ impl serde::Serialize for GetValidatorSetByHeightResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1803,6 +1847,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { Validators, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1895,6 +1940,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Header { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2025,6 +2071,7 @@ impl serde::Serialize for Header { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Header { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2076,6 +2123,7 @@ impl<'de> serde::Deserialize<'de> for Header { EvidenceHash, ProposerAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2298,6 +2346,7 @@ impl<'de> serde::Deserialize<'de> for Header { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Module { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2329,6 +2378,7 @@ impl serde::Serialize for Module { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Module { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2343,6 +2393,7 @@ impl<'de> serde::Deserialize<'de> for Module { Version, Sum, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2427,6 +2478,7 @@ impl<'de> serde::Deserialize<'de> for Module { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ProofOp { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2462,6 +2514,7 @@ impl serde::Serialize for ProofOp { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ProofOp { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2476,6 +2529,7 @@ impl<'de> serde::Deserialize<'de> for ProofOp { Key, Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2566,6 +2620,7 @@ impl<'de> serde::Deserialize<'de> for ProofOp { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ProofOps { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2585,6 +2640,7 @@ impl serde::Serialize for ProofOps { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ProofOps { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2597,6 +2653,7 @@ impl<'de> serde::Deserialize<'de> for ProofOps { enum GeneratedField { Ops, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2663,6 +2720,7 @@ impl<'de> serde::Deserialize<'de> for ProofOps { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Validator { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2708,6 +2766,7 @@ impl serde::Serialize for Validator { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Validator { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2731,6 +2790,7 @@ impl<'de> serde::Deserialize<'de> for Validator { VotingPower, ProposerPriority, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2832,6 +2892,7 @@ impl<'de> serde::Deserialize<'de> for Validator { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for VersionInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2893,6 +2954,7 @@ impl serde::Serialize for VersionInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for VersionInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2927,6 +2989,7 @@ impl<'de> serde::Deserialize<'de> for VersionInfo { BuildDeps, CosmosSdkVersion, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs index a9daa350..63cadeef 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Coin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -23,6 +24,7 @@ impl serde::Serialize for Coin { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Coin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -36,6 +38,7 @@ impl<'de> serde::Deserialize<'de> for Coin { Denom, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -107,6 +110,7 @@ impl<'de> serde::Deserialize<'de> for Coin { deserializer.deserialize_struct("cosmos.base.v1beta1.Coin", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DecCoin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -131,6 +135,7 @@ impl serde::Serialize for DecCoin { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DecCoin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -144,6 +149,7 @@ impl<'de> serde::Deserialize<'de> for DecCoin { Denom, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -215,6 +221,7 @@ impl<'de> serde::Deserialize<'de> for DecCoin { deserializer.deserialize_struct("cosmos.base.v1beta1.DecCoin", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DecProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -233,6 +240,7 @@ impl serde::Serialize for DecProto { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DecProto { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -245,6 +253,7 @@ impl<'de> serde::Deserialize<'de> for DecProto { enum GeneratedField { Dec, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -307,6 +316,7 @@ impl<'de> serde::Deserialize<'de> for DecProto { deserializer.deserialize_struct("cosmos.base.v1beta1.DecProto", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for IntProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -325,6 +335,7 @@ impl serde::Serialize for IntProto { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for IntProto { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -337,6 +348,7 @@ impl<'de> serde::Deserialize<'de> for IntProto { enum GeneratedField { Int, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs index 6fb7b000..8622d118 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Capability { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -19,6 +20,7 @@ impl serde::Serialize for Capability { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Capability { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -31,6 +33,7 @@ impl<'de> serde::Deserialize<'de> for Capability { enum GeneratedField { Index, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -100,6 +103,7 @@ impl<'de> serde::Deserialize<'de> for Capability { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for CapabilityOwners { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -119,6 +123,7 @@ impl serde::Serialize for CapabilityOwners { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CapabilityOwners { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -131,6 +136,7 @@ impl<'de> serde::Deserialize<'de> for CapabilityOwners { enum GeneratedField { Owners, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -197,6 +203,7 @@ impl<'de> serde::Deserialize<'de> for CapabilityOwners { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisOwners { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -223,6 +230,7 @@ impl serde::Serialize for GenesisOwners { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisOwners { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -236,6 +244,7 @@ impl<'de> serde::Deserialize<'de> for GenesisOwners { Index, IndexOwners, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -314,6 +323,7 @@ impl<'de> serde::Deserialize<'de> for GenesisOwners { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -340,6 +350,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -353,6 +364,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Index, Owners, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -431,6 +443,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Owner { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -455,6 +468,7 @@ impl serde::Serialize for Owner { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Owner { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -468,6 +482,7 @@ impl<'de> serde::Deserialize<'de> for Owner { Module, Name, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs index 2dcb6741..26d073e8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -18,6 +19,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -30,6 +32,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { ConstantFee, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -96,6 +99,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVerifyInvariant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -127,6 +131,7 @@ impl serde::Serialize for MsgVerifyInvariant { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -147,6 +152,7 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { InvariantModuleName, InvariantRoute, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -237,6 +243,7 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVerifyInvariantResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -250,6 +257,7 @@ impl serde::Serialize for MsgVerifyInvariantResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVerifyInvariantResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -260,6 +268,7 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariantResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs index 9b2f6a41..6279b7b2 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for PrivKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -19,6 +20,7 @@ impl serde::Serialize for PrivKey { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PrivKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -31,6 +33,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { enum GeneratedField { Key, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -96,6 +99,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { deserializer.deserialize_struct("cosmos.crypto.ed25519.PrivKey", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PubKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -116,6 +120,7 @@ impl serde::Serialize for PubKey { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PubKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -128,6 +133,7 @@ impl<'de> serde::Deserialize<'de> for PubKey { enum GeneratedField { Key, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs index bbc76ca9..9f1b9f16 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Bip44Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -41,6 +42,7 @@ impl serde::Serialize for Bip44Params { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Bip44Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -65,6 +67,7 @@ impl<'de> serde::Deserialize<'de> for Bip44Params { Change, AddressIndex, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs index ecd57986..ed4b0c21 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Record { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -42,6 +43,7 @@ impl serde::Serialize for Record { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Record { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -61,6 +63,7 @@ impl<'de> serde::Deserialize<'de> for Record { Multi, Offline, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -170,6 +173,7 @@ impl<'de> serde::Deserialize<'de> for Record { deserializer.deserialize_struct("cosmos.crypto.keyring.v1.Record", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for record::Ledger { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -189,6 +193,7 @@ impl serde::Serialize for record::Ledger { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for record::Ledger { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -201,6 +206,7 @@ impl<'de> serde::Deserialize<'de> for record::Ledger { enum GeneratedField { Path, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -265,6 +271,7 @@ impl<'de> serde::Deserialize<'de> for record::Ledger { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for record::Local { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -284,6 +291,7 @@ impl serde::Serialize for record::Local { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for record::Local { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -296,6 +304,7 @@ impl<'de> serde::Deserialize<'de> for record::Local { enum GeneratedField { PrivKey, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -362,6 +371,7 @@ impl<'de> serde::Deserialize<'de> for record::Local { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for record::Multi { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -375,6 +385,7 @@ impl serde::Serialize for record::Multi { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for record::Multi { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -385,6 +396,7 @@ impl<'de> serde::Deserialize<'de> for record::Multi { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -438,6 +450,7 @@ impl<'de> serde::Deserialize<'de> for record::Multi { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for record::Offline { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -451,6 +464,7 @@ impl serde::Serialize for record::Offline { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for record::Offline { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -461,6 +475,7 @@ impl<'de> serde::Deserialize<'de> for record::Offline { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs index 11ffd34c..aa86f829 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for LegacyAminoPubKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,6 +25,7 @@ impl serde::Serialize for LegacyAminoPubKey { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for LegacyAminoPubKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for LegacyAminoPubKey { Threshold, PublicKeys, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs index 99814e8c..88819ebb 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for CompactBitArray { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -28,6 +29,7 @@ impl serde::Serialize for CompactBitArray { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CompactBitArray { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -41,6 +43,7 @@ impl<'de> serde::Deserialize<'de> for CompactBitArray { ExtraBitsStored, Elems, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -124,6 +127,7 @@ impl<'de> serde::Deserialize<'de> for CompactBitArray { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MultiSignature { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -150,6 +154,7 @@ impl serde::Serialize for MultiSignature { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MultiSignature { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -162,6 +167,7 @@ impl<'de> serde::Deserialize<'de> for MultiSignature { enum GeneratedField { Signatures, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs index db1140f5..61b7f0c6 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for PrivKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -19,6 +20,7 @@ impl serde::Serialize for PrivKey { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PrivKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -31,6 +33,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { enum GeneratedField { Key, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -96,6 +99,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { deserializer.deserialize_struct("cosmos.crypto.secp256k1.PrivKey", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PubKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -116,6 +120,7 @@ impl serde::Serialize for PubKey { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PubKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -128,6 +133,7 @@ impl<'de> serde::Deserialize<'de> for PubKey { enum GeneratedField { Key, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs index 6ff278d8..18b36eda 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for PrivKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -21,6 +22,7 @@ impl serde::Serialize for PrivKey { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PrivKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -33,6 +35,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { enum GeneratedField { Secret, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -98,6 +101,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { deserializer.deserialize_struct("cosmos.crypto.secp256r1.PrivKey", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PubKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -118,6 +122,7 @@ impl serde::Serialize for PubKey { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PubKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -130,6 +135,7 @@ impl<'de> serde::Deserialize<'de> for PubKey { enum GeneratedField { Key, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs index f440c919..251f905d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for CommunityPoolSpendProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -38,6 +39,7 @@ impl serde::Serialize for CommunityPoolSpendProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -53,6 +55,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { Recipient, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -149,6 +152,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for CommunityPoolSpendProposalWithDeposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -194,6 +198,7 @@ impl serde::Serialize for CommunityPoolSpendProposalWithDeposit { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -210,6 +215,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { Amount, Deposit, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -317,6 +323,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DelegationDelegatorReward { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -342,6 +349,7 @@ impl serde::Serialize for DelegationDelegatorReward { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DelegationDelegatorReward { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -355,6 +363,7 @@ impl<'de> serde::Deserialize<'de> for DelegationDelegatorReward { ValidatorAddress, Reward, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -435,6 +444,7 @@ impl<'de> serde::Deserialize<'de> for DelegationDelegatorReward { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DelegatorStartingInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -471,6 +481,7 @@ impl serde::Serialize for DelegatorStartingInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -485,6 +496,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { Stake, Height, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -580,6 +592,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DelegatorStartingInfoRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -613,6 +626,7 @@ impl serde::Serialize for DelegatorStartingInfoRecord { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -634,6 +648,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { ValidatorAddress, StartingInfo, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -726,6 +741,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DelegatorWithdrawInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -751,6 +767,7 @@ impl serde::Serialize for DelegatorWithdrawInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DelegatorWithdrawInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -769,6 +786,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorWithdrawInfo { DelegatorAddress, WithdrawAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -851,6 +869,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorWithdrawInfo { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for FeePool { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -870,6 +889,7 @@ impl serde::Serialize for FeePool { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for FeePool { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -882,6 +902,7 @@ impl<'de> serde::Deserialize<'de> for FeePool { enum GeneratedField { CommunityPool, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -948,6 +969,7 @@ impl<'de> serde::Deserialize<'de> for FeePool { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1028,6 +1050,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1069,6 +1092,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { DelegatorStartingInfos, ValidatorSlashEvents, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1249,6 +1273,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgFundCommunityPool { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1274,6 +1299,7 @@ impl serde::Serialize for MsgFundCommunityPool { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgFundCommunityPool { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1287,6 +1313,7 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPool { Amount, Depositor, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1365,6 +1392,7 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPool { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgFundCommunityPoolResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1380,6 +1408,7 @@ impl serde::Serialize for MsgFundCommunityPoolResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgFundCommunityPoolResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1390,6 +1419,7 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPoolResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1447,6 +1477,7 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPoolResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSetWithdrawAddress { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1472,6 +1503,7 @@ impl serde::Serialize for MsgSetWithdrawAddress { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddress { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1490,6 +1522,7 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddress { DelegatorAddress, WithdrawAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1572,6 +1605,7 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddress { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSetWithdrawAddressResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1587,6 +1621,7 @@ impl serde::Serialize for MsgSetWithdrawAddressResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddressResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1597,6 +1632,7 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddressResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1654,6 +1690,7 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddressResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgWithdrawDelegatorReward { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1681,6 +1718,7 @@ impl serde::Serialize for MsgWithdrawDelegatorReward { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorReward { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1699,6 +1737,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorReward { DelegatorAddress, ValidatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1781,6 +1820,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorReward { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgWithdrawDelegatorRewardResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1802,6 +1842,7 @@ impl serde::Serialize for MsgWithdrawDelegatorRewardResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorRewardResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1814,6 +1855,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorRewardResponse { enum GeneratedField { Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1885,6 +1927,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorRewardResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgWithdrawValidatorCommission { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1906,6 +1949,7 @@ impl serde::Serialize for MsgWithdrawValidatorCommission { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommission { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1918,6 +1962,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommission { enum GeneratedField { ValidatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1990,6 +2035,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommission { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgWithdrawValidatorCommissionResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2011,6 +2057,7 @@ impl serde::Serialize for MsgWithdrawValidatorCommissionResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommissionResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2023,6 +2070,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommissionResponse { enum GeneratedField { Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2094,6 +2142,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommissionResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2131,6 +2180,7 @@ impl serde::Serialize for Params { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2155,6 +2205,7 @@ impl<'de> serde::Deserialize<'de> for Params { BonusProposerReward, WithdrawAddrEnabled, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2260,6 +2311,7 @@ impl<'de> serde::Deserialize<'de> for Params { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryCommunityPoolRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2273,6 +2325,7 @@ impl serde::Serialize for QueryCommunityPoolRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryCommunityPoolRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2283,6 +2336,7 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2339,6 +2393,7 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryCommunityPoolResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2360,6 +2415,7 @@ impl serde::Serialize for QueryCommunityPoolResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryCommunityPoolResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2372,6 +2428,7 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolResponse { enum GeneratedField { Pool, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2441,6 +2498,7 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegationRewardsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2468,6 +2526,7 @@ impl serde::Serialize for QueryDelegationRewardsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2486,6 +2545,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsRequest { DelegatorAddress, ValidatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2569,6 +2629,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegationRewardsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2590,6 +2651,7 @@ impl serde::Serialize for QueryDelegationRewardsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2602,6 +2664,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsResponse { enum GeneratedField { Rewards, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2672,6 +2735,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegationTotalRewardsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2693,6 +2757,7 @@ impl serde::Serialize for QueryDelegationTotalRewardsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2705,6 +2770,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsRequest { enum GeneratedField { DelegatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2778,6 +2844,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegationTotalRewardsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2805,6 +2872,7 @@ impl serde::Serialize for QueryDelegationTotalRewardsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2818,6 +2886,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsResponse { Rewards, Total, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2898,6 +2967,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorValidatorsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2919,6 +2989,7 @@ impl serde::Serialize for QueryDelegatorValidatorsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2931,6 +3002,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { enum GeneratedField { DelegatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3003,6 +3075,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorValidatorsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3024,6 +3097,7 @@ impl serde::Serialize for QueryDelegatorValidatorsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3036,6 +3110,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { enum GeneratedField { Validators, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3107,6 +3182,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorWithdrawAddressRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3128,6 +3204,7 @@ impl serde::Serialize for QueryDelegatorWithdrawAddressRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3140,6 +3217,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressRequest { enum GeneratedField { DelegatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3213,6 +3291,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorWithdrawAddressResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3234,6 +3313,7 @@ impl serde::Serialize for QueryDelegatorWithdrawAddressResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3246,6 +3326,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressResponse { enum GeneratedField { WithdrawAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3319,6 +3400,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3332,6 +3414,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3342,6 +3425,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3395,6 +3479,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3414,6 +3499,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3426,6 +3512,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3490,6 +3577,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorCommissionRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3511,6 +3599,7 @@ impl serde::Serialize for QueryValidatorCommissionRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3523,6 +3612,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionRequest { enum GeneratedField { ValidatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3595,6 +3685,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorCommissionResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3616,6 +3707,7 @@ impl serde::Serialize for QueryValidatorCommissionResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3628,6 +3720,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionResponse { enum GeneratedField { Commission, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3699,6 +3792,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorOutstandingRewardsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3720,6 +3814,7 @@ impl serde::Serialize for QueryValidatorOutstandingRewardsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3732,6 +3827,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsRequest { enum GeneratedField { ValidatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3805,6 +3901,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorOutstandingRewardsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3826,6 +3923,7 @@ impl serde::Serialize for QueryValidatorOutstandingRewardsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3838,6 +3936,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsResponse { enum GeneratedField { Rewards, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3907,6 +4006,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorSlashesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3954,6 +4054,7 @@ impl serde::Serialize for QueryValidatorSlashesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3977,6 +4078,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { EndingHeight, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4084,6 +4186,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorSlashesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4111,6 +4214,7 @@ impl serde::Serialize for QueryValidatorSlashesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4124,6 +4228,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesResponse { Slashes, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4203,6 +4308,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorAccumulatedCommission { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4224,6 +4330,7 @@ impl serde::Serialize for ValidatorAccumulatedCommission { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommission { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4236,6 +4343,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommission { enum GeneratedField { Commission, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4306,6 +4414,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommission { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorAccumulatedCommissionRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4333,6 +4442,7 @@ impl serde::Serialize for ValidatorAccumulatedCommissionRecord { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommissionRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4346,6 +4456,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommissionRecord { ValidatorAddress, Accumulated, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4428,6 +4539,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommissionRecord { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorCurrentRewards { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4454,6 +4566,7 @@ impl serde::Serialize for ValidatorCurrentRewards { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewards { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4467,6 +4580,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewards { Rewards, Period, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4548,6 +4662,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewards { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorCurrentRewardsRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4575,6 +4690,7 @@ impl serde::Serialize for ValidatorCurrentRewardsRecord { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewardsRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4588,6 +4704,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewardsRecord { ValidatorAddress, Rewards, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4669,6 +4786,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewardsRecord { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorHistoricalRewards { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4696,6 +4814,7 @@ impl serde::Serialize for ValidatorHistoricalRewards { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4714,6 +4833,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { CumulativeRewardRatio, ReferenceCount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4801,6 +4921,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorHistoricalRewardsRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4835,6 +4956,7 @@ impl serde::Serialize for ValidatorHistoricalRewardsRecord { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4849,6 +4971,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { Period, Rewards, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4943,6 +5066,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorOutstandingRewards { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4964,6 +5088,7 @@ impl serde::Serialize for ValidatorOutstandingRewards { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewards { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4976,6 +5101,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewards { enum GeneratedField { Rewards, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5046,6 +5172,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewards { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorOutstandingRewardsRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5073,6 +5200,7 @@ impl serde::Serialize for ValidatorOutstandingRewardsRecord { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5091,6 +5219,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { ValidatorAddress, OutstandingRewards, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5177,6 +5306,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorSlashEvent { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5206,6 +5336,7 @@ impl serde::Serialize for ValidatorSlashEvent { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5219,6 +5350,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { ValidatorPeriod, Fraction, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5299,6 +5431,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorSlashEventRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5338,6 +5471,7 @@ impl serde::Serialize for ValidatorSlashEventRecord { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5360,6 +5494,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { Period, ValidatorSlashEvent, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5468,6 +5603,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorSlashEvents { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5487,6 +5623,7 @@ impl serde::Serialize for ValidatorSlashEvents { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorSlashEvents { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5499,6 +5636,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvents { enum GeneratedField { ValidatorSlashEvents, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs index bd362eb3..cf9e904b 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Equivocation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -38,6 +39,7 @@ impl serde::Serialize for Equivocation { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Equivocation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -59,6 +61,7 @@ impl<'de> serde::Deserialize<'de> for Equivocation { Power, ConsensusAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -160,6 +163,7 @@ impl<'de> serde::Deserialize<'de> for Equivocation { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -179,6 +183,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -191,6 +196,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { Evidence, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -257,6 +263,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSubmitEvidence { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -282,6 +289,7 @@ impl serde::Serialize for MsgSubmitEvidence { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSubmitEvidence { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -295,6 +303,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidence { Submitter, Evidence, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -370,6 +379,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidence { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSubmitEvidenceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -391,6 +401,7 @@ impl serde::Serialize for MsgSubmitEvidenceResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSubmitEvidenceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -403,6 +414,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidenceResponse { enum GeneratedField { Hash, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -475,6 +487,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidenceResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllEvidenceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -494,6 +507,7 @@ impl serde::Serialize for QueryAllEvidenceRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllEvidenceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -506,6 +520,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -575,6 +590,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllEvidenceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -600,6 +616,7 @@ impl serde::Serialize for QueryAllEvidenceResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllEvidenceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -613,6 +630,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceResponse { Evidence, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -691,6 +709,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryEvidenceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -714,6 +733,7 @@ impl serde::Serialize for QueryEvidenceRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryEvidenceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -726,6 +746,7 @@ impl<'de> serde::Deserialize<'de> for QueryEvidenceRequest { enum GeneratedField { EvidenceHash, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -798,6 +819,7 @@ impl<'de> serde::Deserialize<'de> for QueryEvidenceRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryEvidenceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -817,6 +839,7 @@ impl serde::Serialize for QueryEvidenceResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryEvidenceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -829,6 +852,7 @@ impl<'de> serde::Deserialize<'de> for QueryEvidenceResponse { enum GeneratedField { Evidence, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs index 1af4b0b5..82c7ae3d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for AllowedMsgAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,6 +25,7 @@ impl serde::Serialize for AllowedMsgAllowance { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AllowedMsgAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for AllowedMsgAllowance { Allowance, AllowedMessages, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -114,6 +117,7 @@ impl<'de> serde::Deserialize<'de> for AllowedMsgAllowance { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for BasicAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -139,6 +143,7 @@ impl serde::Serialize for BasicAllowance { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for BasicAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -152,6 +157,7 @@ impl<'de> serde::Deserialize<'de> for BasicAllowance { SpendLimit, Expiration, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -227,6 +233,7 @@ impl<'de> serde::Deserialize<'de> for BasicAllowance { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -246,6 +253,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -258,6 +266,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { Allowances, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -324,6 +333,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Grant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -354,6 +364,7 @@ impl serde::Serialize for Grant { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Grant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -368,6 +379,7 @@ impl<'de> serde::Deserialize<'de> for Grant { Grantee, Allowance, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -448,6 +460,7 @@ impl<'de> serde::Deserialize<'de> for Grant { deserializer.deserialize_struct("cosmos.feegrant.v1beta1.Grant", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgGrantAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -479,6 +492,7 @@ impl serde::Serialize for MsgGrantAllowance { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgGrantAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -493,6 +507,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowance { Grantee, Allowance, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -577,6 +592,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowance { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgGrantAllowanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -590,6 +606,7 @@ impl serde::Serialize for MsgGrantAllowanceResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgGrantAllowanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -600,6 +617,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowanceResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -656,6 +674,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowanceResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgRevokeAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -681,6 +700,7 @@ impl serde::Serialize for MsgRevokeAllowance { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgRevokeAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -694,6 +714,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowance { Granter, Grantee, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -769,6 +790,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowance { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgRevokeAllowanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -782,6 +804,7 @@ impl serde::Serialize for MsgRevokeAllowanceResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgRevokeAllowanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -792,6 +815,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowanceResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -848,6 +872,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowanceResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PeriodicAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -891,6 +916,7 @@ impl serde::Serialize for PeriodicAllowance { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PeriodicAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -916,6 +942,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicAllowance { PeriodCanSpend, PeriodReset, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1022,6 +1049,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicAllowance { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllowanceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1047,6 +1075,7 @@ impl serde::Serialize for QueryAllowanceRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllowanceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1060,6 +1089,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceRequest { Granter, Grantee, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1138,6 +1168,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllowanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1157,6 +1188,7 @@ impl serde::Serialize for QueryAllowanceResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllowanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1169,6 +1201,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceResponse { enum GeneratedField { Allowance, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1238,6 +1271,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllowancesByGranterRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1265,6 +1299,7 @@ impl serde::Serialize for QueryAllowancesByGranterRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1278,6 +1313,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterRequest { Granter, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1357,6 +1393,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllowancesByGranterResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1384,6 +1421,7 @@ impl serde::Serialize for QueryAllowancesByGranterResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1397,6 +1435,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterResponse { Allowances, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1476,6 +1515,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllowancesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1501,6 +1541,7 @@ impl serde::Serialize for QueryAllowancesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllowancesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1514,6 +1555,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesRequest { Grantee, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1592,6 +1634,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllowancesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1617,6 +1660,7 @@ impl serde::Serialize for QueryAllowancesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllowancesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1630,6 +1674,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesResponse { Allowances, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs index 1b3f71c8..c5761f62 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,6 +26,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { GenTxs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs index 1e35bd52..01f7ae5f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Deposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -33,6 +34,7 @@ impl serde::Serialize for Deposit { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Deposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -47,6 +49,7 @@ impl<'de> serde::Deserialize<'de> for Deposit { Depositor, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -130,6 +133,7 @@ impl<'de> serde::Deserialize<'de> for Deposit { deserializer.deserialize_struct("cosmos.gov.v1.Deposit", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DepositParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -154,6 +158,7 @@ impl serde::Serialize for DepositParams { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DepositParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -172,6 +177,7 @@ impl<'de> serde::Deserialize<'de> for DepositParams { MinDeposit, MaxDepositPeriod, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -245,6 +251,7 @@ impl<'de> serde::Deserialize<'de> for DepositParams { deserializer.deserialize_struct("cosmos.gov.v1.DepositParams", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -303,6 +310,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -333,6 +341,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { VotingParams, TallyParams, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -456,6 +465,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmos.gov.v1.GenesisState", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgDeposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -490,6 +500,7 @@ impl serde::Serialize for MsgDeposit { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgDeposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -504,6 +515,7 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { Depositor, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -587,6 +599,7 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { deserializer.deserialize_struct("cosmos.gov.v1.MsgDeposit", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgDepositResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -599,6 +612,7 @@ impl serde::Serialize for MsgDepositResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgDepositResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -609,6 +623,7 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -662,6 +677,7 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgExecLegacyContent { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -687,6 +703,7 @@ impl serde::Serialize for MsgExecLegacyContent { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -700,6 +717,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { Content, Authority, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -778,6 +796,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgExecLegacyContentResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -791,6 +810,7 @@ impl serde::Serialize for MsgExecLegacyContentResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -801,6 +821,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -857,6 +878,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSubmitProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -893,6 +915,7 @@ impl serde::Serialize for MsgSubmitProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -914,6 +937,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { Proposer, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1005,6 +1029,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { deserializer.deserialize_struct("cosmos.gov.v1.MsgSubmitProposal", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSubmitProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1028,6 +1053,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1040,6 +1066,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1112,6 +1139,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1155,6 +1183,7 @@ impl serde::Serialize for MsgVote { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1170,6 +1199,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { Option, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1262,6 +1292,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { deserializer.deserialize_struct("cosmos.gov.v1.MsgVote", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1274,6 +1305,7 @@ impl serde::Serialize for MsgVoteResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1284,6 +1316,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1333,6 +1366,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteResponse", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVoteWeighted { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1373,6 +1407,7 @@ impl serde::Serialize for MsgVoteWeighted { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1388,6 +1423,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { Options, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1480,6 +1516,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteWeighted", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVoteWeightedResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1493,6 +1530,7 @@ impl serde::Serialize for MsgVoteWeightedResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1503,6 +1541,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1559,6 +1598,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Proposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1635,6 +1675,7 @@ impl serde::Serialize for Proposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Proposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1673,6 +1714,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { VotingEndTime, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1827,6 +1869,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { deserializer.deserialize_struct("cosmos.gov.v1.Proposal", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ProposalStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1844,6 +1887,7 @@ impl serde::Serialize for ProposalStatus { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ProposalStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1910,6 +1954,7 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDepositRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1939,6 +1984,7 @@ impl serde::Serialize for QueryDepositRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDepositRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1952,6 +1998,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { ProposalId, Depositor, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2030,6 +2077,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDepositResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2049,6 +2097,7 @@ impl serde::Serialize for QueryDepositResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDepositResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2061,6 +2110,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { enum GeneratedField { Deposit, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2128,6 +2178,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDepositsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2157,6 +2208,7 @@ impl serde::Serialize for QueryDepositsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2170,6 +2222,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { ProposalId, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2251,6 +2304,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDepositsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2276,6 +2330,7 @@ impl serde::Serialize for QueryDepositsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2289,6 +2344,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { Deposits, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2367,6 +2423,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2386,6 +2443,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2398,6 +2456,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { enum GeneratedField { ParamsType, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2464,6 +2523,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2495,6 +2555,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2516,6 +2577,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { DepositParams, TallyParams, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2600,6 +2662,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2623,6 +2686,7 @@ impl serde::Serialize for QueryProposalRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2635,6 +2699,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2707,6 +2772,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2726,6 +2792,7 @@ impl serde::Serialize for QueryProposalResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2738,6 +2805,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { enum GeneratedField { Proposal, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2807,6 +2875,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2847,6 +2916,7 @@ impl serde::Serialize for QueryProposalsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2868,6 +2938,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { Depositor, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2966,6 +3037,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2991,6 +3063,7 @@ impl serde::Serialize for QueryProposalsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3004,6 +3077,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { Proposals, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3082,6 +3156,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryTallyResultRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3105,6 +3180,7 @@ impl serde::Serialize for QueryTallyResultRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3117,6 +3193,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3189,6 +3266,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryTallyResultResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3208,6 +3286,7 @@ impl serde::Serialize for QueryTallyResultResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3220,6 +3299,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { enum GeneratedField { Tally, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3287,6 +3367,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVoteRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3315,6 +3396,7 @@ impl serde::Serialize for QueryVoteRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVoteRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3328,6 +3410,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { ProposalId, Voter, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3402,6 +3485,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { deserializer.deserialize_struct("cosmos.gov.v1.QueryVoteRequest", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3420,6 +3504,7 @@ impl serde::Serialize for QueryVoteResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3432,6 +3517,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { enum GeneratedField { Vote, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3492,6 +3578,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { deserializer.deserialize_struct("cosmos.gov.v1.QueryVoteResponse", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVotesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3520,6 +3607,7 @@ impl serde::Serialize for QueryVotesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVotesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3533,6 +3621,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { ProposalId, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3607,6 +3696,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { deserializer.deserialize_struct("cosmos.gov.v1.QueryVotesRequest", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVotesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3632,6 +3722,7 @@ impl serde::Serialize for QueryVotesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVotesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3645,6 +3736,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { Votes, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3720,6 +3812,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TallyParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3750,6 +3843,7 @@ impl serde::Serialize for TallyParams { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TallyParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3764,6 +3858,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { Threshold, VetoThreshold, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3844,6 +3939,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { deserializer.deserialize_struct("cosmos.gov.v1.TallyParams", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TallyResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3880,6 +3976,7 @@ impl serde::Serialize for TallyResult { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TallyResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3904,6 +4001,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { NoCount, NoWithVetoCount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3995,6 +4093,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { deserializer.deserialize_struct("cosmos.gov.v1.TallyResult", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Vote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4035,6 +4134,7 @@ impl serde::Serialize for Vote { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Vote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4050,6 +4150,7 @@ impl<'de> serde::Deserialize<'de> for Vote { Options, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4142,6 +4243,7 @@ impl<'de> serde::Deserialize<'de> for Vote { deserializer.deserialize_struct("cosmos.gov.v1.Vote", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for VoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4158,6 +4260,7 @@ impl serde::Serialize for VoteOption { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for VoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4222,6 +4325,7 @@ impl<'de> serde::Deserialize<'de> for VoteOption { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for VotingParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4240,6 +4344,7 @@ impl serde::Serialize for VotingParams { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for VotingParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4252,6 +4357,7 @@ impl<'de> serde::Deserialize<'de> for VotingParams { enum GeneratedField { VotingPeriod, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4314,6 +4420,7 @@ impl<'de> serde::Deserialize<'de> for VotingParams { deserializer.deserialize_struct("cosmos.gov.v1.VotingParams", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for WeightedVoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4342,6 +4449,7 @@ impl serde::Serialize for WeightedVoteOption { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for WeightedVoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4355,6 +4463,7 @@ impl<'de> serde::Deserialize<'de> for WeightedVoteOption { Option, Weight, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs index 20407069..f2e80741 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Deposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -33,6 +34,7 @@ impl serde::Serialize for Deposit { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Deposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -47,6 +49,7 @@ impl<'de> serde::Deserialize<'de> for Deposit { Depositor, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -130,6 +133,7 @@ impl<'de> serde::Deserialize<'de> for Deposit { deserializer.deserialize_struct("cosmos.gov.v1beta1.Deposit", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DepositParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -155,6 +159,7 @@ impl serde::Serialize for DepositParams { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DepositParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -173,6 +178,7 @@ impl<'de> serde::Deserialize<'de> for DepositParams { MinDeposit, MaxDepositPeriod, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -250,6 +256,7 @@ impl<'de> serde::Deserialize<'de> for DepositParams { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -308,6 +315,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -338,6 +346,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { VotingParams, TallyParams, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -461,6 +470,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmos.gov.v1beta1.GenesisState", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgDeposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -495,6 +505,7 @@ impl serde::Serialize for MsgDeposit { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgDeposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -509,6 +520,7 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { Depositor, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -592,6 +604,7 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgDeposit", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgDepositResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -605,6 +618,7 @@ impl serde::Serialize for MsgDepositResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgDepositResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -615,6 +629,7 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -668,6 +683,7 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSubmitProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -699,6 +715,7 @@ impl serde::Serialize for MsgSubmitProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -713,6 +730,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { InitialDeposit, Proposer, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -799,6 +817,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSubmitProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -822,6 +841,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -834,6 +854,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -906,6 +927,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -943,6 +965,7 @@ impl serde::Serialize for MsgVote { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -957,6 +980,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { Voter, Option, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1040,6 +1064,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgVote", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1052,6 +1077,7 @@ impl serde::Serialize for MsgVoteResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1062,6 +1088,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1115,6 +1142,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVoteWeighted { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1150,6 +1178,7 @@ impl serde::Serialize for MsgVoteWeighted { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1164,6 +1193,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { Voter, Options, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1251,6 +1281,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVoteWeightedResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1264,6 +1295,7 @@ impl serde::Serialize for MsgVoteWeightedResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1274,6 +1306,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1330,6 +1363,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Proposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1403,6 +1437,7 @@ impl serde::Serialize for Proposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Proposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1440,6 +1475,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { VotingStartTime, VotingEndTime, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1585,6 +1621,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { deserializer.deserialize_struct("cosmos.gov.v1beta1.Proposal", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ProposalStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1602,6 +1639,7 @@ impl serde::Serialize for ProposalStatus { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ProposalStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1668,6 +1706,7 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDepositRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1697,6 +1736,7 @@ impl serde::Serialize for QueryDepositRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDepositRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1710,6 +1750,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { ProposalId, Depositor, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1788,6 +1829,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDepositResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1807,6 +1849,7 @@ impl serde::Serialize for QueryDepositResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDepositResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1819,6 +1862,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { enum GeneratedField { Deposit, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1886,6 +1930,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDepositsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1915,6 +1960,7 @@ impl serde::Serialize for QueryDepositsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1928,6 +1974,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { ProposalId, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2009,6 +2056,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDepositsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2034,6 +2082,7 @@ impl serde::Serialize for QueryDepositsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2047,6 +2096,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { Deposits, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2125,6 +2175,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2144,6 +2195,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2156,6 +2208,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { enum GeneratedField { ParamsType, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2222,6 +2275,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2253,6 +2307,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2274,6 +2329,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { DepositParams, TallyParams, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2358,6 +2414,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2381,6 +2438,7 @@ impl serde::Serialize for QueryProposalRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2393,6 +2451,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2465,6 +2524,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2484,6 +2544,7 @@ impl serde::Serialize for QueryProposalResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2496,6 +2557,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { enum GeneratedField { Proposal, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2565,6 +2627,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2605,6 +2668,7 @@ impl serde::Serialize for QueryProposalsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2626,6 +2690,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { Depositor, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2724,6 +2789,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2749,6 +2815,7 @@ impl serde::Serialize for QueryProposalsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2762,6 +2829,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { Proposals, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2840,6 +2908,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryTallyResultRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2863,6 +2932,7 @@ impl serde::Serialize for QueryTallyResultRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2875,6 +2945,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2947,6 +3018,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryTallyResultResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2966,6 +3038,7 @@ impl serde::Serialize for QueryTallyResultResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2978,6 +3051,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { enum GeneratedField { Tally, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3045,6 +3119,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVoteRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3074,6 +3149,7 @@ impl serde::Serialize for QueryVoteRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVoteRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3087,6 +3163,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { ProposalId, Voter, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3165,6 +3242,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3184,6 +3262,7 @@ impl serde::Serialize for QueryVoteResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3196,6 +3275,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { enum GeneratedField { Vote, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3260,6 +3340,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVotesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3289,6 +3370,7 @@ impl serde::Serialize for QueryVotesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVotesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3302,6 +3384,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { ProposalId, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3380,6 +3463,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVotesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3405,6 +3489,7 @@ impl serde::Serialize for QueryVotesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVotesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3418,6 +3503,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { Votes, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3493,6 +3579,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TallyParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3535,6 +3622,7 @@ impl serde::Serialize for TallyParams { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TallyParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3549,6 +3637,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { Threshold, VetoThreshold, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3638,6 +3727,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { deserializer.deserialize_struct("cosmos.gov.v1beta1.TallyParams", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TallyResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3674,6 +3764,7 @@ impl serde::Serialize for TallyResult { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TallyResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3689,6 +3780,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { No, NoWithVeto, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3778,6 +3870,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { deserializer.deserialize_struct("cosmos.gov.v1beta1.TallyResult", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TextProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3802,6 +3895,7 @@ impl serde::Serialize for TextProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TextProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3815,6 +3909,7 @@ impl<'de> serde::Deserialize<'de> for TextProposal { Title, Description, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3886,6 +3981,7 @@ impl<'de> serde::Deserialize<'de> for TextProposal { deserializer.deserialize_struct("cosmos.gov.v1beta1.TextProposal", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Vote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3929,6 +4025,7 @@ impl serde::Serialize for Vote { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Vote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3944,6 +4041,7 @@ impl<'de> serde::Deserialize<'de> for Vote { Option, Options, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4036,6 +4134,7 @@ impl<'de> serde::Deserialize<'de> for Vote { deserializer.deserialize_struct("cosmos.gov.v1beta1.Vote", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for VoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4052,6 +4151,7 @@ impl serde::Serialize for VoteOption { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for VoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4116,6 +4216,7 @@ impl<'de> serde::Deserialize<'de> for VoteOption { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for VotingParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4134,6 +4235,7 @@ impl serde::Serialize for VotingParams { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for VotingParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4146,6 +4248,7 @@ impl<'de> serde::Deserialize<'de> for VotingParams { enum GeneratedField { VotingPeriod, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4208,6 +4311,7 @@ impl<'de> serde::Deserialize<'de> for VotingParams { deserializer.deserialize_struct("cosmos.gov.v1beta1.VotingParams", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for WeightedVoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4236,6 +4340,7 @@ impl serde::Serialize for WeightedVoteOption { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for WeightedVoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4249,6 +4354,7 @@ impl<'de> serde::Deserialize<'de> for WeightedVoteOption { Option, Weight, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs index 993df610..54e2c098 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for DecisionPolicyWindows { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,6 +25,7 @@ impl serde::Serialize for DecisionPolicyWindows { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -42,6 +44,7 @@ impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { VotingPeriod, MinExecutionPeriod, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -124,6 +127,7 @@ impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventCreateGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -144,6 +148,7 @@ impl serde::Serialize for EventCreateGroup { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventCreateGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -156,6 +161,7 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroup { enum GeneratedField { GroupId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -225,6 +231,7 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroup { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventCreateGroupPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -244,6 +251,7 @@ impl serde::Serialize for EventCreateGroupPolicy { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventCreateGroupPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -256,6 +264,7 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroupPolicy { enum GeneratedField { Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -325,6 +334,7 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroupPolicy { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventExec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -362,6 +372,7 @@ impl serde::Serialize for EventExec { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventExec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -376,6 +387,7 @@ impl<'de> serde::Deserialize<'de> for EventExec { Result, Logs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -459,6 +471,7 @@ impl<'de> serde::Deserialize<'de> for EventExec { deserializer.deserialize_struct("cosmos.group.v1.EventExec", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventLeaveGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -484,6 +497,7 @@ impl serde::Serialize for EventLeaveGroup { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventLeaveGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -497,6 +511,7 @@ impl<'de> serde::Deserialize<'de> for EventLeaveGroup { GroupId, Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -571,6 +586,7 @@ impl<'de> serde::Deserialize<'de> for EventLeaveGroup { deserializer.deserialize_struct("cosmos.group.v1.EventLeaveGroup", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventProposalPruned { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -609,6 +625,7 @@ impl serde::Serialize for EventProposalPruned { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventProposalPruned { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -629,6 +646,7 @@ impl<'de> serde::Deserialize<'de> for EventProposalPruned { Status, TallyResult, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -716,6 +734,7 @@ impl<'de> serde::Deserialize<'de> for EventProposalPruned { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventSubmitProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -739,6 +758,7 @@ impl serde::Serialize for EventSubmitProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventSubmitProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -751,6 +771,7 @@ impl<'de> serde::Deserialize<'de> for EventSubmitProposal { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -820,6 +841,7 @@ impl<'de> serde::Deserialize<'de> for EventSubmitProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventUpdateGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -840,6 +862,7 @@ impl serde::Serialize for EventUpdateGroup { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventUpdateGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -852,6 +875,7 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroup { enum GeneratedField { GroupId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -921,6 +945,7 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroup { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventUpdateGroupPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -940,6 +965,7 @@ impl serde::Serialize for EventUpdateGroupPolicy { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventUpdateGroupPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -952,6 +978,7 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroupPolicy { enum GeneratedField { Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1021,6 +1048,7 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroupPolicy { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventVote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1043,6 +1071,7 @@ impl serde::Serialize for EventVote { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventVote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1055,6 +1084,7 @@ impl<'de> serde::Deserialize<'de> for EventVote { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1120,6 +1150,7 @@ impl<'de> serde::Deserialize<'de> for EventVote { deserializer.deserialize_struct("cosmos.group.v1.EventVote", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventWithdrawProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1143,6 +1174,7 @@ impl serde::Serialize for EventWithdrawProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventWithdrawProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1155,6 +1187,7 @@ impl<'de> serde::Deserialize<'de> for EventWithdrawProposal { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1227,6 +1260,7 @@ impl<'de> serde::Deserialize<'de> for EventWithdrawProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Exec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1240,6 +1274,7 @@ impl serde::Serialize for Exec { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Exec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1295,6 +1330,7 @@ impl<'de> serde::Deserialize<'de> for Exec { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1365,6 +1401,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1398,6 +1435,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Proposals, Votes, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1534,6 +1572,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmos.group.v1.GenesisState", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GroupInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1584,6 +1623,7 @@ impl serde::Serialize for GroupInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GroupInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1610,6 +1650,7 @@ impl<'de> serde::Deserialize<'de> for GroupInfo { TotalWeight, CreatedAt, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1723,6 +1764,7 @@ impl<'de> serde::Deserialize<'de> for GroupInfo { deserializer.deserialize_struct("cosmos.group.v1.GroupInfo", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GroupMember { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1748,6 +1790,7 @@ impl serde::Serialize for GroupMember { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GroupMember { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1761,6 +1804,7 @@ impl<'de> serde::Deserialize<'de> for GroupMember { GroupId, Member, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1835,6 +1879,7 @@ impl<'de> serde::Deserialize<'de> for GroupMember { deserializer.deserialize_struct("cosmos.group.v1.GroupMember", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GroupPolicyInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1891,6 +1936,7 @@ impl serde::Serialize for GroupPolicyInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1920,6 +1966,7 @@ impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { DecisionPolicy, CreatedAt, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2044,6 +2091,7 @@ impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { deserializer.deserialize_struct("cosmos.group.v1.GroupPolicyInfo", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Member { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2080,6 +2128,7 @@ impl serde::Serialize for Member { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Member { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2095,6 +2144,7 @@ impl<'de> serde::Deserialize<'de> for Member { Metadata, AddedAt, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2184,6 +2234,7 @@ impl<'de> serde::Deserialize<'de> for Member { deserializer.deserialize_struct("cosmos.group.v1.Member", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MemberRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2214,6 +2265,7 @@ impl serde::Serialize for MemberRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MemberRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2228,6 +2280,7 @@ impl<'de> serde::Deserialize<'de> for MemberRequest { Weight, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2308,6 +2361,7 @@ impl<'de> serde::Deserialize<'de> for MemberRequest { deserializer.deserialize_struct("cosmos.group.v1.MemberRequest", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2338,6 +2392,7 @@ impl serde::Serialize for MsgCreateGroup { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2352,6 +2407,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroup { Members, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2432,6 +2488,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroup { deserializer.deserialize_struct("cosmos.group.v1.MsgCreateGroup", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateGroupPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2470,6 +2527,7 @@ impl serde::Serialize for MsgCreateGroupPolicy { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2492,6 +2550,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { Metadata, DecisionPolicy, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2593,6 +2652,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateGroupPolicyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2612,6 +2672,7 @@ impl serde::Serialize for MsgCreateGroupPolicyResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2624,6 +2685,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicyResponse { enum GeneratedField { Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2693,6 +2755,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicyResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateGroupResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2713,6 +2776,7 @@ impl serde::Serialize for MsgCreateGroupResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2725,6 +2789,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupResponse { enum GeneratedField { GroupId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2797,6 +2862,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateGroupWithPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2846,6 +2912,7 @@ impl serde::Serialize for MsgCreateGroupWithPolicy { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2874,6 +2941,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { GroupPolicyAsAdmin, DecisionPolicy, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2998,6 +3066,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateGroupWithPolicyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3024,6 +3093,7 @@ impl serde::Serialize for MsgCreateGroupWithPolicyResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3042,6 +3112,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { GroupId, GroupPolicyAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3127,6 +3198,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgExec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3155,6 +3227,7 @@ impl serde::Serialize for MsgExec { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgExec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3168,6 +3241,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { ProposalId, Executor, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3242,6 +3316,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { deserializer.deserialize_struct("cosmos.group.v1.MsgExec", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgExecResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3263,6 +3338,7 @@ impl serde::Serialize for MsgExecResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgExecResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3275,6 +3351,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { enum GeneratedField { Result, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3337,6 +3414,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { deserializer.deserialize_struct("cosmos.group.v1.MsgExecResponse", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgLeaveGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3362,6 +3440,7 @@ impl serde::Serialize for MsgLeaveGroup { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgLeaveGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3375,6 +3454,7 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroup { Address, GroupId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3449,6 +3529,7 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroup { deserializer.deserialize_struct("cosmos.group.v1.MsgLeaveGroup", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgLeaveGroupResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3462,6 +3543,7 @@ impl serde::Serialize for MsgLeaveGroupResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgLeaveGroupResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3472,6 +3554,7 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroupResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3528,6 +3611,7 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroupResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSubmitProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3573,6 +3657,7 @@ impl serde::Serialize for MsgSubmitProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3596,6 +3681,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { Messages, Exec, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3702,6 +3788,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSubmitProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3725,6 +3812,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3737,6 +3825,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3809,6 +3898,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3841,6 +3931,7 @@ impl serde::Serialize for MsgUpdateGroupAdmin { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3855,6 +3946,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { GroupId, NewAdmin, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3942,6 +4034,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3955,6 +4048,7 @@ impl serde::Serialize for MsgUpdateGroupAdminResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3965,6 +4059,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdminResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4021,6 +4116,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdminResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupMembers { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4053,6 +4149,7 @@ impl serde::Serialize for MsgUpdateGroupMembers { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4073,6 +4170,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { GroupId, MemberUpdates, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4163,6 +4261,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupMembersResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4176,6 +4275,7 @@ impl serde::Serialize for MsgUpdateGroupMembersResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembersResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4186,6 +4286,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembersResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4242,6 +4343,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembersResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupMetadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4274,6 +4376,7 @@ impl serde::Serialize for MsgUpdateGroupMetadata { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4288,6 +4391,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { GroupId, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4378,6 +4482,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupMetadataResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4391,6 +4496,7 @@ impl serde::Serialize for MsgUpdateGroupMetadataResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadataResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4401,6 +4507,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadataResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4457,6 +4564,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadataResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupPolicyAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4488,6 +4596,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyAdmin { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4508,6 +4617,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { GroupPolicyAddress, NewAdmin, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4599,6 +4709,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupPolicyAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4612,6 +4723,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyAdminResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4622,6 +4734,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdminResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4678,6 +4791,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdminResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4709,6 +4823,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicy { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4729,6 +4844,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { GroupPolicyAddress, DecisionPolicy, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4822,6 +4938,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4837,6 +4954,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicyResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4847,6 +4965,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicyResponse #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4904,6 +5023,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicyResponse ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupPolicyMetadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4935,6 +5055,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyMetadata { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4954,6 +5075,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { GroupPolicyAddress, Metadata, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5045,6 +5167,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateGroupPolicyMetadataResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5058,6 +5181,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyMetadataResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadataResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5068,6 +5192,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadataResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5124,6 +5249,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadataResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5175,6 +5301,7 @@ impl serde::Serialize for MsgVote { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5198,6 +5325,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { Metadata, Exec, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5299,6 +5427,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { deserializer.deserialize_struct("cosmos.group.v1.MsgVote", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5311,6 +5440,7 @@ impl serde::Serialize for MsgVoteResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5321,6 +5451,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5370,6 +5501,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { deserializer.deserialize_struct("cosmos.group.v1.MsgVoteResponse", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgWithdrawProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5399,6 +5531,7 @@ impl serde::Serialize for MsgWithdrawProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5412,6 +5545,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { ProposalId, Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5490,6 +5624,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgWithdrawProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5503,6 +5638,7 @@ impl serde::Serialize for MsgWithdrawProposalResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgWithdrawProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5513,6 +5649,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposalResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5569,6 +5706,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposalResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PercentageDecisionPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5594,6 +5732,7 @@ impl serde::Serialize for PercentageDecisionPolicy { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PercentageDecisionPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5607,6 +5746,7 @@ impl<'de> serde::Deserialize<'de> for PercentageDecisionPolicy { Percentage, Windows, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5685,6 +5825,7 @@ impl<'de> serde::Deserialize<'de> for PercentageDecisionPolicy { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Proposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5784,6 +5925,7 @@ impl serde::Serialize for Proposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Proposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5827,6 +5969,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { ExecutorResult, Messages, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6012,6 +6155,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { deserializer.deserialize_struct("cosmos.group.v1.Proposal", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ProposalExecutorResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6027,6 +6171,7 @@ impl serde::Serialize for ProposalExecutorResult { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ProposalExecutorResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6091,6 +6236,7 @@ impl<'de> serde::Deserialize<'de> for ProposalExecutorResult { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ProposalStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6108,6 +6254,7 @@ impl serde::Serialize for ProposalStatus { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ProposalStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6174,6 +6321,7 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6194,6 +6342,7 @@ impl serde::Serialize for QueryGroupInfoRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6206,6 +6355,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoRequest { enum GeneratedField { GroupId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6278,6 +6428,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6297,6 +6448,7 @@ impl serde::Serialize for QueryGroupInfoResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6309,6 +6461,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoResponse { enum GeneratedField { Info, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6376,6 +6529,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupMembersRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6402,6 +6556,7 @@ impl serde::Serialize for QueryGroupMembersRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6415,6 +6570,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { GroupId, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6496,6 +6652,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupMembersResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6521,6 +6678,7 @@ impl serde::Serialize for QueryGroupMembersResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupMembersResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6534,6 +6692,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersResponse { Members, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6612,6 +6771,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupPoliciesByAdminRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6637,6 +6797,7 @@ impl serde::Serialize for QueryGroupPoliciesByAdminRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6650,6 +6811,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminRequest { Admin, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6728,6 +6890,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupPoliciesByAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6753,6 +6916,7 @@ impl serde::Serialize for QueryGroupPoliciesByAdminResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6766,6 +6930,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminResponse { GroupPolicies, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6844,6 +7009,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupPoliciesByGroupRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6870,6 +7036,7 @@ impl serde::Serialize for QueryGroupPoliciesByGroupRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6883,6 +7050,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { GroupId, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6964,6 +7132,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupPoliciesByGroupResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6989,6 +7158,7 @@ impl serde::Serialize for QueryGroupPoliciesByGroupResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7002,6 +7172,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupResponse { GroupPolicies, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7080,6 +7251,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupPolicyInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7099,6 +7271,7 @@ impl serde::Serialize for QueryGroupPolicyInfoRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7111,6 +7284,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoRequest { enum GeneratedField { Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7180,6 +7354,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupPolicyInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7199,6 +7374,7 @@ impl serde::Serialize for QueryGroupPolicyInfoResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7211,6 +7387,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoResponse { enum GeneratedField { Info, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7278,6 +7455,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupsByAdminRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7303,6 +7481,7 @@ impl serde::Serialize for QueryGroupsByAdminRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7316,6 +7495,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminRequest { Admin, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7394,6 +7574,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupsByAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7419,6 +7600,7 @@ impl serde::Serialize for QueryGroupsByAdminResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7432,6 +7614,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminResponse { Groups, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7510,6 +7693,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupsByMemberRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7535,6 +7719,7 @@ impl serde::Serialize for QueryGroupsByMemberRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7548,6 +7733,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberRequest { Address, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7626,6 +7812,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupsByMemberResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7651,6 +7838,7 @@ impl serde::Serialize for QueryGroupsByMemberResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7664,6 +7852,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberResponse { Groups, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7742,6 +7931,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7761,6 +7951,7 @@ impl serde::Serialize for QueryGroupsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7773,6 +7964,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7839,6 +8031,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryGroupsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7864,6 +8057,7 @@ impl serde::Serialize for QueryGroupsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryGroupsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7877,6 +8071,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsResponse { Groups, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7952,6 +8147,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7975,6 +8171,7 @@ impl serde::Serialize for QueryProposalRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7987,6 +8184,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8059,6 +8257,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8078,6 +8277,7 @@ impl serde::Serialize for QueryProposalResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8090,6 +8290,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { enum GeneratedField { Proposal, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8159,6 +8360,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalsByGroupPolicyRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8184,6 +8386,7 @@ impl serde::Serialize for QueryProposalsByGroupPolicyRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8197,6 +8400,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyRequest { Address, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8275,6 +8479,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryProposalsByGroupPolicyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8300,6 +8505,7 @@ impl serde::Serialize for QueryProposalsByGroupPolicyResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8313,6 +8519,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyResponse { Proposals, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8391,6 +8598,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryTallyResultRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8414,6 +8622,7 @@ impl serde::Serialize for QueryTallyResultRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8426,6 +8635,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { enum GeneratedField { ProposalId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8498,6 +8708,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryTallyResultResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8517,6 +8728,7 @@ impl serde::Serialize for QueryTallyResultResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8529,6 +8741,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { enum GeneratedField { Tally, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8596,6 +8809,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVoteByProposalVoterRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8625,6 +8839,7 @@ impl serde::Serialize for QueryVoteByProposalVoterRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8638,6 +8853,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { ProposalId, Voter, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8719,6 +8935,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVoteByProposalVoterResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8738,6 +8955,7 @@ impl serde::Serialize for QueryVoteByProposalVoterResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8750,6 +8968,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterResponse { enum GeneratedField { Vote, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8817,6 +9036,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVotesByProposalRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8846,6 +9066,7 @@ impl serde::Serialize for QueryVotesByProposalRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8859,6 +9080,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { ProposalId, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8940,6 +9162,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVotesByProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8965,6 +9188,7 @@ impl serde::Serialize for QueryVotesByProposalResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVotesByProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8978,6 +9202,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalResponse { Votes, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9056,6 +9281,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVotesByVoterRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9081,6 +9307,7 @@ impl serde::Serialize for QueryVotesByVoterRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVotesByVoterRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9094,6 +9321,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterRequest { Voter, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9172,6 +9400,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryVotesByVoterResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9197,6 +9426,7 @@ impl serde::Serialize for QueryVotesByVoterResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryVotesByVoterResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9210,6 +9440,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterResponse { Votes, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9288,6 +9519,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TallyResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9324,6 +9556,7 @@ impl serde::Serialize for TallyResult { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TallyResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9348,6 +9581,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { NoCount, NoWithVetoCount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9439,6 +9673,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { deserializer.deserialize_struct("cosmos.group.v1.TallyResult", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ThresholdDecisionPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9464,6 +9699,7 @@ impl serde::Serialize for ThresholdDecisionPolicy { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ThresholdDecisionPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9477,6 +9713,7 @@ impl<'de> serde::Deserialize<'de> for ThresholdDecisionPolicy { Threshold, Windows, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9555,6 +9792,7 @@ impl<'de> serde::Deserialize<'de> for ThresholdDecisionPolicy { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Vote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9604,6 +9842,7 @@ impl serde::Serialize for Vote { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Vote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9628,6 +9867,7 @@ impl<'de> serde::Deserialize<'de> for Vote { Metadata, SubmitTime, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9729,6 +9969,7 @@ impl<'de> serde::Deserialize<'de> for Vote { deserializer.deserialize_struct("cosmos.group.v1.Vote", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for VoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9745,6 +9986,7 @@ impl serde::Serialize for VoteOption { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for VoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs index fa9198f9..144350a4 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,6 +25,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Minter, Params, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -112,6 +115,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Minter { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -136,6 +140,7 @@ impl serde::Serialize for Minter { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Minter { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -149,6 +154,7 @@ impl<'de> serde::Deserialize<'de> for Minter { Inflation, AnnualProvisions, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -222,6 +228,7 @@ impl<'de> serde::Deserialize<'de> for Minter { deserializer.deserialize_struct("cosmos.mint.v1beta1.Minter", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -274,6 +281,7 @@ impl serde::Serialize for Params { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -304,6 +312,7 @@ impl<'de> serde::Deserialize<'de> for Params { GoalBonded, BlocksPerYear, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -420,6 +429,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.mint.v1beta1.Params", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAnnualProvisionsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -433,6 +443,7 @@ impl serde::Serialize for QueryAnnualProvisionsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -443,6 +454,7 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -499,6 +511,7 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAnnualProvisionsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -522,6 +535,7 @@ impl serde::Serialize for QueryAnnualProvisionsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -534,6 +548,7 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsResponse { enum GeneratedField { AnnualProvisions, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -608,6 +623,7 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryInflationRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -621,6 +637,7 @@ impl serde::Serialize for QueryInflationRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryInflationRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -631,6 +648,7 @@ impl<'de> serde::Deserialize<'de> for QueryInflationRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -687,6 +705,7 @@ impl<'de> serde::Deserialize<'de> for QueryInflationRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryInflationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -710,6 +729,7 @@ impl serde::Serialize for QueryInflationResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryInflationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -722,6 +742,7 @@ impl<'de> serde::Deserialize<'de> for QueryInflationResponse { enum GeneratedField { Inflation, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -794,6 +815,7 @@ impl<'de> serde::Deserialize<'de> for QueryInflationResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -807,6 +829,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -817,6 +840,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -870,6 +894,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -889,6 +914,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -901,6 +927,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs index bb0acab3..06f52f43 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Class { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -53,6 +54,7 @@ impl serde::Serialize for Class { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Class { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -80,6 +82,7 @@ impl<'de> serde::Deserialize<'de> for Class { UriHash, Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -196,6 +199,7 @@ impl<'de> serde::Deserialize<'de> for Class { deserializer.deserialize_struct("cosmos.nft.v1beta1.Class", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Entry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -220,6 +224,7 @@ impl serde::Serialize for Entry { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Entry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -233,6 +238,7 @@ impl<'de> serde::Deserialize<'de> for Entry { Owner, Nfts, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -304,6 +310,7 @@ impl<'de> serde::Deserialize<'de> for Entry { deserializer.deserialize_struct("cosmos.nft.v1beta1.Entry", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventBurn { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -334,6 +341,7 @@ impl serde::Serialize for EventBurn { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventBurn { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -348,6 +356,7 @@ impl<'de> serde::Deserialize<'de> for EventBurn { Id, Owner, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -428,6 +437,7 @@ impl<'de> serde::Deserialize<'de> for EventBurn { deserializer.deserialize_struct("cosmos.nft.v1beta1.EventBurn", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventMint { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -458,6 +468,7 @@ impl serde::Serialize for EventMint { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventMint { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -472,6 +483,7 @@ impl<'de> serde::Deserialize<'de> for EventMint { Id, Owner, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -552,6 +564,7 @@ impl<'de> serde::Deserialize<'de> for EventMint { deserializer.deserialize_struct("cosmos.nft.v1beta1.EventMint", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for EventSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -588,6 +601,7 @@ impl serde::Serialize for EventSend { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for EventSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -603,6 +617,7 @@ impl<'de> serde::Deserialize<'de> for EventSend { Sender, Receiver, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -692,6 +707,7 @@ impl<'de> serde::Deserialize<'de> for EventSend { deserializer.deserialize_struct("cosmos.nft.v1beta1.EventSend", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -716,6 +732,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -729,6 +746,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Classes, Entries, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -800,6 +818,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmos.nft.v1beta1.GenesisState", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -836,6 +855,7 @@ impl serde::Serialize for MsgSend { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -851,6 +871,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { Sender, Receiver, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -940,6 +961,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { deserializer.deserialize_struct("cosmos.nft.v1beta1.MsgSend", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSendResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -952,6 +974,7 @@ impl serde::Serialize for MsgSendResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSendResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -962,6 +985,7 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1015,6 +1039,7 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Nft { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1057,6 +1082,7 @@ impl serde::Serialize for Nft { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Nft { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1075,6 +1101,7 @@ impl<'de> serde::Deserialize<'de> for Nft { UriHash, Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1173,6 +1200,7 @@ impl<'de> serde::Deserialize<'de> for Nft { deserializer.deserialize_struct("cosmos.nft.v1beta1.NFT", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryBalanceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1198,6 +1226,7 @@ impl serde::Serialize for QueryBalanceRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1211,6 +1240,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { ClassId, Owner, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1286,6 +1316,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryBalanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1306,6 +1337,7 @@ impl serde::Serialize for QueryBalanceResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1318,6 +1350,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { enum GeneratedField { Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1390,6 +1423,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryClassRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1409,6 +1443,7 @@ impl serde::Serialize for QueryClassRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryClassRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1421,6 +1456,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassRequest { enum GeneratedField { ClassId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1487,6 +1523,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryClassResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1506,6 +1543,7 @@ impl serde::Serialize for QueryClassResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryClassResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1518,6 +1556,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassResponse { enum GeneratedField { Class, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1582,6 +1621,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryClassesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1601,6 +1641,7 @@ impl serde::Serialize for QueryClassesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryClassesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1613,6 +1654,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassesRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1679,6 +1721,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryClassesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1704,6 +1747,7 @@ impl serde::Serialize for QueryClassesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryClassesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1717,6 +1761,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassesResponse { Classes, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1795,6 +1840,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryNftRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1820,6 +1866,7 @@ impl serde::Serialize for QueryNftRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryNftRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1833,6 +1880,7 @@ impl<'de> serde::Deserialize<'de> for QueryNftRequest { ClassId, Id, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1908,6 +1956,7 @@ impl<'de> serde::Deserialize<'de> for QueryNftRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryNftResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1927,6 +1976,7 @@ impl serde::Serialize for QueryNftResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryNftResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1939,6 +1989,7 @@ impl<'de> serde::Deserialize<'de> for QueryNftResponse { enum GeneratedField { Nft, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2003,6 +2054,7 @@ impl<'de> serde::Deserialize<'de> for QueryNftResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryNfTsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2034,6 +2086,7 @@ impl serde::Serialize for QueryNfTsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryNfTsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2048,6 +2101,7 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsRequest { Owner, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2132,6 +2186,7 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryNfTsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2157,6 +2212,7 @@ impl serde::Serialize for QueryNfTsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryNfTsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2170,6 +2226,7 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsResponse { Nfts, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2245,6 +2302,7 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryOwnerRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2270,6 +2328,7 @@ impl serde::Serialize for QueryOwnerRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryOwnerRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2283,6 +2342,7 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerRequest { ClassId, Id, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2358,6 +2418,7 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryOwnerResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2377,6 +2438,7 @@ impl serde::Serialize for QueryOwnerResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryOwnerResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2389,6 +2451,7 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerResponse { enum GeneratedField { Owner, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2455,6 +2518,7 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySupplyRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2474,6 +2538,7 @@ impl serde::Serialize for QuerySupplyRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySupplyRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2486,6 +2551,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyRequest { enum GeneratedField { ClassId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2552,6 +2618,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySupplyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2572,6 +2639,7 @@ impl serde::Serialize for QuerySupplyResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySupplyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2584,6 +2652,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyResponse { enum GeneratedField { Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs index 2bfe3bc2..f7917f3f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Module { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -11,6 +12,7 @@ impl serde::Serialize for Module { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Module { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -21,6 +23,7 @@ impl<'de> serde::Deserialize<'de> for Module { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs index c81d8cce..7ce975c0 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for PrimaryKeyDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,6 +25,7 @@ impl serde::Serialize for PrimaryKeyDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PrimaryKeyDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for PrimaryKeyDescriptor { Fields, AutoIncrement, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -115,6 +118,7 @@ impl<'de> serde::Deserialize<'de> for PrimaryKeyDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SecondaryIndexDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -146,6 +150,7 @@ impl serde::Serialize for SecondaryIndexDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -160,6 +165,7 @@ impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { Id, Unique, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -250,6 +256,7 @@ impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SingletonDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -269,6 +276,7 @@ impl serde::Serialize for SingletonDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SingletonDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -281,6 +289,7 @@ impl<'de> serde::Deserialize<'de> for SingletonDescriptor { enum GeneratedField { Id, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -350,6 +359,7 @@ impl<'de> serde::Deserialize<'de> for SingletonDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TableDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -380,6 +390,7 @@ impl serde::Serialize for TableDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TableDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -394,6 +405,7 @@ impl<'de> serde::Deserialize<'de> for TableDescriptor { Index, Id, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs index 69276d89..d81677b1 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for ModuleSchemaDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -28,6 +29,7 @@ impl serde::Serialize for ModuleSchemaDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ModuleSchemaDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -41,6 +43,7 @@ impl<'de> serde::Deserialize<'de> for ModuleSchemaDescriptor { SchemaFile, Prefix, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -122,6 +125,7 @@ impl<'de> serde::Deserialize<'de> for ModuleSchemaDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for module_schema_descriptor::FileEntry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -156,6 +160,7 @@ impl serde::Serialize for module_schema_descriptor::FileEntry { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -176,6 +181,7 @@ impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { ProtoFileName, StorageType, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -268,6 +274,7 @@ impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for StorageType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -284,6 +291,7 @@ impl serde::Serialize for StorageType { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for StorageType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs index 52aaff35..a7a4a22e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for ParamChange { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -30,6 +31,7 @@ impl serde::Serialize for ParamChange { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ParamChange { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -44,6 +46,7 @@ impl<'de> serde::Deserialize<'de> for ParamChange { Key, Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -128,6 +131,7 @@ impl<'de> serde::Deserialize<'de> for ParamChange { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ParameterChangeProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -159,6 +163,7 @@ impl serde::Serialize for ParameterChangeProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -173,6 +178,7 @@ impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { Description, Changes, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -260,6 +266,7 @@ impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -285,6 +292,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -298,6 +306,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { Subspace, Key, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -373,6 +382,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -392,6 +402,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -404,6 +415,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Param, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -468,6 +480,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySubspacesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -481,6 +494,7 @@ impl serde::Serialize for QuerySubspacesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySubspacesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -491,6 +505,7 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -547,6 +562,7 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySubspacesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -566,6 +582,7 @@ impl serde::Serialize for QuerySubspacesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySubspacesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -578,6 +595,7 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesResponse { enum GeneratedField { Subspaces, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -647,6 +665,7 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Subspace { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -671,6 +690,7 @@ impl serde::Serialize for Subspace { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Subspace { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -684,6 +704,7 @@ impl<'de> serde::Deserialize<'de> for Subspace { Subspace, Keys, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs index 20e33e28..42274574 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -30,6 +31,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -50,6 +52,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { SigningInfos, MissedBlocks, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -134,6 +137,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MissedBlock { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -160,6 +164,7 @@ impl serde::Serialize for MissedBlock { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MissedBlock { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -173,6 +178,7 @@ impl<'de> serde::Deserialize<'de> for MissedBlock { Index, Missed, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -251,6 +257,7 @@ impl<'de> serde::Deserialize<'de> for MissedBlock { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUnjail { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -270,6 +277,7 @@ impl serde::Serialize for MsgUnjail { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUnjail { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -282,6 +290,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnjail { enum GeneratedField { ValidatorAddr, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -348,6 +357,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnjail { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUnjailResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -361,6 +371,7 @@ impl serde::Serialize for MsgUnjailResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUnjailResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -371,6 +382,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnjailResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -424,6 +436,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnjailResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -482,6 +495,7 @@ impl serde::Serialize for Params { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -509,6 +523,7 @@ impl<'de> serde::Deserialize<'de> for Params { SlashFractionDoubleSign, SlashFractionDowntime, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -639,6 +654,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.slashing.v1beta1.Params", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -652,6 +668,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -662,6 +679,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -715,6 +733,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -734,6 +753,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -746,6 +766,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -810,6 +831,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySigningInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -829,6 +851,7 @@ impl serde::Serialize for QuerySigningInfoRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySigningInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -841,6 +864,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoRequest { enum GeneratedField { ConsAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -910,6 +934,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySigningInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -929,6 +954,7 @@ impl serde::Serialize for QuerySigningInfoResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySigningInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -941,6 +967,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoResponse { enum GeneratedField { ValSigningInfo, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1012,6 +1039,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySigningInfosRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1031,6 +1059,7 @@ impl serde::Serialize for QuerySigningInfosRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySigningInfosRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1043,6 +1072,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1112,6 +1142,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySigningInfosResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1137,6 +1168,7 @@ impl serde::Serialize for QuerySigningInfosResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySigningInfosResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1150,6 +1182,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosResponse { Info, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1228,6 +1261,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SigningInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1253,6 +1287,7 @@ impl serde::Serialize for SigningInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SigningInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1266,6 +1301,7 @@ impl<'de> serde::Deserialize<'de> for SigningInfo { Address, ValidatorSigningInfo, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1345,6 +1381,7 @@ impl<'de> serde::Deserialize<'de> for SigningInfo { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorMissedBlocks { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1370,6 +1407,7 @@ impl serde::Serialize for ValidatorMissedBlocks { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorMissedBlocks { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1383,6 +1421,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorMissedBlocks { Address, MissedBlocks, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1461,6 +1500,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorMissedBlocks { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValidatorSigningInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1522,6 +1562,7 @@ impl serde::Serialize for ValidatorSigningInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1550,6 +1591,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { Tombstoned, MissedBlocksCounter, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs index c8d8c3a9..a31573a8 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for AuthorizationType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -14,6 +15,7 @@ impl serde::Serialize for AuthorizationType { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AuthorizationType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -76,6 +78,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizationType { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for BondStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -91,6 +94,7 @@ impl serde::Serialize for BondStatus { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for BondStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -153,6 +157,7 @@ impl<'de> serde::Deserialize<'de> for BondStatus { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Commission { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -178,6 +183,7 @@ impl serde::Serialize for Commission { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Commission { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -196,6 +202,7 @@ impl<'de> serde::Deserialize<'de> for Commission { CommissionRates, UpdateTime, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -273,6 +280,7 @@ impl<'de> serde::Deserialize<'de> for Commission { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for CommissionRates { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -304,6 +312,7 @@ impl serde::Serialize for CommissionRates { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CommissionRates { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -324,6 +333,7 @@ impl<'de> serde::Deserialize<'de> for CommissionRates { MaxRate, MaxChangeRate, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -410,6 +420,7 @@ impl<'de> serde::Deserialize<'de> for CommissionRates { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DvPair { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -434,6 +445,7 @@ impl serde::Serialize for DvPair { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DvPair { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -452,6 +464,7 @@ impl<'de> serde::Deserialize<'de> for DvPair { DelegatorAddress, ValidatorAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -527,6 +540,7 @@ impl<'de> serde::Deserialize<'de> for DvPair { deserializer.deserialize_struct("cosmos.staking.v1beta1.DVPair", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DvPairs { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -545,6 +559,7 @@ impl serde::Serialize for DvPairs { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DvPairs { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -557,6 +572,7 @@ impl<'de> serde::Deserialize<'de> for DvPairs { enum GeneratedField { Pairs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -619,6 +635,7 @@ impl<'de> serde::Deserialize<'de> for DvPairs { deserializer.deserialize_struct("cosmos.staking.v1beta1.DVPairs", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DvvTriplet { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -650,6 +667,7 @@ impl serde::Serialize for DvvTriplet { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DvvTriplet { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -671,6 +689,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplet { ValidatorSrcAddress, ValidatorDstAddress, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -765,6 +784,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplet { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DvvTriplets { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -784,6 +804,7 @@ impl serde::Serialize for DvvTriplets { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DvvTriplets { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -796,6 +817,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplets { enum GeneratedField { Triplets, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -862,6 +884,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplets { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Delegation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -893,6 +916,7 @@ impl serde::Serialize for Delegation { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Delegation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -913,6 +937,7 @@ impl<'de> serde::Deserialize<'de> for Delegation { ValidatorAddress, Shares, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1001,6 +1026,7 @@ impl<'de> serde::Deserialize<'de> for Delegation { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1026,6 +1052,7 @@ impl serde::Serialize for DelegationResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1039,6 +1066,7 @@ impl<'de> serde::Deserialize<'de> for DelegationResponse { Delegation, Balance, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1114,6 +1142,7 @@ impl<'de> serde::Deserialize<'de> for DelegationResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Description { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1157,6 +1186,7 @@ impl serde::Serialize for Description { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Description { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1180,6 +1210,7 @@ impl<'de> serde::Deserialize<'de> for Description { SecurityContact, Details, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1284,6 +1315,7 @@ impl<'de> serde::Deserialize<'de> for Description { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1349,6 +1381,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1380,6 +1413,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Redelegations, Exported, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1522,6 +1556,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for HistoricalInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1547,6 +1582,7 @@ impl serde::Serialize for HistoricalInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for HistoricalInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1560,6 +1596,7 @@ impl<'de> serde::Deserialize<'de> for HistoricalInfo { Header, Valset, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1635,6 +1672,7 @@ impl<'de> serde::Deserialize<'de> for HistoricalInfo { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for LastValidatorPower { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1661,6 +1699,7 @@ impl serde::Serialize for LastValidatorPower { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for LastValidatorPower { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1674,6 +1713,7 @@ impl<'de> serde::Deserialize<'de> for LastValidatorPower { Address, Power, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1752,6 +1792,7 @@ impl<'de> serde::Deserialize<'de> for LastValidatorPower { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgBeginRedelegate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1789,6 +1830,7 @@ impl serde::Serialize for MsgBeginRedelegate { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1812,6 +1854,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { ValidatorDstAddress, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1915,6 +1958,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgBeginRedelegateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1934,6 +1978,7 @@ impl serde::Serialize for MsgBeginRedelegateResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1946,6 +1991,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { enum GeneratedField { CompletionTime, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2017,6 +2063,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCancelUnbondingDelegation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2058,6 +2105,7 @@ impl serde::Serialize for MsgCancelUnbondingDelegation { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2081,6 +2129,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { Amount, CreationHeight, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2186,6 +2235,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCancelUnbondingDelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2201,6 +2251,7 @@ impl serde::Serialize for MsgCancelUnbondingDelegationResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2211,6 +2262,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2268,6 +2320,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateValidator { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2323,6 +2376,7 @@ impl serde::Serialize for MsgCreateValidator { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateValidator { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2352,6 +2406,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidator { Pubkey, Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2478,6 +2533,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidator { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateValidatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2491,6 +2547,7 @@ impl serde::Serialize for MsgCreateValidatorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2501,6 +2558,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2557,6 +2615,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgDelegate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2588,6 +2647,7 @@ impl serde::Serialize for MsgDelegate { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgDelegate { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2608,6 +2668,7 @@ impl<'de> serde::Deserialize<'de> for MsgDelegate { ValidatorAddress, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2696,6 +2757,7 @@ impl<'de> serde::Deserialize<'de> for MsgDelegate { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgDelegateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2709,6 +2771,7 @@ impl serde::Serialize for MsgDelegateResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2719,6 +2782,7 @@ impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2772,6 +2836,7 @@ impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgEditValidator { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2809,6 +2874,7 @@ impl serde::Serialize for MsgEditValidator { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgEditValidator { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2832,6 +2898,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidator { CommissionRate, MinSelfDelegation, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2931,6 +2998,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidator { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgEditValidatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2944,6 +3012,7 @@ impl serde::Serialize for MsgEditValidatorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2954,6 +3023,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3010,6 +3080,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUndelegate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3041,6 +3112,7 @@ impl serde::Serialize for MsgUndelegate { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUndelegate { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3061,6 +3133,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegate { ValidatorAddress, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3149,6 +3222,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegate { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUndelegateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3168,6 +3242,7 @@ impl serde::Serialize for MsgUndelegateResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3180,6 +3255,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { enum GeneratedField { CompletionTime, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3251,6 +3327,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3299,6 +3376,7 @@ impl serde::Serialize for Params { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3329,6 +3407,7 @@ impl<'de> serde::Deserialize<'de> for Params { BondDenom, MinCommissionRate, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3449,6 +3528,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.staking.v1beta1.Params", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Pool { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3473,6 +3553,7 @@ impl serde::Serialize for Pool { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Pool { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3491,6 +3572,7 @@ impl<'de> serde::Deserialize<'de> for Pool { NotBondedTokens, BondedTokens, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3564,6 +3646,7 @@ impl<'de> serde::Deserialize<'de> for Pool { deserializer.deserialize_struct("cosmos.staking.v1beta1.Pool", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegationRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3589,6 +3672,7 @@ impl serde::Serialize for QueryDelegationRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3607,6 +3691,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { DelegatorAddr, ValidatorAddr, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3685,6 +3770,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3704,6 +3790,7 @@ impl serde::Serialize for QueryDelegationResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3716,6 +3803,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { enum GeneratedField { DelegationResponse, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3789,6 +3877,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorDelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3816,6 +3905,7 @@ impl serde::Serialize for QueryDelegatorDelegationsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3829,6 +3919,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { DelegatorAddr, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3908,6 +3999,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorDelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3935,6 +4027,7 @@ impl serde::Serialize for QueryDelegatorDelegationsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3948,6 +4041,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { DelegationResponses, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4031,6 +4125,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorUnbondingDelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4058,6 +4153,7 @@ impl serde::Serialize for QueryDelegatorUnbondingDelegationsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4071,6 +4167,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest DelegatorAddr, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4151,6 +4248,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorUnbondingDelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4178,6 +4276,7 @@ impl serde::Serialize for QueryDelegatorUnbondingDelegationsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4191,6 +4290,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse UnbondingResponses, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4275,6 +4375,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorValidatorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4300,6 +4401,7 @@ impl serde::Serialize for QueryDelegatorValidatorRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4318,6 +4420,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { DelegatorAddr, ValidatorAddr, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4396,6 +4499,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorValidatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4417,6 +4521,7 @@ impl serde::Serialize for QueryDelegatorValidatorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4429,6 +4534,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { enum GeneratedField { Validator, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4498,6 +4604,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorValidatorsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4525,6 +4632,7 @@ impl serde::Serialize for QueryDelegatorValidatorsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4538,6 +4646,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { DelegatorAddr, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4616,6 +4725,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryDelegatorValidatorsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4643,6 +4753,7 @@ impl serde::Serialize for QueryDelegatorValidatorsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4656,6 +4767,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { Validators, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4735,6 +4847,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryHistoricalInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4755,6 +4868,7 @@ impl serde::Serialize for QueryHistoricalInfoRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4767,6 +4881,7 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { enum GeneratedField { Height, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4839,6 +4954,7 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryHistoricalInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4858,6 +4974,7 @@ impl serde::Serialize for QueryHistoricalInfoResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4870,6 +4987,7 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { enum GeneratedField { Hist, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4937,6 +5055,7 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4950,6 +5069,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4960,6 +5080,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5013,6 +5134,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5032,6 +5154,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5044,6 +5167,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5108,6 +5232,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryPoolRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5121,6 +5246,7 @@ impl serde::Serialize for QueryPoolRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryPoolRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5131,6 +5257,7 @@ impl<'de> serde::Deserialize<'de> for QueryPoolRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5184,6 +5311,7 @@ impl<'de> serde::Deserialize<'de> for QueryPoolRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryPoolResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5203,6 +5331,7 @@ impl serde::Serialize for QueryPoolResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryPoolResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5215,6 +5344,7 @@ impl<'de> serde::Deserialize<'de> for QueryPoolResponse { enum GeneratedField { Pool, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5279,6 +5409,7 @@ impl<'de> serde::Deserialize<'de> for QueryPoolResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryRedelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5316,6 +5447,7 @@ impl serde::Serialize for QueryRedelegationsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5339,6 +5471,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { DstValidatorAddr, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5439,6 +5572,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryRedelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5464,6 +5598,7 @@ impl serde::Serialize for QueryRedelegationsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5481,6 +5616,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { RedelegationResponses, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5563,6 +5699,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryUnbondingDelegationRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5590,6 +5727,7 @@ impl serde::Serialize for QueryUnbondingDelegationRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5608,6 +5746,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { DelegatorAddr, ValidatorAddr, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5686,6 +5825,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryUnbondingDelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5707,6 +5847,7 @@ impl serde::Serialize for QueryUnbondingDelegationResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5719,6 +5860,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { enum GeneratedField { Unbond, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5787,6 +5929,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorDelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5814,6 +5957,7 @@ impl serde::Serialize for QueryValidatorDelegationsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5827,6 +5971,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { ValidatorAddr, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5906,6 +6051,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorDelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5933,6 +6079,7 @@ impl serde::Serialize for QueryValidatorDelegationsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5946,6 +6093,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { DelegationResponses, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6029,6 +6177,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6048,6 +6197,7 @@ impl serde::Serialize for QueryValidatorRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6060,6 +6210,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { enum GeneratedField { ValidatorAddr, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6129,6 +6280,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6148,6 +6300,7 @@ impl serde::Serialize for QueryValidatorResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6160,6 +6313,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { enum GeneratedField { Validator, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6229,6 +6383,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorUnbondingDelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6256,6 +6411,7 @@ impl serde::Serialize for QueryValidatorUnbondingDelegationsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6269,6 +6425,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest ValidatorAddr, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6349,6 +6506,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorUnbondingDelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6376,6 +6534,7 @@ impl serde::Serialize for QueryValidatorUnbondingDelegationsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6389,6 +6548,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse UnbondingResponses, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6473,6 +6633,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6498,6 +6659,7 @@ impl serde::Serialize for QueryValidatorsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6511,6 +6673,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { Status, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6589,6 +6752,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryValidatorsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6614,6 +6778,7 @@ impl serde::Serialize for QueryValidatorsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6627,6 +6792,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { Validators, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6705,6 +6871,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Redelegation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6742,6 +6909,7 @@ impl serde::Serialize for Redelegation { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Redelegation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6765,6 +6933,7 @@ impl<'de> serde::Deserialize<'de> for Redelegation { ValidatorDstAddress, Entries, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6868,6 +7037,7 @@ impl<'de> serde::Deserialize<'de> for Redelegation { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for RedelegationEntry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6909,6 +7079,7 @@ impl serde::Serialize for RedelegationEntry { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for RedelegationEntry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6933,6 +7104,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntry { InitialBalance, SharesDst, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7035,6 +7207,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntry { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for RedelegationEntryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7060,6 +7233,7 @@ impl serde::Serialize for RedelegationEntryResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7073,6 +7247,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { RedelegationEntry, Balance, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7153,6 +7328,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for RedelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7178,6 +7354,7 @@ impl serde::Serialize for RedelegationResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for RedelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7191,6 +7368,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationResponse { Redelegation, Entries, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7269,6 +7447,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for StakeAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7310,6 +7489,7 @@ impl serde::Serialize for StakeAuthorization { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for StakeAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7334,6 +7514,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { AllowList, DenyList, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7432,6 +7613,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for stake_authorization::Validators { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7451,6 +7633,7 @@ impl serde::Serialize for stake_authorization::Validators { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7463,6 +7646,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { enum GeneratedField { Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7532,6 +7716,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for UnbondingDelegation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7563,6 +7748,7 @@ impl serde::Serialize for UnbondingDelegation { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for UnbondingDelegation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7583,6 +7769,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegation { ValidatorAddress, Entries, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7671,6 +7858,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegation { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for UnbondingDelegationEntry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7712,6 +7900,7 @@ impl serde::Serialize for UnbondingDelegationEntry { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7735,6 +7924,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { InitialBalance, Balance, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7840,6 +8030,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ValAddresses { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7859,6 +8050,7 @@ impl serde::Serialize for ValAddresses { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ValAddresses { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7871,6 +8063,7 @@ impl<'de> serde::Deserialize<'de> for ValAddresses { enum GeneratedField { Addresses, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7937,6 +8130,7 @@ impl<'de> serde::Deserialize<'de> for ValAddresses { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Validator { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8023,6 +8217,7 @@ impl serde::Serialize for Validator { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Validator { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8063,6 +8258,7 @@ impl<'de> serde::Deserialize<'de> for Validator { Commission, MinSelfDelegation, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs index a4319c36..ae3a4e5c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for SignMode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -16,6 +17,7 @@ impl serde::Serialize for SignMode { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SignMode { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -82,6 +84,7 @@ impl<'de> serde::Deserialize<'de> for SignMode { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SignatureDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -114,6 +117,7 @@ impl serde::Serialize for SignatureDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SignatureDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -128,6 +132,7 @@ impl<'de> serde::Deserialize<'de> for SignatureDescriptor { Data, Sequence, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -215,6 +220,7 @@ impl<'de> serde::Deserialize<'de> for SignatureDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for signature_descriptor::Data { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -241,6 +247,7 @@ impl serde::Serialize for signature_descriptor::Data { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -254,6 +261,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { Single, Multi, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -332,6 +340,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for signature_descriptor::data::Multi { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -359,6 +368,7 @@ impl serde::Serialize for signature_descriptor::data::Multi { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -372,6 +382,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { Bitarray, Signatures, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -451,6 +462,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for signature_descriptor::data::Single { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -484,6 +496,7 @@ impl serde::Serialize for signature_descriptor::data::Single { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -497,6 +510,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { Mode, Signature, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -579,6 +593,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SignatureDescriptors { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -598,6 +613,7 @@ impl serde::Serialize for SignatureDescriptors { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SignatureDescriptors { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -610,6 +626,7 @@ impl<'de> serde::Deserialize<'de> for SignatureDescriptors { enum GeneratedField { Signatures, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs index 5f3702ca..ce7e2c7b 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for AuthInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -29,6 +30,7 @@ impl serde::Serialize for AuthInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AuthInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -43,6 +45,7 @@ impl<'de> serde::Deserialize<'de> for AuthInfo { Fee, Tip, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -123,6 +126,7 @@ impl<'de> serde::Deserialize<'de> for AuthInfo { deserializer.deserialize_struct("cosmos.tx.v1beta1.AuthInfo", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AuxSignerData { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -163,6 +167,7 @@ impl serde::Serialize for AuxSignerData { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AuxSignerData { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -178,6 +183,7 @@ impl<'de> serde::Deserialize<'de> for AuxSignerData { Mode, Sig, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -272,6 +278,7 @@ impl<'de> serde::Deserialize<'de> for AuxSignerData { deserializer.deserialize_struct("cosmos.tx.v1beta1.AuxSignerData", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for BroadcastMode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -287,6 +294,7 @@ impl serde::Serialize for BroadcastMode { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for BroadcastMode { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -349,6 +357,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastMode { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for BroadcastTxRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -380,6 +389,7 @@ impl serde::Serialize for BroadcastTxRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -393,6 +403,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { TxBytes, Mode, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -471,6 +482,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for BroadcastTxResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -490,6 +502,7 @@ impl serde::Serialize for BroadcastTxResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for BroadcastTxResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -502,6 +515,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxResponse { enum GeneratedField { TxResponse, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -568,6 +582,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Fee { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -606,6 +621,7 @@ impl serde::Serialize for Fee { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Fee { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -621,6 +637,7 @@ impl<'de> serde::Deserialize<'de> for Fee { Payer, Granter, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -713,6 +730,7 @@ impl<'de> serde::Deserialize<'de> for Fee { deserializer.deserialize_struct("cosmos.tx.v1beta1.Fee", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetBlockWithTxsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -739,6 +757,7 @@ impl serde::Serialize for GetBlockWithTxsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -752,6 +771,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { Height, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -833,6 +853,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetBlockWithTxsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -870,6 +891,7 @@ impl serde::Serialize for GetBlockWithTxsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -885,6 +907,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { Block, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -981,6 +1004,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetTxRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -999,6 +1023,7 @@ impl serde::Serialize for GetTxRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetTxRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1011,6 +1036,7 @@ impl<'de> serde::Deserialize<'de> for GetTxRequest { enum GeneratedField { Hash, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1073,6 +1099,7 @@ impl<'de> serde::Deserialize<'de> for GetTxRequest { deserializer.deserialize_struct("cosmos.tx.v1beta1.GetTxRequest", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetTxResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1097,6 +1124,7 @@ impl serde::Serialize for GetTxResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetTxResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1110,6 +1138,7 @@ impl<'de> serde::Deserialize<'de> for GetTxResponse { Tx, TxResponse, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1181,6 +1210,7 @@ impl<'de> serde::Deserialize<'de> for GetTxResponse { deserializer.deserialize_struct("cosmos.tx.v1beta1.GetTxResponse", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetTxsEventRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1229,6 +1259,7 @@ impl serde::Serialize for GetTxsEventRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1252,6 +1283,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { Page, Limit, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1360,6 +1392,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GetTxsEventResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1398,6 +1431,7 @@ impl serde::Serialize for GetTxsEventResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1413,6 +1447,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { Pagination, Total, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1509,6 +1544,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ModeInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1534,6 +1570,7 @@ impl serde::Serialize for ModeInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ModeInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1547,6 +1584,7 @@ impl<'de> serde::Deserialize<'de> for ModeInfo { Single, Multi, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1618,6 +1656,7 @@ impl<'de> serde::Deserialize<'de> for ModeInfo { deserializer.deserialize_struct("cosmos.tx.v1beta1.ModeInfo", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for mode_info::Multi { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1643,6 +1682,7 @@ impl serde::Serialize for mode_info::Multi { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for mode_info::Multi { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1656,6 +1696,7 @@ impl<'de> serde::Deserialize<'de> for mode_info::Multi { Bitarray, ModeInfos, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1731,6 +1772,7 @@ impl<'de> serde::Deserialize<'de> for mode_info::Multi { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for mode_info::Single { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1752,6 +1794,7 @@ impl serde::Serialize for mode_info::Single { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for mode_info::Single { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1764,6 +1807,7 @@ impl<'de> serde::Deserialize<'de> for mode_info::Single { enum GeneratedField { Mode, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1832,6 +1876,7 @@ impl<'de> serde::Deserialize<'de> for mode_info::Single { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for OrderBy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1846,6 +1891,7 @@ impl serde::Serialize for OrderBy { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for OrderBy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1902,6 +1948,7 @@ impl<'de> serde::Deserialize<'de> for OrderBy { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SignDoc { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1950,6 +1997,7 @@ impl serde::Serialize for SignDoc { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SignDoc { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1974,6 +2022,7 @@ impl<'de> serde::Deserialize<'de> for SignDoc { ChainId, AccountNumber, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2074,6 +2123,7 @@ impl<'de> serde::Deserialize<'de> for SignDoc { deserializer.deserialize_struct("cosmos.tx.v1beta1.SignDoc", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SignDocDirectAux { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2132,6 +2182,7 @@ impl serde::Serialize for SignDocDirectAux { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SignDocDirectAux { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2160,6 +2211,7 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { Sequence, Tip, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2280,6 +2332,7 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SignerInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2311,6 +2364,7 @@ impl serde::Serialize for SignerInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SignerInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2331,6 +2385,7 @@ impl<'de> serde::Deserialize<'de> for SignerInfo { ModeInfo, Sequence, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2414,6 +2469,7 @@ impl<'de> serde::Deserialize<'de> for SignerInfo { deserializer.deserialize_struct("cosmos.tx.v1beta1.SignerInfo", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SimulateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2443,6 +2499,7 @@ impl serde::Serialize for SimulateRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SimulateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2456,6 +2513,7 @@ impl<'de> serde::Deserialize<'de> for SimulateRequest { Tx, TxBytes, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2534,6 +2592,7 @@ impl<'de> serde::Deserialize<'de> for SimulateRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SimulateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2559,6 +2618,7 @@ impl serde::Serialize for SimulateResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SimulateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2572,6 +2632,7 @@ impl<'de> serde::Deserialize<'de> for SimulateResponse { GasInfo, Result, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2647,6 +2708,7 @@ impl<'de> serde::Deserialize<'de> for SimulateResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Tip { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2671,6 +2733,7 @@ impl serde::Serialize for Tip { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Tip { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2684,6 +2747,7 @@ impl<'de> serde::Deserialize<'de> for Tip { Amount, Tipper, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2755,6 +2819,7 @@ impl<'de> serde::Deserialize<'de> for Tip { deserializer.deserialize_struct("cosmos.tx.v1beta1.Tip", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Tx { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2792,6 +2857,7 @@ impl serde::Serialize for Tx { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Tx { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2806,6 +2872,7 @@ impl<'de> serde::Deserialize<'de> for Tx { AuthInfo, Signatures, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2891,6 +2958,7 @@ impl<'de> serde::Deserialize<'de> for Tx { deserializer.deserialize_struct("cosmos.tx.v1beta1.Tx", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TxBody { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2940,6 +3008,7 @@ impl serde::Serialize for TxBody { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TxBody { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2965,6 +3034,7 @@ impl<'de> serde::Deserialize<'de> for TxBody { ExtensionOptions, NonCriticalExtensionOptions, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3073,6 +3143,7 @@ impl<'de> serde::Deserialize<'de> for TxBody { deserializer.deserialize_struct("cosmos.tx.v1beta1.TxBody", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for TxRaw { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3118,6 +3189,7 @@ impl serde::Serialize for TxRaw { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for TxRaw { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3138,6 +3210,7 @@ impl<'de> serde::Deserialize<'de> for TxRaw { AuthInfoBytes, Signatures, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs index 3de767c7..fbfae25f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for CancelSoftwareUpgradeProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,6 +25,7 @@ impl serde::Serialize for CancelSoftwareUpgradeProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { Title, Description, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -115,6 +118,7 @@ impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ModuleVersion { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -141,6 +145,7 @@ impl serde::Serialize for ModuleVersion { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ModuleVersion { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -154,6 +159,7 @@ impl<'de> serde::Deserialize<'de> for ModuleVersion { Name, Version, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -232,6 +238,7 @@ impl<'de> serde::Deserialize<'de> for ModuleVersion { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCancelUpgrade { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -251,6 +258,7 @@ impl serde::Serialize for MsgCancelUpgrade { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -263,6 +271,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { enum GeneratedField { Authority, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -329,6 +338,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCancelUpgradeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -342,6 +352,7 @@ impl serde::Serialize for MsgCancelUpgradeResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -352,6 +363,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -408,6 +420,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSoftwareUpgrade { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -433,6 +446,7 @@ impl serde::Serialize for MsgSoftwareUpgrade { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -446,6 +460,7 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { Authority, Plan, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -521,6 +536,7 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgSoftwareUpgradeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -534,6 +550,7 @@ impl serde::Serialize for MsgSoftwareUpgradeResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -544,6 +561,7 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -600,6 +618,7 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Plan { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -643,6 +662,7 @@ impl serde::Serialize for Plan { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Plan { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -666,6 +686,7 @@ impl<'de> serde::Deserialize<'de> for Plan { Info, UpgradedClientState, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -771,6 +792,7 @@ impl<'de> serde::Deserialize<'de> for Plan { deserializer.deserialize_struct("cosmos.upgrade.v1beta1.Plan", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAppliedPlanRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -790,6 +812,7 @@ impl serde::Serialize for QueryAppliedPlanRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -802,6 +825,7 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { enum GeneratedField { Name, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -871,6 +895,7 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAppliedPlanResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -891,6 +916,7 @@ impl serde::Serialize for QueryAppliedPlanResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -903,6 +929,7 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { enum GeneratedField { Height, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -975,6 +1002,7 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAuthorityRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -988,6 +1016,7 @@ impl serde::Serialize for QueryAuthorityRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -998,6 +1027,7 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1054,6 +1084,7 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAuthorityResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1073,6 +1104,7 @@ impl serde::Serialize for QueryAuthorityResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1085,6 +1117,7 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { enum GeneratedField { Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1154,6 +1187,7 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryCurrentPlanRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1167,6 +1201,7 @@ impl serde::Serialize for QueryCurrentPlanRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1177,6 +1212,7 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1233,6 +1269,7 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryCurrentPlanResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1252,6 +1289,7 @@ impl serde::Serialize for QueryCurrentPlanResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1264,6 +1302,7 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { enum GeneratedField { Plan, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1331,6 +1370,7 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryModuleVersionsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1350,6 +1390,7 @@ impl serde::Serialize for QueryModuleVersionsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1362,6 +1403,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { enum GeneratedField { ModuleName, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1431,6 +1473,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryModuleVersionsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1450,6 +1493,7 @@ impl serde::Serialize for QueryModuleVersionsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1462,6 +1506,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { enum GeneratedField { ModuleVersions, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1533,6 +1578,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryUpgradedConsensusStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1558,6 +1604,7 @@ impl serde::Serialize for QueryUpgradedConsensusStateRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1570,6 +1617,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { enum GeneratedField { LastHeight, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1643,6 +1691,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryUpgradedConsensusStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1668,6 +1717,7 @@ impl serde::Serialize for QueryUpgradedConsensusStateResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1680,6 +1730,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { enum GeneratedField { UpgradedConsensusState, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1757,6 +1808,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SoftwareUpgradeProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1788,6 +1840,7 @@ impl serde::Serialize for SoftwareUpgradeProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SoftwareUpgradeProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1802,6 +1855,7 @@ impl<'de> serde::Deserialize<'de> for SoftwareUpgradeProposal { Description, Plan, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs index 6e01cf4e..35708862 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for BaseVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -43,6 +44,7 @@ impl serde::Serialize for BaseVestingAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for BaseVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -70,6 +72,7 @@ impl<'de> serde::Deserialize<'de> for BaseVestingAccount { DelegatedVesting, EndTime, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -179,6 +182,7 @@ impl<'de> serde::Deserialize<'de> for BaseVestingAccount { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ContinuousVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -206,6 +210,7 @@ impl serde::Serialize for ContinuousVestingAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -224,6 +229,7 @@ impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { BaseVestingAccount, StartTime, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -309,6 +315,7 @@ impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DelayedVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -328,6 +335,7 @@ impl serde::Serialize for DelayedVestingAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -340,6 +348,7 @@ impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { enum GeneratedField { BaseVestingAccount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -413,6 +422,7 @@ impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreatePeriodicVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -454,6 +464,7 @@ impl serde::Serialize for MsgCreatePeriodicVestingAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -478,6 +489,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { StartTime, VestingPeriods, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -579,6 +591,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreatePeriodicVestingAccountResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -594,6 +607,7 @@ impl serde::Serialize for MsgCreatePeriodicVestingAccountResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccountResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -604,6 +618,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccountResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -662,6 +677,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccountResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreatePermanentLockedAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -695,6 +711,7 @@ impl serde::Serialize for MsgCreatePermanentLockedAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -715,6 +732,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { ToAddress, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -802,6 +820,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreatePermanentLockedAccountResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -817,6 +836,7 @@ impl serde::Serialize for MsgCreatePermanentLockedAccountResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccountResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -827,6 +847,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccountResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -885,6 +906,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccountResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -929,6 +951,7 @@ impl serde::Serialize for MsgCreateVestingAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -954,6 +977,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { EndTime, Delayed, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1062,6 +1086,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgCreateVestingAccountResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1077,6 +1102,7 @@ impl serde::Serialize for MsgCreateVestingAccountResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccountResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1087,6 +1113,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccountResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1143,6 +1170,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccountResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Period { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1168,6 +1196,7 @@ impl serde::Serialize for Period { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Period { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1181,6 +1210,7 @@ impl<'de> serde::Deserialize<'de> for Period { Length, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1255,6 +1285,7 @@ impl<'de> serde::Deserialize<'de> for Period { deserializer.deserialize_struct("cosmos.vesting.v1beta1.Period", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PeriodicVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1288,6 +1319,7 @@ impl serde::Serialize for PeriodicVestingAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1309,6 +1341,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { StartTime, VestingPeriods, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1405,6 +1438,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PermanentLockedAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1424,6 +1458,7 @@ impl serde::Serialize for PermanentLockedAccount { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PermanentLockedAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1436,6 +1471,7 @@ impl<'de> serde::Deserialize<'de> for PermanentLockedAccount { enum GeneratedField { BaseVestingAccount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs index dde23d28..9628d2fc 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for InterfaceDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,6 +25,7 @@ impl serde::Serialize for InterfaceDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { Name, Description, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -112,6 +115,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ScalarDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -151,6 +155,7 @@ impl serde::Serialize for ScalarDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ScalarDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -165,6 +170,7 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { Description, FieldType, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -250,6 +256,7 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { deserializer.deserialize_struct("cosmos_proto.ScalarDescriptor", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ScalarType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -264,6 +271,7 @@ impl serde::Serialize for ScalarType { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ScalarType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs index a0a7ca8d..650edac4 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for PageRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -46,6 +47,7 @@ impl serde::Serialize for PageRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PageRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -69,6 +71,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { CountTotal, Reverse, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -180,6 +183,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PageResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -210,6 +214,7 @@ impl serde::Serialize for PageResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PageResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -223,6 +228,7 @@ impl<'de> serde::Deserialize<'de> for PageResponse { NextKey, Total, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs index a9daa350..63cadeef 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for Coin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -23,6 +24,7 @@ impl serde::Serialize for Coin { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Coin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -36,6 +38,7 @@ impl<'de> serde::Deserialize<'de> for Coin { Denom, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -107,6 +110,7 @@ impl<'de> serde::Deserialize<'de> for Coin { deserializer.deserialize_struct("cosmos.base.v1beta1.Coin", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DecCoin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -131,6 +135,7 @@ impl serde::Serialize for DecCoin { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DecCoin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -144,6 +149,7 @@ impl<'de> serde::Deserialize<'de> for DecCoin { Denom, Amount, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -215,6 +221,7 @@ impl<'de> serde::Deserialize<'de> for DecCoin { deserializer.deserialize_struct("cosmos.base.v1beta1.DecCoin", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for DecProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -233,6 +240,7 @@ impl serde::Serialize for DecProto { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for DecProto { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -245,6 +253,7 @@ impl<'de> serde::Deserialize<'de> for DecProto { enum GeneratedField { Dec, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -307,6 +316,7 @@ impl<'de> serde::Deserialize<'de> for DecProto { deserializer.deserialize_struct("cosmos.base.v1beta1.DecProto", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for IntProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -325,6 +335,7 @@ impl serde::Serialize for IntProto { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for IntProto { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -337,6 +348,7 @@ impl<'de> serde::Deserialize<'de> for IntProto { enum GeneratedField { Int, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs index dde23d28..9628d2fc 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for InterfaceDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,6 +25,7 @@ impl serde::Serialize for InterfaceDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -37,6 +39,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { Name, Description, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -112,6 +115,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ScalarDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -151,6 +155,7 @@ impl serde::Serialize for ScalarDescriptor { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ScalarDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -165,6 +170,7 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { Description, FieldType, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -250,6 +256,7 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { deserializer.deserialize_struct("cosmos_proto.ScalarDescriptor", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ScalarType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -264,6 +271,7 @@ impl serde::Serialize for ScalarType { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ScalarType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs index 553922eb..e3ba95df 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs @@ -1,4 +1,5 @@ // @generated +#[cfg(feature = "serialization")] impl serde::Serialize for AbsoluteTxPosition { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -29,6 +30,7 @@ impl serde::Serialize for AbsoluteTxPosition { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -42,6 +44,7 @@ impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { BlockHeight, TxIndex, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -123,6 +126,7 @@ impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AccessConfig { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -156,6 +160,7 @@ impl serde::Serialize for AccessConfig { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AccessConfig { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -170,6 +175,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { Address, Addresses, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -250,6 +256,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { deserializer.deserialize_struct("cosmwasm.wasm.v1.AccessConfig", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AccessConfigUpdate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -276,6 +283,7 @@ impl serde::Serialize for AccessConfigUpdate { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AccessConfigUpdate { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -294,6 +302,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfigUpdate { CodeId, InstantiatePermission, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -376,6 +385,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfigUpdate { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AccessType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -392,6 +402,7 @@ impl serde::Serialize for AccessType { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AccessType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -456,6 +467,7 @@ impl<'de> serde::Deserialize<'de> for AccessType { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for AccessTypeParam { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -478,6 +490,7 @@ impl serde::Serialize for AccessTypeParam { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for AccessTypeParam { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -490,6 +503,7 @@ impl<'de> serde::Deserialize<'de> for AccessTypeParam { enum GeneratedField { Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -556,6 +570,7 @@ impl<'de> serde::Deserialize<'de> for AccessTypeParam { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ClearAdminProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -587,6 +602,7 @@ impl serde::Serialize for ClearAdminProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ClearAdminProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -601,6 +617,7 @@ impl<'de> serde::Deserialize<'de> for ClearAdminProposal { Description, Contract, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -685,6 +702,7 @@ impl<'de> serde::Deserialize<'de> for ClearAdminProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Code { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -726,6 +744,7 @@ impl serde::Serialize for Code { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Code { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -749,6 +768,7 @@ impl<'de> serde::Deserialize<'de> for Code { CodeBytes, Pinned, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -844,6 +864,7 @@ impl<'de> serde::Deserialize<'de> for Code { deserializer.deserialize_struct("cosmwasm.wasm.v1.Code", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for CodeInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -878,6 +899,7 @@ impl serde::Serialize for CodeInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CodeInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -898,6 +920,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfo { Creator, InstantiateConfig, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -983,6 +1006,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfo { deserializer.deserialize_struct("cosmwasm.wasm.v1.CodeInfo", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for CodeInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1025,6 +1049,7 @@ impl serde::Serialize for CodeInfoResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for CodeInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1048,6 +1073,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfoResponse { DataHash, InstantiatePermission, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1151,6 +1177,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfoResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Contract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1181,6 +1208,7 @@ impl serde::Serialize for Contract { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Contract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1202,6 +1230,7 @@ impl<'de> serde::Deserialize<'de> for Contract { ContractInfo, ContractState, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1284,6 +1313,7 @@ impl<'de> serde::Deserialize<'de> for Contract { deserializer.deserialize_struct("cosmwasm.wasm.v1.Contract", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ContractCodeHistoryEntry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1327,6 +1357,7 @@ impl serde::Serialize for ContractCodeHistoryEntry { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ContractCodeHistoryEntry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1342,6 +1373,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryEntry { Updated, Msg, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1445,6 +1477,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryEntry { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ContractCodeHistoryOperationType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1460,6 +1493,7 @@ impl serde::Serialize for ContractCodeHistoryOperationType { serializer.serialize_str(variant) } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ContractCodeHistoryOperationType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1530,6 +1564,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryOperationType { deserializer.deserialize_any(GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ContractInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1585,6 +1620,7 @@ impl serde::Serialize for ContractInfo { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ContractInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1613,6 +1649,7 @@ impl<'de> serde::Deserialize<'de> for ContractInfo { IbcPortId, Extension, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1732,6 +1769,7 @@ impl<'de> serde::Deserialize<'de> for ContractInfo { deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractInfo", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for ExecuteContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1783,6 +1821,7 @@ impl serde::Serialize for ExecuteContractProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1808,6 +1847,7 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { Msg, Funds, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1925,6 +1965,7 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1967,6 +2008,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1990,6 +2032,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Sequences, GenMsgs, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2088,6 +2131,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmwasm.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for genesis_state::GenMsgs { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2117,6 +2161,7 @@ impl serde::Serialize for genesis_state::GenMsgs { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2138,6 +2183,7 @@ impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { InstantiateContract, ExecuteContract, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2231,6 +2277,7 @@ impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for InstantiateContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2295,6 +2342,7 @@ impl serde::Serialize for InstantiateContractProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2325,6 +2373,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { Msg, Funds, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2463,6 +2512,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MigrateContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2509,6 +2559,7 @@ impl serde::Serialize for MigrateContractProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MigrateContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2532,6 +2583,7 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { CodeId, Msg, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2643,6 +2695,7 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Model { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2673,6 +2726,7 @@ impl serde::Serialize for Model { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Model { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2686,6 +2740,7 @@ impl<'de> serde::Deserialize<'de> for Model { Key, Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2763,6 +2818,7 @@ impl<'de> serde::Deserialize<'de> for Model { deserializer.deserialize_struct("cosmwasm.wasm.v1.Model", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgClearAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2787,6 +2843,7 @@ impl serde::Serialize for MsgClearAdmin { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgClearAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2800,6 +2857,7 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdmin { Sender, Contract, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2871,6 +2929,7 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdmin { deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgClearAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2884,6 +2943,7 @@ impl serde::Serialize for MsgClearAdminResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2894,6 +2954,7 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2950,6 +3011,7 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgExecuteContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2989,6 +3051,7 @@ impl serde::Serialize for MsgExecuteContract { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgExecuteContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3004,6 +3067,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContract { Msg, Funds, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3100,6 +3164,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContract { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgExecuteContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3121,6 +3186,7 @@ impl serde::Serialize for MsgExecuteContractResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3133,6 +3199,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { enum GeneratedField { Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3205,6 +3272,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgIbcCloseChannel { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3224,6 +3292,7 @@ impl serde::Serialize for MsgIbcCloseChannel { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3236,6 +3305,7 @@ impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { enum GeneratedField { Channel, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3302,6 +3372,7 @@ impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgIbcSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3348,6 +3419,7 @@ impl serde::Serialize for MsgIbcSend { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgIbcSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3370,6 +3442,7 @@ impl<'de> serde::Deserialize<'de> for MsgIbcSend { TimeoutTimestamp, Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3470,6 +3543,7 @@ impl<'de> serde::Deserialize<'de> for MsgIbcSend { deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgIBCSend", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgInstantiateContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3522,6 +3596,7 @@ impl serde::Serialize for MsgInstantiateContract { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3541,6 +3616,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { Msg, Funds, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3661,6 +3737,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgInstantiateContract2 { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3727,6 +3804,7 @@ impl serde::Serialize for MsgInstantiateContract2 { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3749,6 +3827,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { Salt, FixMsg, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3890,6 +3969,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgInstantiateContract2Response { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3917,6 +3997,7 @@ impl serde::Serialize for MsgInstantiateContract2Response { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3930,6 +4011,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { Address, Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4011,6 +4093,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgInstantiateContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4038,6 +4121,7 @@ impl serde::Serialize for MsgInstantiateContractResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4051,6 +4135,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { Address, Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4132,6 +4217,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgMigrateContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4172,6 +4258,7 @@ impl serde::Serialize for MsgMigrateContract { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgMigrateContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4187,6 +4274,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContract { CodeId, Msg, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4286,6 +4374,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContract { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgMigrateContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4307,6 +4396,7 @@ impl serde::Serialize for MsgMigrateContractResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4319,6 +4409,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { enum GeneratedField { Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4391,6 +4482,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgStoreCode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4425,6 +4517,7 @@ impl serde::Serialize for MsgStoreCode { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgStoreCode { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4445,6 +4538,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { WasmByteCode, InstantiatePermission, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4532,6 +4626,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgStoreCode", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgStoreCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4562,6 +4657,7 @@ impl serde::Serialize for MsgStoreCodeResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4575,6 +4671,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { CodeId, Checksum, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4659,6 +4756,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4689,6 +4787,7 @@ impl serde::Serialize for MsgUpdateAdmin { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4703,6 +4802,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { NewAdmin, Contract, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4783,6 +4883,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for MsgUpdateAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4796,6 +4897,7 @@ impl serde::Serialize for MsgUpdateAdminResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4806,6 +4908,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4862,6 +4965,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4892,6 +4996,7 @@ impl serde::Serialize for Params { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4910,6 +5015,7 @@ impl<'de> serde::Deserialize<'de> for Params { CodeUploadAccess, InstantiateDefaultPermission, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4989,6 +5095,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmwasm.wasm.v1.Params", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for PinCodesProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5027,6 +5134,7 @@ impl serde::Serialize for PinCodesProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for PinCodesProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5041,6 +5149,7 @@ impl<'de> serde::Deserialize<'de> for PinCodesProposal { Description, CodeIds, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5130,6 +5239,7 @@ impl<'de> serde::Deserialize<'de> for PinCodesProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5155,6 +5265,7 @@ impl serde::Serialize for QueryAllContractStateRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5168,6 +5279,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { Address, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5246,6 +5358,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryAllContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5271,6 +5384,7 @@ impl serde::Serialize for QueryAllContractStateResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5284,6 +5398,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { Models, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5362,6 +5477,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5382,6 +5498,7 @@ impl serde::Serialize for QueryCodeRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryCodeRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5394,6 +5511,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodeRequest { enum GeneratedField { CodeId, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5463,6 +5581,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodeRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5490,6 +5609,7 @@ impl serde::Serialize for QueryCodeResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5503,6 +5623,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodeResponse { CodeInfo, Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5581,6 +5702,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodeResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5600,6 +5722,7 @@ impl serde::Serialize for QueryCodesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryCodesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5612,6 +5735,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5678,6 +5802,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5703,6 +5828,7 @@ impl serde::Serialize for QueryCodesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryCodesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5716,6 +5842,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { CodeInfos, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5791,6 +5918,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryContractHistoryRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5816,6 +5944,7 @@ impl serde::Serialize for QueryContractHistoryRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5829,6 +5958,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { Address, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5907,6 +6037,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryContractHistoryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5932,6 +6063,7 @@ impl serde::Serialize for QueryContractHistoryResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5945,6 +6077,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { Entries, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6023,6 +6156,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryContractInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6042,6 +6176,7 @@ impl serde::Serialize for QueryContractInfoRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6054,6 +6189,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { enum GeneratedField { Address, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6123,6 +6259,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryContractInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6148,6 +6285,7 @@ impl serde::Serialize for QueryContractInfoResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6161,6 +6299,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { Address, ContractInfo, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6239,6 +6378,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryContractsByCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6265,6 +6405,7 @@ impl serde::Serialize for QueryContractsByCodeRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6278,6 +6419,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { CodeId, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6359,6 +6501,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryContractsByCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6384,6 +6527,7 @@ impl serde::Serialize for QueryContractsByCodeResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6397,6 +6541,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { Contracts, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6475,6 +6620,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6487,6 +6633,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6497,6 +6644,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6550,6 +6698,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6569,6 +6718,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6581,6 +6731,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6645,6 +6796,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryPinnedCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6664,6 +6816,7 @@ impl serde::Serialize for QueryPinnedCodesRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6676,6 +6829,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { enum GeneratedField { Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6745,6 +6899,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryPinnedCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6777,6 +6932,7 @@ impl serde::Serialize for QueryPinnedCodesResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6790,6 +6946,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { CodeIds, Pagination, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6873,6 +7030,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryRawContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6902,6 +7060,7 @@ impl serde::Serialize for QueryRawContractStateRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6915,6 +7074,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { Address, QueryData, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6996,6 +7156,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QueryRawContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7017,6 +7178,7 @@ impl serde::Serialize for QueryRawContractStateResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7029,6 +7191,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { enum GeneratedField { Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7101,6 +7264,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySmartContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7130,6 +7294,7 @@ impl serde::Serialize for QuerySmartContractStateRequest { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7143,6 +7308,7 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { Address, QueryData, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7224,6 +7390,7 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for QuerySmartContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7245,6 +7412,7 @@ impl serde::Serialize for QuerySmartContractStateResponse { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7257,6 +7425,7 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { enum GeneratedField { Data, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7329,6 +7498,7 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for Sequence { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7358,6 +7528,7 @@ impl serde::Serialize for Sequence { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for Sequence { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7371,6 +7542,7 @@ impl<'de> serde::Deserialize<'de> for Sequence { IdKey, Value, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7448,6 +7620,7 @@ impl<'de> serde::Deserialize<'de> for Sequence { deserializer.deserialize_struct("cosmwasm.wasm.v1.Sequence", FIELDS, GeneratedVisitor) } } +#[cfg(feature = "serialization")] impl serde::Serialize for StoreCodeProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7501,6 +7674,7 @@ impl serde::Serialize for StoreCodeProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for StoreCodeProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7529,6 +7703,7 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { InstantiatePermission, UnpinCode, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7647,6 +7822,7 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for SudoContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7686,6 +7862,7 @@ impl serde::Serialize for SudoContractProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for SudoContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7701,6 +7878,7 @@ impl<'de> serde::Deserialize<'de> for SudoContractProposal { Contract, Msg, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7800,6 +7978,7 @@ impl<'de> serde::Deserialize<'de> for SudoContractProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for UnpinCodesProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7838,6 +8017,7 @@ impl serde::Serialize for UnpinCodesProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for UnpinCodesProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7852,6 +8032,7 @@ impl<'de> serde::Deserialize<'de> for UnpinCodesProposal { Description, CodeIds, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7941,6 +8122,7 @@ impl<'de> serde::Deserialize<'de> for UnpinCodesProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for UpdateAdminProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7978,6 +8160,7 @@ impl serde::Serialize for UpdateAdminProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for UpdateAdminProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7993,6 +8176,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAdminProposal { NewAdmin, Contract, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8086,6 +8270,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAdminProposal { ) } } +#[cfg(feature = "serialization")] impl serde::Serialize for UpdateInstantiateConfigProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8117,6 +8302,7 @@ impl serde::Serialize for UpdateInstantiateConfigProposal { struct_ser.end() } } +#[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for UpdateInstantiateConfigProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8136,6 +8322,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInstantiateConfigProposal { Description, AccessConfigUpdates, } + #[cfg(feature = "serialization")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index 8ad99cbe..acf8bf46 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -379,6 +379,11 @@ fn copy_and_patch(src: impl AsRef, dest: impl AsRef) -> io::Result<( // Use `tendermint_proto` as source of `google.protobuf` types // TODO(tarcieri): figure out what's wrong with our `buf` config and do it there ("::prost_types::", "::tendermint_proto::google::protobuf::"), + // add the feature flag to the serde definitions + ("impl serde::Serialize for", "#[cfg(feature = \"serialization\")]\n\ + impl serde::Serialize for"), + ("impl<'de> serde::Deserialize<'de> for", "#[cfg(feature = \"serialization\")]\n\ + impl<'de> serde::Deserialize<'de> for") ]; // Skip proto files belonging to `EXCLUDED_PROTO_PACKAGES` From 368b109ad9d012788dff670952031957cbbdf94f Mon Sep 17 00:00:00 2001 From: Ash Date: Sun, 11 Aug 2024 08:43:23 -0700 Subject: [PATCH 30/31] change name to serde --- cosmos-sdk-proto/Cargo.toml | 2 +- .../cosmos.app.module.v1alpha1.serde.rs | 6 +- .../cosmos-sdk/cosmos.app.v1alpha1.serde.rs | 42 +- .../cosmos-sdk/cosmos.auth.v1beta1.serde.rs | 132 ++--- .../cosmos-sdk/cosmos.authz.v1beta1.serde.rs | 114 ++--- .../cosmos-sdk/cosmos.bank.v1beta1.serde.rs | 198 +++---- .../cosmos.base.abci.v1beta1.serde.rs | 60 +-- .../cosmos.base.kv.v1beta1.serde.rs | 12 +- .../cosmos.base.node.v1beta1.serde.rs | 12 +- .../cosmos.base.query.v1beta1.serde.rs | 12 +- .../cosmos.base.reflection.v1beta1.serde.rs | 24 +- .../cosmos.base.reflection.v2alpha1.serde.rs | 156 +++--- .../cosmos.base.snapshots.v1beta1.serde.rs | 54 +- .../cosmos.base.store.v1beta1.serde.rs | 36 +- .../cosmos.base.tendermint.v1beta1.serde.rs | 126 ++--- .../cosmos-sdk/cosmos.base.v1beta1.serde.rs | 24 +- .../cosmos.capability.v1beta1.serde.rs | 30 +- .../cosmos-sdk/cosmos.crisis.v1beta1.serde.rs | 18 +- .../cosmos-sdk/cosmos.crypto.ed25519.serde.rs | 12 +- .../cosmos-sdk/cosmos.crypto.hd.v1.serde.rs | 6 +- .../cosmos.crypto.keyring.v1.serde.rs | 30 +- .../cosmos.crypto.multisig.serde.rs | 6 +- .../cosmos.crypto.multisig.v1beta1.serde.rs | 12 +- .../cosmos.crypto.secp256k1.serde.rs | 12 +- .../cosmos.crypto.secp256r1.serde.rs | 12 +- .../cosmos.distribution.v1beta1.serde.rs | 276 +++++----- .../cosmos.evidence.v1beta1.serde.rs | 48 +- .../cosmos.feegrant.v1beta1.serde.rs | 90 ++-- .../cosmos.genutil.v1beta1.serde.rs | 6 +- .../prost/cosmos-sdk/cosmos.gov.v1.serde.rs | 218 ++++---- .../cosmos-sdk/cosmos.gov.v1beta1.serde.rs | 212 ++++---- .../prost/cosmos-sdk/cosmos.group.v1.serde.rs | 484 +++++++++--------- .../cosmos-sdk/cosmos.mint.v1beta1.serde.rs | 54 +- .../cosmos-sdk/cosmos.nft.v1beta1.serde.rs | 138 ++--- .../cosmos.orm.module.v1alpha1.serde.rs | 6 +- .../prost/cosmos-sdk/cosmos.orm.v1.serde.rs | 24 +- .../cosmos-sdk/cosmos.orm.v1alpha1.serde.rs | 16 +- .../cosmos-sdk/cosmos.params.v1beta1.serde.rs | 42 +- .../cosmos.slashing.v1beta1.serde.rs | 84 +-- .../cosmos.staking.v1beta1.serde.rs | 392 +++++++------- .../cosmos.tx.signing.v1beta1.serde.rs | 34 +- .../cosmos-sdk/cosmos.tx.v1beta1.serde.rs | 146 +++--- .../cosmos.upgrade.v1beta1.serde.rs | 108 ++-- .../cosmos.vesting.v1beta1.serde.rs | 72 +-- .../prost/cosmos-sdk/cosmos_proto.serde.rs | 16 +- .../wasmd/cosmos.base.query.v1beta1.serde.rs | 12 +- .../prost/wasmd/cosmos.base.v1beta1.serde.rs | 24 +- .../src/prost/wasmd/cosmos_proto.serde.rs | 16 +- .../src/prost/wasmd/cosmwasm.wasm.v1.serde.rs | 374 +++++++------- proto-build/src/main.rs | 4 +- 50 files changed, 2022 insertions(+), 2022 deletions(-) diff --git a/cosmos-sdk-proto/Cargo.toml b/cosmos-sdk-proto/Cargo.toml index 8939b736..04ead1c3 100644 --- a/cosmos-sdk-proto/Cargo.toml +++ b/cosmos-sdk-proto/Cargo.toml @@ -30,7 +30,7 @@ std = ["prost/std", "tendermint-proto/std"] grpc = ["std", "tonic"] grpc-transport = ["grpc", "tonic/transport"] cosmwasm = [] -serialization = ["serde", "tendermint-proto/std", "pbjson"] +serde = ["dep:serde", "tendermint-proto/std", "pbjson"] [package.metadata.docs.rs] all-features = true diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs index b1386481..5bf71429 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.module.v1alpha1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Module { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -12,7 +12,7 @@ impl serde::Serialize for Module { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Module { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -23,7 +23,7 @@ impl<'de> serde::Deserialize<'de> for Module { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs index e57ec165..7382e8c6 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.app.v1alpha1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Config { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -18,7 +18,7 @@ impl serde::Serialize for Config { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Config { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -31,7 +31,7 @@ impl<'de> serde::Deserialize<'de> for Config { enum GeneratedField { Modules, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -94,7 +94,7 @@ impl<'de> serde::Deserialize<'de> for Config { deserializer.deserialize_struct("cosmos.app.v1alpha1.Config", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MigrateFromInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -114,7 +114,7 @@ impl serde::Serialize for MigrateFromInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MigrateFromInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -127,7 +127,7 @@ impl<'de> serde::Deserialize<'de> for MigrateFromInfo { enum GeneratedField { Module, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -194,7 +194,7 @@ impl<'de> serde::Deserialize<'de> for MigrateFromInfo { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ModuleConfig { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -220,7 +220,7 @@ impl serde::Serialize for ModuleConfig { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ModuleConfig { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -234,7 +234,7 @@ impl<'de> serde::Deserialize<'de> for ModuleConfig { Name, Config, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -310,7 +310,7 @@ impl<'de> serde::Deserialize<'de> for ModuleConfig { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ModuleDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -342,7 +342,7 @@ impl serde::Serialize for ModuleDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ModuleDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -364,7 +364,7 @@ impl<'de> serde::Deserialize<'de> for ModuleDescriptor { UsePackage, CanMigrateFrom, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -451,7 +451,7 @@ impl<'de> serde::Deserialize<'de> for ModuleDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PackageReference { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -477,7 +477,7 @@ impl serde::Serialize for PackageReference { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PackageReference { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -491,7 +491,7 @@ impl<'de> serde::Deserialize<'de> for PackageReference { Name, Revision, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -570,7 +570,7 @@ impl<'de> serde::Deserialize<'de> for PackageReference { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryConfigRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -584,7 +584,7 @@ impl serde::Serialize for QueryConfigRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryConfigRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -595,7 +595,7 @@ impl<'de> serde::Deserialize<'de> for QueryConfigRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -649,7 +649,7 @@ impl<'de> serde::Deserialize<'de> for QueryConfigRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryConfigResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -669,7 +669,7 @@ impl serde::Serialize for QueryConfigResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryConfigResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -682,7 +682,7 @@ impl<'de> serde::Deserialize<'de> for QueryConfigResponse { enum GeneratedField { Config, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs index a6cb36c3..7345e5a5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.auth.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AddressBytesToStringRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -23,7 +23,7 @@ impl serde::Serialize for AddressBytesToStringRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -36,7 +36,7 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { enum GeneratedField { AddressBytes, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -109,7 +109,7 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AddressBytesToStringResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -129,7 +129,7 @@ impl serde::Serialize for AddressBytesToStringResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -142,7 +142,7 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { enum GeneratedField { AddressString, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -212,7 +212,7 @@ impl<'de> serde::Deserialize<'de> for AddressBytesToStringResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AddressStringToBytesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -232,7 +232,7 @@ impl serde::Serialize for AddressStringToBytesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -245,7 +245,7 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { enum GeneratedField { AddressString, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -315,7 +315,7 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AddressStringToBytesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -339,7 +339,7 @@ impl serde::Serialize for AddressStringToBytesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -352,7 +352,7 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { enum GeneratedField { AddressBytes, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -425,7 +425,7 @@ impl<'de> serde::Deserialize<'de> for AddressStringToBytesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for BaseAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -467,7 +467,7 @@ impl serde::Serialize for BaseAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for BaseAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -490,7 +490,7 @@ impl<'de> serde::Deserialize<'de> for BaseAccount { AccountNumber, Sequence, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -586,7 +586,7 @@ impl<'de> serde::Deserialize<'de> for BaseAccount { deserializer.deserialize_struct("cosmos.auth.v1beta1.BaseAccount", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Bech32PrefixRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -600,7 +600,7 @@ impl serde::Serialize for Bech32PrefixRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -611,7 +611,7 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -665,7 +665,7 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Bech32PrefixResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -685,7 +685,7 @@ impl serde::Serialize for Bech32PrefixResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -698,7 +698,7 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { enum GeneratedField { Bech32Prefix, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -768,7 +768,7 @@ impl<'de> serde::Deserialize<'de> for Bech32PrefixResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -794,7 +794,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -808,7 +808,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Params, Accounts, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -884,7 +884,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ModuleAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -916,7 +916,7 @@ impl serde::Serialize for ModuleAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ModuleAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -931,7 +931,7 @@ impl<'de> serde::Deserialize<'de> for ModuleAccount { Name, Permissions, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1016,7 +1016,7 @@ impl<'de> serde::Deserialize<'de> for ModuleAccount { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1079,7 +1079,7 @@ impl serde::Serialize for Params { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1107,7 +1107,7 @@ impl<'de> serde::Deserialize<'de> for Params { SigVerifyCostEd25519, SigVerifyCostSecp256k1, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1233,7 +1233,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.auth.v1beta1.Params", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAccountAddressByIdRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1254,7 +1254,7 @@ impl serde::Serialize for QueryAccountAddressByIdRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1267,7 +1267,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { enum GeneratedField { Id, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1340,7 +1340,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAccountAddressByIdResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1360,7 +1360,7 @@ impl serde::Serialize for QueryAccountAddressByIdResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1373,7 +1373,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { enum GeneratedField { AccountAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1445,7 +1445,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountAddressByIdResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAccountRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1465,7 +1465,7 @@ impl serde::Serialize for QueryAccountRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAccountRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1478,7 +1478,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountRequest { enum GeneratedField { Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1545,7 +1545,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAccountResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1565,7 +1565,7 @@ impl serde::Serialize for QueryAccountResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAccountResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1578,7 +1578,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountResponse { enum GeneratedField { Account, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1646,7 +1646,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAccountsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1666,7 +1666,7 @@ impl serde::Serialize for QueryAccountsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1679,7 +1679,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1749,7 +1749,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAccountsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1775,7 +1775,7 @@ impl serde::Serialize for QueryAccountsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1789,7 +1789,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { Accounts, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1868,7 +1868,7 @@ impl<'de> serde::Deserialize<'de> for QueryAccountsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryModuleAccountByNameRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1888,7 +1888,7 @@ impl serde::Serialize for QueryModuleAccountByNameRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1901,7 +1901,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { enum GeneratedField { Name, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1971,7 +1971,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryModuleAccountByNameResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1991,7 +1991,7 @@ impl serde::Serialize for QueryModuleAccountByNameResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2004,7 +2004,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { enum GeneratedField { Account, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2072,7 +2072,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountByNameResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryModuleAccountsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2086,7 +2086,7 @@ impl serde::Serialize for QueryModuleAccountsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2097,7 +2097,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2154,7 +2154,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryModuleAccountsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2174,7 +2174,7 @@ impl serde::Serialize for QueryModuleAccountsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2187,7 +2187,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { enum GeneratedField { Accounts, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2257,7 +2257,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleAccountsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2271,7 +2271,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2282,7 +2282,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2336,7 +2336,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2356,7 +2356,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2369,7 +2369,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs index 4e8bceaf..20ee2f3e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.authz.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventGrant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -30,7 +30,7 @@ impl serde::Serialize for EventGrant { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventGrant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -45,7 +45,7 @@ impl<'de> serde::Deserialize<'de> for EventGrant { Granter, Grantee, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -126,7 +126,7 @@ impl<'de> serde::Deserialize<'de> for EventGrant { deserializer.deserialize_struct("cosmos.authz.v1beta1.EventGrant", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventRevoke { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -158,7 +158,7 @@ impl serde::Serialize for EventRevoke { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventRevoke { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -173,7 +173,7 @@ impl<'de> serde::Deserialize<'de> for EventRevoke { Granter, Grantee, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -258,7 +258,7 @@ impl<'de> serde::Deserialize<'de> for EventRevoke { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenericAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -278,7 +278,7 @@ impl serde::Serialize for GenericAuthorization { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenericAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -291,7 +291,7 @@ impl<'de> serde::Deserialize<'de> for GenericAuthorization { enum GeneratedField { Msg, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -361,7 +361,7 @@ impl<'de> serde::Deserialize<'de> for GenericAuthorization { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -381,7 +381,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -394,7 +394,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { Authorization, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -461,7 +461,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Grant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -486,7 +486,7 @@ impl serde::Serialize for Grant { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Grant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -500,7 +500,7 @@ impl<'de> serde::Deserialize<'de> for Grant { Authorization, Expiration, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -572,7 +572,7 @@ impl<'de> serde::Deserialize<'de> for Grant { deserializer.deserialize_struct("cosmos.authz.v1beta1.Grant", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GrantAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -610,7 +610,7 @@ impl serde::Serialize for GrantAuthorization { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GrantAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -626,7 +626,7 @@ impl<'de> serde::Deserialize<'de> for GrantAuthorization { Authorization, Expiration, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -720,7 +720,7 @@ impl<'de> serde::Deserialize<'de> for GrantAuthorization { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GrantQueueItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -740,7 +740,7 @@ impl serde::Serialize for GrantQueueItem { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GrantQueueItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -753,7 +753,7 @@ impl<'de> serde::Deserialize<'de> for GrantQueueItem { enum GeneratedField { MsgTypeUrls, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -820,7 +820,7 @@ impl<'de> serde::Deserialize<'de> for GrantQueueItem { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgExec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -845,7 +845,7 @@ impl serde::Serialize for MsgExec { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgExec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -859,7 +859,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { Grantee, Msgs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -931,7 +931,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgExec", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgExecResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -958,7 +958,7 @@ impl serde::Serialize for MsgExecResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgExecResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -971,7 +971,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { enum GeneratedField { Results, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1043,7 +1043,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgGrant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1074,7 +1074,7 @@ impl serde::Serialize for MsgGrant { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgGrant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1089,7 +1089,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrant { Grantee, Grant, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1170,7 +1170,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrant { deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgGrant", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgGrantResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1184,7 +1184,7 @@ impl serde::Serialize for MsgGrantResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgGrantResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1195,7 +1195,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1249,7 +1249,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgRevoke { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1280,7 +1280,7 @@ impl serde::Serialize for MsgRevoke { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgRevoke { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1295,7 +1295,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevoke { Grantee, MsgTypeUrl, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1376,7 +1376,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevoke { deserializer.deserialize_struct("cosmos.authz.v1beta1.MsgRevoke", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgRevokeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1390,7 +1390,7 @@ impl serde::Serialize for MsgRevokeResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgRevokeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1401,7 +1401,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1455,7 +1455,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGranteeGrantsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1481,7 +1481,7 @@ impl serde::Serialize for QueryGranteeGrantsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1495,7 +1495,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsRequest { Grantee, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1574,7 +1574,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGranteeGrantsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1600,7 +1600,7 @@ impl serde::Serialize for QueryGranteeGrantsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1614,7 +1614,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsResponse { Grants, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1693,7 +1693,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranteeGrantsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGranterGrantsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1719,7 +1719,7 @@ impl serde::Serialize for QueryGranterGrantsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGranterGrantsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1733,7 +1733,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsRequest { Granter, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1812,7 +1812,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGranterGrantsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1838,7 +1838,7 @@ impl serde::Serialize for QueryGranterGrantsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGranterGrantsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1852,7 +1852,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsResponse { Grants, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1931,7 +1931,7 @@ impl<'de> serde::Deserialize<'de> for QueryGranterGrantsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGrantsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1969,7 +1969,7 @@ impl serde::Serialize for QueryGrantsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1991,7 +1991,7 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { MsgTypeUrl, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2085,7 +2085,7 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGrantsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2111,7 +2111,7 @@ impl serde::Serialize for QueryGrantsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGrantsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2125,7 +2125,7 @@ impl<'de> serde::Deserialize<'de> for QueryGrantsResponse { Grants, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs index df4c2a39..6e721859 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Balance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,7 +24,7 @@ impl serde::Serialize for Balance { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Balance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -38,7 +38,7 @@ impl<'de> serde::Deserialize<'de> for Balance { Address, Coins, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -110,7 +110,7 @@ impl<'de> serde::Deserialize<'de> for Balance { deserializer.deserialize_struct("cosmos.bank.v1beta1.Balance", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DenomOwner { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -135,7 +135,7 @@ impl serde::Serialize for DenomOwner { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DenomOwner { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -149,7 +149,7 @@ impl<'de> serde::Deserialize<'de> for DenomOwner { Address, Balance, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -221,7 +221,7 @@ impl<'de> serde::Deserialize<'de> for DenomOwner { deserializer.deserialize_struct("cosmos.bank.v1beta1.DenomOwner", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DenomUnit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -252,7 +252,7 @@ impl serde::Serialize for DenomUnit { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DenomUnit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -267,7 +267,7 @@ impl<'de> serde::Deserialize<'de> for DenomUnit { Exponent, Aliases, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -351,7 +351,7 @@ impl<'de> serde::Deserialize<'de> for DenomUnit { deserializer.deserialize_struct("cosmos.bank.v1beta1.DenomUnit", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -389,7 +389,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -411,7 +411,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Supply, DenomMetadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -505,7 +505,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Input { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -530,7 +530,7 @@ impl serde::Serialize for Input { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Input { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -544,7 +544,7 @@ impl<'de> serde::Deserialize<'de> for Input { Address, Coins, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -616,7 +616,7 @@ impl<'de> serde::Deserialize<'de> for Input { deserializer.deserialize_struct("cosmos.bank.v1beta1.Input", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Metadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -677,7 +677,7 @@ impl serde::Serialize for Metadata { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Metadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -708,7 +708,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { Uri, UriHash, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -834,7 +834,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { deserializer.deserialize_struct("cosmos.bank.v1beta1.Metadata", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgMultiSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -860,7 +860,7 @@ impl serde::Serialize for MsgMultiSend { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgMultiSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -874,7 +874,7 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSend { Inputs, Outputs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -950,7 +950,7 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSend { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgMultiSendResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -964,7 +964,7 @@ impl serde::Serialize for MsgMultiSendResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -975,7 +975,7 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1032,7 +1032,7 @@ impl<'de> serde::Deserialize<'de> for MsgMultiSendResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1063,7 +1063,7 @@ impl serde::Serialize for MsgSend { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1084,7 +1084,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { ToAddress, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1165,7 +1165,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { deserializer.deserialize_struct("cosmos.bank.v1beta1.MsgSend", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSendResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1178,7 +1178,7 @@ impl serde::Serialize for MsgSendResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSendResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1189,7 +1189,7 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1243,7 +1243,7 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Output { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1268,7 +1268,7 @@ impl serde::Serialize for Output { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Output { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1282,7 +1282,7 @@ impl<'de> serde::Deserialize<'de> for Output { Address, Coins, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1354,7 +1354,7 @@ impl<'de> serde::Deserialize<'de> for Output { deserializer.deserialize_struct("cosmos.bank.v1beta1.Output", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1379,7 +1379,7 @@ impl serde::Serialize for Params { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1398,7 +1398,7 @@ impl<'de> serde::Deserialize<'de> for Params { SendEnabled, DefaultSendEnabled, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1474,7 +1474,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.bank.v1beta1.Params", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllBalancesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1500,7 +1500,7 @@ impl serde::Serialize for QueryAllBalancesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1514,7 +1514,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { Address, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1593,7 +1593,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllBalancesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1619,7 +1619,7 @@ impl serde::Serialize for QueryAllBalancesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1633,7 +1633,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { Balances, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1712,7 +1712,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryBalanceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1738,7 +1738,7 @@ impl serde::Serialize for QueryBalanceRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1752,7 +1752,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { Address, Denom, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1828,7 +1828,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryBalanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1848,7 +1848,7 @@ impl serde::Serialize for QueryBalanceResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1861,7 +1861,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { enum GeneratedField { Balance, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1929,7 +1929,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDenomMetadataRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1949,7 +1949,7 @@ impl serde::Serialize for QueryDenomMetadataRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1962,7 +1962,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { enum GeneratedField { Denom, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2032,7 +2032,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDenomMetadataResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2052,7 +2052,7 @@ impl serde::Serialize for QueryDenomMetadataResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2065,7 +2065,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { enum GeneratedField { Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2135,7 +2135,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDenomOwnersRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2161,7 +2161,7 @@ impl serde::Serialize for QueryDenomOwnersRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2175,7 +2175,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { Denom, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2254,7 +2254,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDenomOwnersResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2280,7 +2280,7 @@ impl serde::Serialize for QueryDenomOwnersResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2294,7 +2294,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { DenomOwners, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2373,7 +2373,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomOwnersResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDenomsMetadataRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2393,7 +2393,7 @@ impl serde::Serialize for QueryDenomsMetadataRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2406,7 +2406,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2476,7 +2476,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDenomsMetadataResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2502,7 +2502,7 @@ impl serde::Serialize for QueryDenomsMetadataResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2516,7 +2516,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { Metadatas, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2595,7 +2595,7 @@ impl<'de> serde::Deserialize<'de> for QueryDenomsMetadataResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2609,7 +2609,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2620,7 +2620,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2674,7 +2674,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2694,7 +2694,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2707,7 +2707,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2772,7 +2772,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySpendableBalancesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2798,7 +2798,7 @@ impl serde::Serialize for QuerySpendableBalancesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2812,7 +2812,7 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { Address, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2891,7 +2891,7 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySpendableBalancesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2917,7 +2917,7 @@ impl serde::Serialize for QuerySpendableBalancesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2931,7 +2931,7 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { Balances, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3010,7 +3010,7 @@ impl<'de> serde::Deserialize<'de> for QuerySpendableBalancesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySupplyOfRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3030,7 +3030,7 @@ impl serde::Serialize for QuerySupplyOfRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3043,7 +3043,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { enum GeneratedField { Denom, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3113,7 +3113,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySupplyOfResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3133,7 +3133,7 @@ impl serde::Serialize for QuerySupplyOfResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3146,7 +3146,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { enum GeneratedField { Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3214,7 +3214,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyOfResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryTotalSupplyRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3234,7 +3234,7 @@ impl serde::Serialize for QueryTotalSupplyRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3247,7 +3247,7 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3317,7 +3317,7 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryTotalSupplyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3343,7 +3343,7 @@ impl serde::Serialize for QueryTotalSupplyResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3357,7 +3357,7 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { Supply, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3436,7 +3436,7 @@ impl<'de> serde::Deserialize<'de> for QueryTotalSupplyResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SendAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3456,7 +3456,7 @@ impl serde::Serialize for SendAuthorization { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SendAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3469,7 +3469,7 @@ impl<'de> serde::Deserialize<'de> for SendAuthorization { enum GeneratedField { SpendLimit, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3536,7 +3536,7 @@ impl<'de> serde::Deserialize<'de> for SendAuthorization { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SendEnabled { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3561,7 +3561,7 @@ impl serde::Serialize for SendEnabled { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SendEnabled { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3575,7 +3575,7 @@ impl<'de> serde::Deserialize<'de> for SendEnabled { Denom, Enabled, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3647,7 +3647,7 @@ impl<'de> serde::Deserialize<'de> for SendEnabled { deserializer.deserialize_struct("cosmos.bank.v1beta1.SendEnabled", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Supply { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3666,7 +3666,7 @@ impl serde::Serialize for Supply { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Supply { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3679,7 +3679,7 @@ impl<'de> serde::Deserialize<'de> for Supply { enum GeneratedField { Total, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs index adc0f5fd..83877efe 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.abci.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AbciMessageLog { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -31,7 +31,7 @@ impl serde::Serialize for AbciMessageLog { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AbciMessageLog { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -46,7 +46,7 @@ impl<'de> serde::Deserialize<'de> for AbciMessageLog { Log, Events, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -134,7 +134,7 @@ impl<'de> serde::Deserialize<'de> for AbciMessageLog { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Attribute { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -160,7 +160,7 @@ impl serde::Serialize for Attribute { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Attribute { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -174,7 +174,7 @@ impl<'de> serde::Deserialize<'de> for Attribute { Key, Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -250,7 +250,7 @@ impl<'de> serde::Deserialize<'de> for Attribute { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GasInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -279,7 +279,7 @@ impl serde::Serialize for GasInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GasInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -293,7 +293,7 @@ impl<'de> serde::Deserialize<'de> for GasInfo { GasWanted, GasUsed, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -375,7 +375,7 @@ impl<'de> serde::Deserialize<'de> for GasInfo { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgData { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -403,7 +403,7 @@ impl serde::Serialize for MsgData { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgData { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -417,7 +417,7 @@ impl<'de> serde::Deserialize<'de> for MsgData { MsgType, Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -496,7 +496,7 @@ impl<'de> serde::Deserialize<'de> for MsgData { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Result { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -535,7 +535,7 @@ impl serde::Serialize for Result { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Result { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -551,7 +551,7 @@ impl<'de> serde::Deserialize<'de> for Result { Events, MsgResponses, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -644,7 +644,7 @@ impl<'de> serde::Deserialize<'de> for Result { deserializer.deserialize_struct("cosmos.base.abci.v1beta1.Result", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SearchTxsResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -706,7 +706,7 @@ impl serde::Serialize for SearchTxsResult { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SearchTxsResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -734,7 +734,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { Limit, Txs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -861,7 +861,7 @@ impl<'de> serde::Deserialize<'de> for SearchTxsResult { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SimulationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -887,7 +887,7 @@ impl serde::Serialize for SimulationResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SimulationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -901,7 +901,7 @@ impl<'de> serde::Deserialize<'de> for SimulationResponse { GasInfo, Result, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -977,7 +977,7 @@ impl<'de> serde::Deserialize<'de> for SimulationResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for StringEvent { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1003,7 +1003,7 @@ impl serde::Serialize for StringEvent { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for StringEvent { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1017,7 +1017,7 @@ impl<'de> serde::Deserialize<'de> for StringEvent { Type, Attributes, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1093,7 +1093,7 @@ impl<'de> serde::Deserialize<'de> for StringEvent { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TxMsgData { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1119,7 +1119,7 @@ impl serde::Serialize for TxMsgData { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TxMsgData { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1133,7 +1133,7 @@ impl<'de> serde::Deserialize<'de> for TxMsgData { Data, MsgResponses, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1209,7 +1209,7 @@ impl<'de> serde::Deserialize<'de> for TxMsgData { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TxResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1305,7 +1305,7 @@ impl serde::Serialize for TxResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TxResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1347,7 +1347,7 @@ impl<'de> serde::Deserialize<'de> for TxResponse { Timestamp, Events, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs index 83ff2e50..98c15527 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.kv.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Pair { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -30,7 +30,7 @@ impl serde::Serialize for Pair { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Pair { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -44,7 +44,7 @@ impl<'de> serde::Deserialize<'de> for Pair { Key, Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -122,7 +122,7 @@ impl<'de> serde::Deserialize<'de> for Pair { deserializer.deserialize_struct("cosmos.base.kv.v1beta1.Pair", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Pairs { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -141,7 +141,7 @@ impl serde::Serialize for Pairs { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Pairs { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -154,7 +154,7 @@ impl<'de> serde::Deserialize<'de> for Pairs { enum GeneratedField { Pairs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs index b36e4abc..55dbf379 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.node.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ConfigRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -13,7 +13,7 @@ impl serde::Serialize for ConfigRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ConfigRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -24,7 +24,7 @@ impl<'de> serde::Deserialize<'de> for ConfigRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -78,7 +78,7 @@ impl<'de> serde::Deserialize<'de> for ConfigRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ConfigResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -98,7 +98,7 @@ impl serde::Serialize for ConfigResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ConfigResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -111,7 +111,7 @@ impl<'de> serde::Deserialize<'de> for ConfigResponse { enum GeneratedField { MinimumGasPrice, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs index 650edac4..27639f3d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.query.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PageRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -47,7 +47,7 @@ impl serde::Serialize for PageRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PageRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -71,7 +71,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { CountTotal, Reverse, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -183,7 +183,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PageResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -214,7 +214,7 @@ impl serde::Serialize for PageResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PageResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -228,7 +228,7 @@ impl<'de> serde::Deserialize<'de> for PageResponse { NextKey, Total, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs index 1c5447df..29aaa9ea 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ListAllInterfacesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -15,7 +15,7 @@ impl serde::Serialize for ListAllInterfacesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -26,7 +26,7 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -84,7 +84,7 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ListAllInterfacesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -106,7 +106,7 @@ impl serde::Serialize for ListAllInterfacesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -119,7 +119,7 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { enum GeneratedField { InterfaceNames, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -192,7 +192,7 @@ impl<'de> serde::Deserialize<'de> for ListAllInterfacesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ListImplementationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -214,7 +214,7 @@ impl serde::Serialize for ListImplementationsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -227,7 +227,7 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { enum GeneratedField { InterfaceName, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -298,7 +298,7 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ListImplementationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -323,7 +323,7 @@ impl serde::Serialize for ListImplementationsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ListImplementationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -336,7 +336,7 @@ impl<'de> serde::Deserialize<'de> for ListImplementationsResponse { enum GeneratedField { ImplementationMessageNames, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs index c0422442..94f5d41c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.reflection.v2alpha1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AppDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -49,7 +49,7 @@ impl serde::Serialize for AppDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AppDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -75,7 +75,7 @@ impl<'de> serde::Deserialize<'de> for AppDescriptor { QueryServices, Tx, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -187,7 +187,7 @@ impl<'de> serde::Deserialize<'de> for AppDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AuthnDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -207,7 +207,7 @@ impl serde::Serialize for AuthnDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AuthnDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -220,7 +220,7 @@ impl<'de> serde::Deserialize<'de> for AuthnDescriptor { enum GeneratedField { SignModes, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -287,7 +287,7 @@ impl<'de> serde::Deserialize<'de> for AuthnDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ChainDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -307,7 +307,7 @@ impl serde::Serialize for ChainDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ChainDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -320,7 +320,7 @@ impl<'de> serde::Deserialize<'de> for ChainDescriptor { enum GeneratedField { Id, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -387,7 +387,7 @@ impl<'de> serde::Deserialize<'de> for ChainDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CodecDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -407,7 +407,7 @@ impl serde::Serialize for CodecDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CodecDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -420,7 +420,7 @@ impl<'de> serde::Deserialize<'de> for CodecDescriptor { enum GeneratedField { Interfaces, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -487,7 +487,7 @@ impl<'de> serde::Deserialize<'de> for CodecDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ConfigurationDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -512,7 +512,7 @@ impl serde::Serialize for ConfigurationDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -528,7 +528,7 @@ impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { enum GeneratedField { Bech32AccountAddressPrefix, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -604,7 +604,7 @@ impl<'de> serde::Deserialize<'de> for ConfigurationDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetAuthnDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -620,7 +620,7 @@ impl serde::Serialize for GetAuthnDescriptorRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -631,7 +631,7 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -689,7 +689,7 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetAuthnDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -711,7 +711,7 @@ impl serde::Serialize for GetAuthnDescriptorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -724,7 +724,7 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { enum GeneratedField { Authn, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -793,7 +793,7 @@ impl<'de> serde::Deserialize<'de> for GetAuthnDescriptorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetChainDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -809,7 +809,7 @@ impl serde::Serialize for GetChainDescriptorRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -820,7 +820,7 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -878,7 +878,7 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetChainDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -900,7 +900,7 @@ impl serde::Serialize for GetChainDescriptorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -913,7 +913,7 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { enum GeneratedField { Chain, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -982,7 +982,7 @@ impl<'de> serde::Deserialize<'de> for GetChainDescriptorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetCodecDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -998,7 +998,7 @@ impl serde::Serialize for GetCodecDescriptorRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1009,7 +1009,7 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1067,7 +1067,7 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetCodecDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1089,7 +1089,7 @@ impl serde::Serialize for GetCodecDescriptorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1102,7 +1102,7 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { enum GeneratedField { Codec, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1171,7 +1171,7 @@ impl<'de> serde::Deserialize<'de> for GetCodecDescriptorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetConfigurationDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1187,7 +1187,7 @@ impl serde::Serialize for GetConfigurationDescriptorRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1198,7 +1198,7 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1257,7 +1257,7 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetConfigurationDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1279,7 +1279,7 @@ impl serde::Serialize for GetConfigurationDescriptorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1292,7 +1292,7 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { enum GeneratedField { Config, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1362,7 +1362,7 @@ impl<'de> serde::Deserialize<'de> for GetConfigurationDescriptorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetQueryServicesDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1378,7 +1378,7 @@ impl serde::Serialize for GetQueryServicesDescriptorRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1389,7 +1389,7 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1448,7 +1448,7 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetQueryServicesDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1470,7 +1470,7 @@ impl serde::Serialize for GetQueryServicesDescriptorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1483,7 +1483,7 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { enum GeneratedField { Queries, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1553,7 +1553,7 @@ impl<'de> serde::Deserialize<'de> for GetQueryServicesDescriptorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetTxDescriptorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1569,7 +1569,7 @@ impl serde::Serialize for GetTxDescriptorRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1580,7 +1580,7 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1637,7 +1637,7 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetTxDescriptorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1659,7 +1659,7 @@ impl serde::Serialize for GetTxDescriptorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1672,7 +1672,7 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { enum GeneratedField { Tx, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1741,7 +1741,7 @@ impl<'de> serde::Deserialize<'de> for GetTxDescriptorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for InterfaceAcceptingMessageDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1769,7 +1769,7 @@ impl serde::Serialize for InterfaceAcceptingMessageDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1783,7 +1783,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { Fullname, FieldDescriptorNames, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1868,7 +1868,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceAcceptingMessageDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for InterfaceDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1903,7 +1903,7 @@ impl serde::Serialize for InterfaceDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1924,7 +1924,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { InterfaceAcceptingMessages, InterfaceImplementers, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2018,7 +2018,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for InterfaceImplementerDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2046,7 +2046,7 @@ impl serde::Serialize for InterfaceImplementerDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2060,7 +2060,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { Fullname, TypeUrl, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2141,7 +2141,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceImplementerDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2161,7 +2161,7 @@ impl serde::Serialize for MsgDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2174,7 +2174,7 @@ impl<'de> serde::Deserialize<'de> for MsgDescriptor { enum GeneratedField { MsgTypeUrl, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2241,7 +2241,7 @@ impl<'de> serde::Deserialize<'de> for MsgDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryMethodDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2267,7 +2267,7 @@ impl serde::Serialize for QueryMethodDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2281,7 +2281,7 @@ impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { Name, FullQueryPath, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2362,7 +2362,7 @@ impl<'de> serde::Deserialize<'de> for QueryMethodDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryServiceDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2396,7 +2396,7 @@ impl serde::Serialize for QueryServiceDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2411,7 +2411,7 @@ impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { IsModule, Methods, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2499,7 +2499,7 @@ impl<'de> serde::Deserialize<'de> for QueryServiceDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryServicesDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2521,7 +2521,7 @@ impl serde::Serialize for QueryServicesDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2534,7 +2534,7 @@ impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { enum GeneratedField { QueryServices, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2605,7 +2605,7 @@ impl<'de> serde::Deserialize<'de> for QueryServicesDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SigningModeDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2640,7 +2640,7 @@ impl serde::Serialize for SigningModeDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2660,7 +2660,7 @@ impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { Number, AuthnInfoProviderMethodFullname, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2757,7 +2757,7 @@ impl<'de> serde::Deserialize<'de> for SigningModeDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TxDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2783,7 +2783,7 @@ impl serde::Serialize for TxDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TxDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2797,7 +2797,7 @@ impl<'de> serde::Deserialize<'de> for TxDescriptor { Fullname, Msgs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs index 17b3932d..faddc89d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.snapshots.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Metadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -26,7 +26,7 @@ impl serde::Serialize for Metadata { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Metadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { enum GeneratedField { ChunkHashes, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -111,7 +111,7 @@ impl<'de> serde::Deserialize<'de> for Metadata { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Snapshot { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -158,7 +158,7 @@ impl serde::Serialize for Snapshot { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Snapshot { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -175,7 +175,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { Hash, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -290,7 +290,7 @@ impl<'de> serde::Deserialize<'de> for Snapshot { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SnapshotExtensionMeta { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -316,7 +316,7 @@ impl serde::Serialize for SnapshotExtensionMeta { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -330,7 +330,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { Name, Format, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -412,7 +412,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SnapshotExtensionPayload { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -438,7 +438,7 @@ impl serde::Serialize for SnapshotExtensionPayload { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -451,7 +451,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { enum GeneratedField { Payload, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -524,7 +524,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SnapshotIavlItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -569,7 +569,7 @@ impl serde::Serialize for SnapshotIavlItem { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -585,7 +585,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { Version, Height, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -691,7 +691,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SnapshotItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -730,7 +730,7 @@ impl serde::Serialize for SnapshotItem { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SnapshotItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -756,7 +756,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { Kv, Schema, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -870,7 +870,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotItem { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SnapshotKvItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -902,7 +902,7 @@ impl serde::Serialize for SnapshotKvItem { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SnapshotKvItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -916,7 +916,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotKvItem { Key, Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -998,7 +998,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotKvItem { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SnapshotSchema { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1025,7 +1025,7 @@ impl serde::Serialize for SnapshotSchema { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SnapshotSchema { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1038,7 +1038,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotSchema { enum GeneratedField { Keys, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1110,7 +1110,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotSchema { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SnapshotStoreItem { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1130,7 +1130,7 @@ impl serde::Serialize for SnapshotStoreItem { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SnapshotStoreItem { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1143,7 +1143,7 @@ impl<'de> serde::Deserialize<'de> for SnapshotStoreItem { enum GeneratedField { Name, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs index 26441973..f78ee6b3 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.store.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for BlockMetadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -49,7 +49,7 @@ impl serde::Serialize for BlockMetadata { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for BlockMetadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -80,7 +80,7 @@ impl<'de> serde::Deserialize<'de> for BlockMetadata { ResponseEndBlock, ResponseCommit, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -204,7 +204,7 @@ impl<'de> serde::Deserialize<'de> for BlockMetadata { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for block_metadata::DeliverTx { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -230,7 +230,7 @@ impl serde::Serialize for block_metadata::DeliverTx { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -244,7 +244,7 @@ impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { Request, Response, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -323,7 +323,7 @@ impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CommitId { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -352,7 +352,7 @@ impl serde::Serialize for CommitId { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CommitId { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -366,7 +366,7 @@ impl<'de> serde::Deserialize<'de> for CommitId { Version, Hash, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -448,7 +448,7 @@ impl<'de> serde::Deserialize<'de> for CommitId { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CommitInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -475,7 +475,7 @@ impl serde::Serialize for CommitInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CommitInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -489,7 +489,7 @@ impl<'de> serde::Deserialize<'de> for CommitInfo { Version, StoreInfos, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -568,7 +568,7 @@ impl<'de> serde::Deserialize<'de> for CommitInfo { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for StoreInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -594,7 +594,7 @@ impl serde::Serialize for StoreInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for StoreInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -608,7 +608,7 @@ impl<'de> serde::Deserialize<'de> for StoreInfo { Name, CommitId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -684,7 +684,7 @@ impl<'de> serde::Deserialize<'de> for StoreInfo { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for StoreKvPair { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -728,7 +728,7 @@ impl serde::Serialize for StoreKvPair { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for StoreKvPair { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -744,7 +744,7 @@ impl<'de> serde::Deserialize<'de> for StoreKvPair { Key, Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs index 469e7630..4cb92e47 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.tendermint.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AbciQueryRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -40,7 +40,7 @@ impl serde::Serialize for AbciQueryRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AbciQueryRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -56,7 +56,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryRequest { Height, Prove, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -156,7 +156,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AbciQueryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -232,7 +232,7 @@ impl serde::Serialize for AbciQueryResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AbciQueryResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -264,7 +264,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { Height, Codespace, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -418,7 +418,7 @@ impl<'de> serde::Deserialize<'de> for AbciQueryResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Block { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -456,7 +456,7 @@ impl serde::Serialize for Block { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Block { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -472,7 +472,7 @@ impl<'de> serde::Deserialize<'de> for Block { Evidence, LastCommit, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -566,7 +566,7 @@ impl<'de> serde::Deserialize<'de> for Block { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetBlockByHeightRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -589,7 +589,7 @@ impl serde::Serialize for GetBlockByHeightRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetBlockByHeightRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -602,7 +602,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightRequest { enum GeneratedField { Height, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -675,7 +675,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetBlockByHeightResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -709,7 +709,7 @@ impl serde::Serialize for GetBlockByHeightResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -724,7 +724,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { Block, SdkBlock, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -813,7 +813,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockByHeightResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetLatestBlockRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -827,7 +827,7 @@ impl serde::Serialize for GetLatestBlockRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetLatestBlockRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -838,7 +838,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -895,7 +895,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetLatestBlockResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -927,7 +927,7 @@ impl serde::Serialize for GetLatestBlockResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -942,7 +942,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { Block, SdkBlock, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1030,7 +1030,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestBlockResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetLatestValidatorSetRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1052,7 +1052,7 @@ impl serde::Serialize for GetLatestValidatorSetRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1065,7 +1065,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1136,7 +1136,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetLatestValidatorSetResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1174,7 +1174,7 @@ impl serde::Serialize for GetLatestValidatorSetResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1189,7 +1189,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { Validators, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1282,7 +1282,7 @@ impl<'de> serde::Deserialize<'de> for GetLatestValidatorSetResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetNodeInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1296,7 +1296,7 @@ impl serde::Serialize for GetNodeInfoRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1307,7 +1307,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1361,7 +1361,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetNodeInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1387,7 +1387,7 @@ impl serde::Serialize for GetNodeInfoResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1406,7 +1406,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { DefaultNodeInfo, ApplicationVersion, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1488,7 +1488,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetSyncingRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1502,7 +1502,7 @@ impl serde::Serialize for GetSyncingRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetSyncingRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1513,7 +1513,7 @@ impl<'de> serde::Deserialize<'de> for GetSyncingRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1567,7 +1567,7 @@ impl<'de> serde::Deserialize<'de> for GetSyncingRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetSyncingResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1587,7 +1587,7 @@ impl serde::Serialize for GetSyncingResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetSyncingResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1600,7 +1600,7 @@ impl<'de> serde::Deserialize<'de> for GetSyncingResponse { enum GeneratedField { Syncing, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1667,7 +1667,7 @@ impl<'de> serde::Deserialize<'de> for GetSyncingResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetValidatorSetByHeightRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1696,7 +1696,7 @@ impl serde::Serialize for GetValidatorSetByHeightRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1710,7 +1710,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { Height, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1794,7 +1794,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetValidatorSetByHeightResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1832,7 +1832,7 @@ impl serde::Serialize for GetValidatorSetByHeightResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1847,7 +1847,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { Validators, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1940,7 +1940,7 @@ impl<'de> serde::Deserialize<'de> for GetValidatorSetByHeightResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Header { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2071,7 +2071,7 @@ impl serde::Serialize for Header { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Header { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2123,7 +2123,7 @@ impl<'de> serde::Deserialize<'de> for Header { EvidenceHash, ProposerAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2346,7 +2346,7 @@ impl<'de> serde::Deserialize<'de> for Header { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Module { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2378,7 +2378,7 @@ impl serde::Serialize for Module { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Module { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2393,7 +2393,7 @@ impl<'de> serde::Deserialize<'de> for Module { Version, Sum, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2478,7 +2478,7 @@ impl<'de> serde::Deserialize<'de> for Module { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ProofOp { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2514,7 +2514,7 @@ impl serde::Serialize for ProofOp { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ProofOp { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2529,7 +2529,7 @@ impl<'de> serde::Deserialize<'de> for ProofOp { Key, Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2620,7 +2620,7 @@ impl<'de> serde::Deserialize<'de> for ProofOp { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ProofOps { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2640,7 +2640,7 @@ impl serde::Serialize for ProofOps { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ProofOps { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2653,7 +2653,7 @@ impl<'de> serde::Deserialize<'de> for ProofOps { enum GeneratedField { Ops, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2720,7 +2720,7 @@ impl<'de> serde::Deserialize<'de> for ProofOps { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Validator { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2766,7 +2766,7 @@ impl serde::Serialize for Validator { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Validator { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2790,7 +2790,7 @@ impl<'de> serde::Deserialize<'de> for Validator { VotingPower, ProposerPriority, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2892,7 +2892,7 @@ impl<'de> serde::Deserialize<'de> for Validator { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for VersionInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2954,7 +2954,7 @@ impl serde::Serialize for VersionInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for VersionInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2989,7 +2989,7 @@ impl<'de> serde::Deserialize<'de> for VersionInfo { BuildDeps, CosmosSdkVersion, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs index 63cadeef..92880130 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.base.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Coin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,7 +24,7 @@ impl serde::Serialize for Coin { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Coin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -38,7 +38,7 @@ impl<'de> serde::Deserialize<'de> for Coin { Denom, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -110,7 +110,7 @@ impl<'de> serde::Deserialize<'de> for Coin { deserializer.deserialize_struct("cosmos.base.v1beta1.Coin", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DecCoin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -135,7 +135,7 @@ impl serde::Serialize for DecCoin { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DecCoin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -149,7 +149,7 @@ impl<'de> serde::Deserialize<'de> for DecCoin { Denom, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -221,7 +221,7 @@ impl<'de> serde::Deserialize<'de> for DecCoin { deserializer.deserialize_struct("cosmos.base.v1beta1.DecCoin", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DecProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -240,7 +240,7 @@ impl serde::Serialize for DecProto { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DecProto { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -253,7 +253,7 @@ impl<'de> serde::Deserialize<'de> for DecProto { enum GeneratedField { Dec, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -316,7 +316,7 @@ impl<'de> serde::Deserialize<'de> for DecProto { deserializer.deserialize_struct("cosmos.base.v1beta1.DecProto", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for IntProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -335,7 +335,7 @@ impl serde::Serialize for IntProto { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for IntProto { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -348,7 +348,7 @@ impl<'de> serde::Deserialize<'de> for IntProto { enum GeneratedField { Int, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs index 8622d118..0ee701e3 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.capability.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Capability { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -20,7 +20,7 @@ impl serde::Serialize for Capability { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Capability { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -33,7 +33,7 @@ impl<'de> serde::Deserialize<'de> for Capability { enum GeneratedField { Index, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -103,7 +103,7 @@ impl<'de> serde::Deserialize<'de> for Capability { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CapabilityOwners { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -123,7 +123,7 @@ impl serde::Serialize for CapabilityOwners { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CapabilityOwners { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -136,7 +136,7 @@ impl<'de> serde::Deserialize<'de> for CapabilityOwners { enum GeneratedField { Owners, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -203,7 +203,7 @@ impl<'de> serde::Deserialize<'de> for CapabilityOwners { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisOwners { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -230,7 +230,7 @@ impl serde::Serialize for GenesisOwners { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisOwners { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -244,7 +244,7 @@ impl<'de> serde::Deserialize<'de> for GenesisOwners { Index, IndexOwners, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -323,7 +323,7 @@ impl<'de> serde::Deserialize<'de> for GenesisOwners { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -350,7 +350,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -364,7 +364,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Index, Owners, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -443,7 +443,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Owner { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -468,7 +468,7 @@ impl serde::Serialize for Owner { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Owner { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -482,7 +482,7 @@ impl<'de> serde::Deserialize<'de> for Owner { Module, Name, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs index 26d073e8..3ff1baff 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crisis.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -19,7 +19,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -32,7 +32,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { ConstantFee, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -99,7 +99,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVerifyInvariant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -131,7 +131,7 @@ impl serde::Serialize for MsgVerifyInvariant { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -152,7 +152,7 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { InvariantModuleName, InvariantRoute, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -243,7 +243,7 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariant { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVerifyInvariantResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -257,7 +257,7 @@ impl serde::Serialize for MsgVerifyInvariantResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVerifyInvariantResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -268,7 +268,7 @@ impl<'de> serde::Deserialize<'de> for MsgVerifyInvariantResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs index 6279b7b2..9e7f0c8e 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.ed25519.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PrivKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -20,7 +20,7 @@ impl serde::Serialize for PrivKey { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PrivKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -33,7 +33,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { enum GeneratedField { Key, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -99,7 +99,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { deserializer.deserialize_struct("cosmos.crypto.ed25519.PrivKey", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PubKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -120,7 +120,7 @@ impl serde::Serialize for PubKey { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PubKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -133,7 +133,7 @@ impl<'de> serde::Deserialize<'de> for PubKey { enum GeneratedField { Key, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs index 9f1b9f16..2f8be019 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.hd.v1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Bip44Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -42,7 +42,7 @@ impl serde::Serialize for Bip44Params { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Bip44Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -67,7 +67,7 @@ impl<'de> serde::Deserialize<'de> for Bip44Params { Change, AddressIndex, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs index ed4b0c21..6e8dcdb7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.keyring.v1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Record { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -43,7 +43,7 @@ impl serde::Serialize for Record { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Record { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -63,7 +63,7 @@ impl<'de> serde::Deserialize<'de> for Record { Multi, Offline, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -173,7 +173,7 @@ impl<'de> serde::Deserialize<'de> for Record { deserializer.deserialize_struct("cosmos.crypto.keyring.v1.Record", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for record::Ledger { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -193,7 +193,7 @@ impl serde::Serialize for record::Ledger { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for record::Ledger { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -206,7 +206,7 @@ impl<'de> serde::Deserialize<'de> for record::Ledger { enum GeneratedField { Path, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -271,7 +271,7 @@ impl<'de> serde::Deserialize<'de> for record::Ledger { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for record::Local { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -291,7 +291,7 @@ impl serde::Serialize for record::Local { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for record::Local { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -304,7 +304,7 @@ impl<'de> serde::Deserialize<'de> for record::Local { enum GeneratedField { PrivKey, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -371,7 +371,7 @@ impl<'de> serde::Deserialize<'de> for record::Local { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for record::Multi { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -385,7 +385,7 @@ impl serde::Serialize for record::Multi { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for record::Multi { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -396,7 +396,7 @@ impl<'de> serde::Deserialize<'de> for record::Multi { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -450,7 +450,7 @@ impl<'de> serde::Deserialize<'de> for record::Multi { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for record::Offline { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -464,7 +464,7 @@ impl serde::Serialize for record::Offline { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for record::Offline { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -475,7 +475,7 @@ impl<'de> serde::Deserialize<'de> for record::Offline { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs index aa86f829..fc8f40bd 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for LegacyAminoPubKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,7 +25,7 @@ impl serde::Serialize for LegacyAminoPubKey { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for LegacyAminoPubKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for LegacyAminoPubKey { Threshold, PublicKeys, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs index 88819ebb..710a19db 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.multisig.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CompactBitArray { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -29,7 +29,7 @@ impl serde::Serialize for CompactBitArray { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CompactBitArray { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -43,7 +43,7 @@ impl<'de> serde::Deserialize<'de> for CompactBitArray { ExtraBitsStored, Elems, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -127,7 +127,7 @@ impl<'de> serde::Deserialize<'de> for CompactBitArray { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MultiSignature { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -154,7 +154,7 @@ impl serde::Serialize for MultiSignature { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MultiSignature { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -167,7 +167,7 @@ impl<'de> serde::Deserialize<'de> for MultiSignature { enum GeneratedField { Signatures, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs index 61b7f0c6..d86db770 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256k1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PrivKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -20,7 +20,7 @@ impl serde::Serialize for PrivKey { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PrivKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -33,7 +33,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { enum GeneratedField { Key, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -99,7 +99,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { deserializer.deserialize_struct("cosmos.crypto.secp256k1.PrivKey", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PubKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -120,7 +120,7 @@ impl serde::Serialize for PubKey { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PubKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -133,7 +133,7 @@ impl<'de> serde::Deserialize<'de> for PubKey { enum GeneratedField { Key, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs index 18b36eda..f209b80d 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.crypto.secp256r1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PrivKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -22,7 +22,7 @@ impl serde::Serialize for PrivKey { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PrivKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -35,7 +35,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { enum GeneratedField { Secret, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -101,7 +101,7 @@ impl<'de> serde::Deserialize<'de> for PrivKey { deserializer.deserialize_struct("cosmos.crypto.secp256r1.PrivKey", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PubKey { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -122,7 +122,7 @@ impl serde::Serialize for PubKey { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PubKey { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -135,7 +135,7 @@ impl<'de> serde::Deserialize<'de> for PubKey { enum GeneratedField { Key, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs index 251f905d..72437a02 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.distribution.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CommunityPoolSpendProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -39,7 +39,7 @@ impl serde::Serialize for CommunityPoolSpendProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -55,7 +55,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { Recipient, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -152,7 +152,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CommunityPoolSpendProposalWithDeposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -198,7 +198,7 @@ impl serde::Serialize for CommunityPoolSpendProposalWithDeposit { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -215,7 +215,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { Amount, Deposit, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -323,7 +323,7 @@ impl<'de> serde::Deserialize<'de> for CommunityPoolSpendProposalWithDeposit { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DelegationDelegatorReward { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -349,7 +349,7 @@ impl serde::Serialize for DelegationDelegatorReward { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DelegationDelegatorReward { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -363,7 +363,7 @@ impl<'de> serde::Deserialize<'de> for DelegationDelegatorReward { ValidatorAddress, Reward, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -444,7 +444,7 @@ impl<'de> serde::Deserialize<'de> for DelegationDelegatorReward { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DelegatorStartingInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -481,7 +481,7 @@ impl serde::Serialize for DelegatorStartingInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -496,7 +496,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { Stake, Height, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -592,7 +592,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfo { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DelegatorStartingInfoRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -626,7 +626,7 @@ impl serde::Serialize for DelegatorStartingInfoRecord { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -648,7 +648,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { ValidatorAddress, StartingInfo, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -741,7 +741,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorStartingInfoRecord { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DelegatorWithdrawInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -767,7 +767,7 @@ impl serde::Serialize for DelegatorWithdrawInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DelegatorWithdrawInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -786,7 +786,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorWithdrawInfo { DelegatorAddress, WithdrawAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -869,7 +869,7 @@ impl<'de> serde::Deserialize<'de> for DelegatorWithdrawInfo { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for FeePool { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -889,7 +889,7 @@ impl serde::Serialize for FeePool { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for FeePool { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -902,7 +902,7 @@ impl<'de> serde::Deserialize<'de> for FeePool { enum GeneratedField { CommunityPool, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -969,7 +969,7 @@ impl<'de> serde::Deserialize<'de> for FeePool { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1050,7 +1050,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1092,7 +1092,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { DelegatorStartingInfos, ValidatorSlashEvents, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1273,7 +1273,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgFundCommunityPool { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1299,7 +1299,7 @@ impl serde::Serialize for MsgFundCommunityPool { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgFundCommunityPool { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1313,7 +1313,7 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPool { Amount, Depositor, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1392,7 +1392,7 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPool { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgFundCommunityPoolResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1408,7 +1408,7 @@ impl serde::Serialize for MsgFundCommunityPoolResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgFundCommunityPoolResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1419,7 +1419,7 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPoolResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1477,7 +1477,7 @@ impl<'de> serde::Deserialize<'de> for MsgFundCommunityPoolResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSetWithdrawAddress { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1503,7 +1503,7 @@ impl serde::Serialize for MsgSetWithdrawAddress { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddress { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1522,7 +1522,7 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddress { DelegatorAddress, WithdrawAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1605,7 +1605,7 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddress { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSetWithdrawAddressResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1621,7 +1621,7 @@ impl serde::Serialize for MsgSetWithdrawAddressResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddressResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1632,7 +1632,7 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddressResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1690,7 +1690,7 @@ impl<'de> serde::Deserialize<'de> for MsgSetWithdrawAddressResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgWithdrawDelegatorReward { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1718,7 +1718,7 @@ impl serde::Serialize for MsgWithdrawDelegatorReward { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorReward { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1737,7 +1737,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorReward { DelegatorAddress, ValidatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1820,7 +1820,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorReward { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgWithdrawDelegatorRewardResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1842,7 +1842,7 @@ impl serde::Serialize for MsgWithdrawDelegatorRewardResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorRewardResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1855,7 +1855,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorRewardResponse { enum GeneratedField { Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1927,7 +1927,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawDelegatorRewardResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgWithdrawValidatorCommission { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1949,7 +1949,7 @@ impl serde::Serialize for MsgWithdrawValidatorCommission { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommission { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1962,7 +1962,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommission { enum GeneratedField { ValidatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2035,7 +2035,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommission { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgWithdrawValidatorCommissionResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2057,7 +2057,7 @@ impl serde::Serialize for MsgWithdrawValidatorCommissionResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommissionResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2070,7 +2070,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommissionResponse { enum GeneratedField { Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2142,7 +2142,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawValidatorCommissionResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2180,7 +2180,7 @@ impl serde::Serialize for Params { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2205,7 +2205,7 @@ impl<'de> serde::Deserialize<'de> for Params { BonusProposerReward, WithdrawAddrEnabled, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2311,7 +2311,7 @@ impl<'de> serde::Deserialize<'de> for Params { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryCommunityPoolRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2325,7 +2325,7 @@ impl serde::Serialize for QueryCommunityPoolRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryCommunityPoolRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2336,7 +2336,7 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2393,7 +2393,7 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryCommunityPoolResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2415,7 +2415,7 @@ impl serde::Serialize for QueryCommunityPoolResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryCommunityPoolResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2428,7 +2428,7 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolResponse { enum GeneratedField { Pool, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2498,7 +2498,7 @@ impl<'de> serde::Deserialize<'de> for QueryCommunityPoolResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegationRewardsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2526,7 +2526,7 @@ impl serde::Serialize for QueryDelegationRewardsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2545,7 +2545,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsRequest { DelegatorAddress, ValidatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2629,7 +2629,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegationRewardsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2651,7 +2651,7 @@ impl serde::Serialize for QueryDelegationRewardsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2664,7 +2664,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsResponse { enum GeneratedField { Rewards, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2735,7 +2735,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRewardsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegationTotalRewardsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2757,7 +2757,7 @@ impl serde::Serialize for QueryDelegationTotalRewardsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2770,7 +2770,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsRequest { enum GeneratedField { DelegatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2844,7 +2844,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegationTotalRewardsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2872,7 +2872,7 @@ impl serde::Serialize for QueryDelegationTotalRewardsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2886,7 +2886,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsResponse { Rewards, Total, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2967,7 +2967,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationTotalRewardsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorValidatorsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2989,7 +2989,7 @@ impl serde::Serialize for QueryDelegatorValidatorsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3002,7 +3002,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { enum GeneratedField { DelegatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3075,7 +3075,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorValidatorsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3097,7 +3097,7 @@ impl serde::Serialize for QueryDelegatorValidatorsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3110,7 +3110,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { enum GeneratedField { Validators, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3182,7 +3182,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorWithdrawAddressRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3204,7 +3204,7 @@ impl serde::Serialize for QueryDelegatorWithdrawAddressRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3217,7 +3217,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressRequest { enum GeneratedField { DelegatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3291,7 +3291,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorWithdrawAddressResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3313,7 +3313,7 @@ impl serde::Serialize for QueryDelegatorWithdrawAddressResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3326,7 +3326,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressResponse { enum GeneratedField { WithdrawAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3400,7 +3400,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorWithdrawAddressResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3414,7 +3414,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3425,7 +3425,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3479,7 +3479,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3499,7 +3499,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3512,7 +3512,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3577,7 +3577,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorCommissionRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3599,7 +3599,7 @@ impl serde::Serialize for QueryValidatorCommissionRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3612,7 +3612,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionRequest { enum GeneratedField { ValidatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3685,7 +3685,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorCommissionResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3707,7 +3707,7 @@ impl serde::Serialize for QueryValidatorCommissionResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3720,7 +3720,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionResponse { enum GeneratedField { Commission, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3792,7 +3792,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorCommissionResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorOutstandingRewardsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3814,7 +3814,7 @@ impl serde::Serialize for QueryValidatorOutstandingRewardsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3827,7 +3827,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsRequest { enum GeneratedField { ValidatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3901,7 +3901,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorOutstandingRewardsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3923,7 +3923,7 @@ impl serde::Serialize for QueryValidatorOutstandingRewardsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3936,7 +3936,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsResponse { enum GeneratedField { Rewards, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4006,7 +4006,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorOutstandingRewardsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorSlashesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4054,7 +4054,7 @@ impl serde::Serialize for QueryValidatorSlashesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4078,7 +4078,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { EndingHeight, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4186,7 +4186,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorSlashesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4214,7 +4214,7 @@ impl serde::Serialize for QueryValidatorSlashesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4228,7 +4228,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesResponse { Slashes, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4308,7 +4308,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorSlashesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorAccumulatedCommission { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4330,7 +4330,7 @@ impl serde::Serialize for ValidatorAccumulatedCommission { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommission { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4343,7 +4343,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommission { enum GeneratedField { Commission, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4414,7 +4414,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommission { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorAccumulatedCommissionRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4442,7 +4442,7 @@ impl serde::Serialize for ValidatorAccumulatedCommissionRecord { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommissionRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4456,7 +4456,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommissionRecord { ValidatorAddress, Accumulated, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4539,7 +4539,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorAccumulatedCommissionRecord { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorCurrentRewards { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4566,7 +4566,7 @@ impl serde::Serialize for ValidatorCurrentRewards { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewards { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4580,7 +4580,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewards { Rewards, Period, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4662,7 +4662,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewards { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorCurrentRewardsRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4690,7 +4690,7 @@ impl serde::Serialize for ValidatorCurrentRewardsRecord { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewardsRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4704,7 +4704,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewardsRecord { ValidatorAddress, Rewards, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4786,7 +4786,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorCurrentRewardsRecord { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorHistoricalRewards { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4814,7 +4814,7 @@ impl serde::Serialize for ValidatorHistoricalRewards { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4833,7 +4833,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { CumulativeRewardRatio, ReferenceCount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4921,7 +4921,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewards { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorHistoricalRewardsRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4956,7 +4956,7 @@ impl serde::Serialize for ValidatorHistoricalRewardsRecord { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4971,7 +4971,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { Period, Rewards, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5066,7 +5066,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorHistoricalRewardsRecord { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorOutstandingRewards { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5088,7 +5088,7 @@ impl serde::Serialize for ValidatorOutstandingRewards { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewards { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5101,7 +5101,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewards { enum GeneratedField { Rewards, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5172,7 +5172,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewards { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorOutstandingRewardsRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5200,7 +5200,7 @@ impl serde::Serialize for ValidatorOutstandingRewardsRecord { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5219,7 +5219,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { ValidatorAddress, OutstandingRewards, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5306,7 +5306,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorOutstandingRewardsRecord { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorSlashEvent { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5336,7 +5336,7 @@ impl serde::Serialize for ValidatorSlashEvent { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5350,7 +5350,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { ValidatorPeriod, Fraction, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5431,7 +5431,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvent { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorSlashEventRecord { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5471,7 +5471,7 @@ impl serde::Serialize for ValidatorSlashEventRecord { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5494,7 +5494,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { Period, ValidatorSlashEvent, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5603,7 +5603,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEventRecord { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorSlashEvents { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5623,7 +5623,7 @@ impl serde::Serialize for ValidatorSlashEvents { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorSlashEvents { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5636,7 +5636,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSlashEvents { enum GeneratedField { ValidatorSlashEvents, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs index cf9e904b..356b819f 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.evidence.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Equivocation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -39,7 +39,7 @@ impl serde::Serialize for Equivocation { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Equivocation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -61,7 +61,7 @@ impl<'de> serde::Deserialize<'de> for Equivocation { Power, ConsensusAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -163,7 +163,7 @@ impl<'de> serde::Deserialize<'de> for Equivocation { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -183,7 +183,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -196,7 +196,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { Evidence, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -263,7 +263,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSubmitEvidence { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -289,7 +289,7 @@ impl serde::Serialize for MsgSubmitEvidence { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSubmitEvidence { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -303,7 +303,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidence { Submitter, Evidence, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -379,7 +379,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidence { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSubmitEvidenceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -401,7 +401,7 @@ impl serde::Serialize for MsgSubmitEvidenceResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSubmitEvidenceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -414,7 +414,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidenceResponse { enum GeneratedField { Hash, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -487,7 +487,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitEvidenceResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllEvidenceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -507,7 +507,7 @@ impl serde::Serialize for QueryAllEvidenceRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllEvidenceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -520,7 +520,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -590,7 +590,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllEvidenceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -616,7 +616,7 @@ impl serde::Serialize for QueryAllEvidenceResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllEvidenceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -630,7 +630,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceResponse { Evidence, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -709,7 +709,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllEvidenceResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryEvidenceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -733,7 +733,7 @@ impl serde::Serialize for QueryEvidenceRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryEvidenceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -746,7 +746,7 @@ impl<'de> serde::Deserialize<'de> for QueryEvidenceRequest { enum GeneratedField { EvidenceHash, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -819,7 +819,7 @@ impl<'de> serde::Deserialize<'de> for QueryEvidenceRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryEvidenceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -839,7 +839,7 @@ impl serde::Serialize for QueryEvidenceResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryEvidenceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -852,7 +852,7 @@ impl<'de> serde::Deserialize<'de> for QueryEvidenceResponse { enum GeneratedField { Evidence, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs index 82c7ae3d..1d1bcf08 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.feegrant.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AllowedMsgAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,7 +25,7 @@ impl serde::Serialize for AllowedMsgAllowance { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AllowedMsgAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for AllowedMsgAllowance { Allowance, AllowedMessages, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -117,7 +117,7 @@ impl<'de> serde::Deserialize<'de> for AllowedMsgAllowance { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for BasicAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -143,7 +143,7 @@ impl serde::Serialize for BasicAllowance { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for BasicAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -157,7 +157,7 @@ impl<'de> serde::Deserialize<'de> for BasicAllowance { SpendLimit, Expiration, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -233,7 +233,7 @@ impl<'de> serde::Deserialize<'de> for BasicAllowance { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -253,7 +253,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -266,7 +266,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { Allowances, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -333,7 +333,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Grant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -364,7 +364,7 @@ impl serde::Serialize for Grant { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Grant { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -379,7 +379,7 @@ impl<'de> serde::Deserialize<'de> for Grant { Grantee, Allowance, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -460,7 +460,7 @@ impl<'de> serde::Deserialize<'de> for Grant { deserializer.deserialize_struct("cosmos.feegrant.v1beta1.Grant", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgGrantAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -492,7 +492,7 @@ impl serde::Serialize for MsgGrantAllowance { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgGrantAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -507,7 +507,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowance { Grantee, Allowance, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -592,7 +592,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowance { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgGrantAllowanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -606,7 +606,7 @@ impl serde::Serialize for MsgGrantAllowanceResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgGrantAllowanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -617,7 +617,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowanceResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -674,7 +674,7 @@ impl<'de> serde::Deserialize<'de> for MsgGrantAllowanceResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgRevokeAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -700,7 +700,7 @@ impl serde::Serialize for MsgRevokeAllowance { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgRevokeAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -714,7 +714,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowance { Granter, Grantee, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -790,7 +790,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowance { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgRevokeAllowanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -804,7 +804,7 @@ impl serde::Serialize for MsgRevokeAllowanceResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgRevokeAllowanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -815,7 +815,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowanceResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -872,7 +872,7 @@ impl<'de> serde::Deserialize<'de> for MsgRevokeAllowanceResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PeriodicAllowance { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -916,7 +916,7 @@ impl serde::Serialize for PeriodicAllowance { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PeriodicAllowance { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -942,7 +942,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicAllowance { PeriodCanSpend, PeriodReset, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1049,7 +1049,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicAllowance { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllowanceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1075,7 +1075,7 @@ impl serde::Serialize for QueryAllowanceRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllowanceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1089,7 +1089,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceRequest { Granter, Grantee, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1168,7 +1168,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllowanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1188,7 +1188,7 @@ impl serde::Serialize for QueryAllowanceResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllowanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1201,7 +1201,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceResponse { enum GeneratedField { Allowance, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1271,7 +1271,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowanceResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllowancesByGranterRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1299,7 +1299,7 @@ impl serde::Serialize for QueryAllowancesByGranterRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1313,7 +1313,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterRequest { Granter, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1393,7 +1393,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllowancesByGranterResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1421,7 +1421,7 @@ impl serde::Serialize for QueryAllowancesByGranterResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1435,7 +1435,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterResponse { Allowances, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1515,7 +1515,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesByGranterResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllowancesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1541,7 +1541,7 @@ impl serde::Serialize for QueryAllowancesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllowancesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1555,7 +1555,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesRequest { Grantee, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1634,7 +1634,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllowancesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1660,7 +1660,7 @@ impl serde::Serialize for QueryAllowancesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllowancesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1674,7 +1674,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllowancesResponse { Allowances, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs index c5761f62..b4ba04e5 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.genutil.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -26,7 +26,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { enum GeneratedField { GenTxs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs index 01f7ae5f..b1603129 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Deposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -34,7 +34,7 @@ impl serde::Serialize for Deposit { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Deposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -49,7 +49,7 @@ impl<'de> serde::Deserialize<'de> for Deposit { Depositor, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -133,7 +133,7 @@ impl<'de> serde::Deserialize<'de> for Deposit { deserializer.deserialize_struct("cosmos.gov.v1.Deposit", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DepositParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -158,7 +158,7 @@ impl serde::Serialize for DepositParams { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DepositParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -177,7 +177,7 @@ impl<'de> serde::Deserialize<'de> for DepositParams { MinDeposit, MaxDepositPeriod, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -251,7 +251,7 @@ impl<'de> serde::Deserialize<'de> for DepositParams { deserializer.deserialize_struct("cosmos.gov.v1.DepositParams", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -310,7 +310,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -341,7 +341,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { VotingParams, TallyParams, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -465,7 +465,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmos.gov.v1.GenesisState", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgDeposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -500,7 +500,7 @@ impl serde::Serialize for MsgDeposit { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgDeposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -515,7 +515,7 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { Depositor, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -599,7 +599,7 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { deserializer.deserialize_struct("cosmos.gov.v1.MsgDeposit", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgDepositResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -612,7 +612,7 @@ impl serde::Serialize for MsgDepositResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgDepositResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -623,7 +623,7 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -677,7 +677,7 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgExecLegacyContent { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -703,7 +703,7 @@ impl serde::Serialize for MsgExecLegacyContent { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -717,7 +717,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { Content, Authority, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -796,7 +796,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContent { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgExecLegacyContentResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -810,7 +810,7 @@ impl serde::Serialize for MsgExecLegacyContentResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -821,7 +821,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -878,7 +878,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecLegacyContentResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSubmitProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -915,7 +915,7 @@ impl serde::Serialize for MsgSubmitProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -937,7 +937,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { Proposer, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1029,7 +1029,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { deserializer.deserialize_struct("cosmos.gov.v1.MsgSubmitProposal", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSubmitProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1053,7 +1053,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1066,7 +1066,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1139,7 +1139,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1183,7 +1183,7 @@ impl serde::Serialize for MsgVote { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1199,7 +1199,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { Option, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1292,7 +1292,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { deserializer.deserialize_struct("cosmos.gov.v1.MsgVote", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1305,7 +1305,7 @@ impl serde::Serialize for MsgVoteResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1316,7 +1316,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1366,7 +1366,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteResponse", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVoteWeighted { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1407,7 +1407,7 @@ impl serde::Serialize for MsgVoteWeighted { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1423,7 +1423,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { Options, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1516,7 +1516,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { deserializer.deserialize_struct("cosmos.gov.v1.MsgVoteWeighted", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVoteWeightedResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1530,7 +1530,7 @@ impl serde::Serialize for MsgVoteWeightedResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1541,7 +1541,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1598,7 +1598,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Proposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1675,7 +1675,7 @@ impl serde::Serialize for Proposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Proposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1714,7 +1714,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { VotingEndTime, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1869,7 +1869,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { deserializer.deserialize_struct("cosmos.gov.v1.Proposal", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ProposalStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1887,7 +1887,7 @@ impl serde::Serialize for ProposalStatus { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ProposalStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1954,7 +1954,7 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDepositRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1984,7 +1984,7 @@ impl serde::Serialize for QueryDepositRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDepositRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1998,7 +1998,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { ProposalId, Depositor, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2077,7 +2077,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDepositResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2097,7 +2097,7 @@ impl serde::Serialize for QueryDepositResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDepositResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2110,7 +2110,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { enum GeneratedField { Deposit, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2178,7 +2178,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDepositsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2208,7 +2208,7 @@ impl serde::Serialize for QueryDepositsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2222,7 +2222,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { ProposalId, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2304,7 +2304,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDepositsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2330,7 +2330,7 @@ impl serde::Serialize for QueryDepositsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2344,7 +2344,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { Deposits, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2423,7 +2423,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2443,7 +2443,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2456,7 +2456,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { enum GeneratedField { ParamsType, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2523,7 +2523,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2555,7 +2555,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2577,7 +2577,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { DepositParams, TallyParams, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2662,7 +2662,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2686,7 +2686,7 @@ impl serde::Serialize for QueryProposalRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2699,7 +2699,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2772,7 +2772,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2792,7 +2792,7 @@ impl serde::Serialize for QueryProposalResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2805,7 +2805,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { enum GeneratedField { Proposal, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2875,7 +2875,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2916,7 +2916,7 @@ impl serde::Serialize for QueryProposalsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2938,7 +2938,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { Depositor, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3037,7 +3037,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3063,7 +3063,7 @@ impl serde::Serialize for QueryProposalsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3077,7 +3077,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { Proposals, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3156,7 +3156,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryTallyResultRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3180,7 +3180,7 @@ impl serde::Serialize for QueryTallyResultRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3193,7 +3193,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3266,7 +3266,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryTallyResultResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3286,7 +3286,7 @@ impl serde::Serialize for QueryTallyResultResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3299,7 +3299,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { enum GeneratedField { Tally, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3367,7 +3367,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVoteRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3396,7 +3396,7 @@ impl serde::Serialize for QueryVoteRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVoteRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3410,7 +3410,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { ProposalId, Voter, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3485,7 +3485,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { deserializer.deserialize_struct("cosmos.gov.v1.QueryVoteRequest", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3504,7 +3504,7 @@ impl serde::Serialize for QueryVoteResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3517,7 +3517,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { enum GeneratedField { Vote, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3578,7 +3578,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { deserializer.deserialize_struct("cosmos.gov.v1.QueryVoteResponse", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVotesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3607,7 +3607,7 @@ impl serde::Serialize for QueryVotesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVotesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3621,7 +3621,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { ProposalId, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3696,7 +3696,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { deserializer.deserialize_struct("cosmos.gov.v1.QueryVotesRequest", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVotesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3722,7 +3722,7 @@ impl serde::Serialize for QueryVotesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVotesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3736,7 +3736,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { Votes, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3812,7 +3812,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TallyParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3843,7 +3843,7 @@ impl serde::Serialize for TallyParams { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TallyParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3858,7 +3858,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { Threshold, VetoThreshold, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3939,7 +3939,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { deserializer.deserialize_struct("cosmos.gov.v1.TallyParams", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TallyResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3976,7 +3976,7 @@ impl serde::Serialize for TallyResult { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TallyResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4001,7 +4001,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { NoCount, NoWithVetoCount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4093,7 +4093,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { deserializer.deserialize_struct("cosmos.gov.v1.TallyResult", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Vote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4134,7 +4134,7 @@ impl serde::Serialize for Vote { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Vote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4150,7 +4150,7 @@ impl<'de> serde::Deserialize<'de> for Vote { Options, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4243,7 +4243,7 @@ impl<'de> serde::Deserialize<'de> for Vote { deserializer.deserialize_struct("cosmos.gov.v1.Vote", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for VoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4260,7 +4260,7 @@ impl serde::Serialize for VoteOption { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for VoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4325,7 +4325,7 @@ impl<'de> serde::Deserialize<'de> for VoteOption { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for VotingParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4344,7 +4344,7 @@ impl serde::Serialize for VotingParams { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for VotingParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4357,7 +4357,7 @@ impl<'de> serde::Deserialize<'de> for VotingParams { enum GeneratedField { VotingPeriod, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4420,7 +4420,7 @@ impl<'de> serde::Deserialize<'de> for VotingParams { deserializer.deserialize_struct("cosmos.gov.v1.VotingParams", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for WeightedVoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4449,7 +4449,7 @@ impl serde::Serialize for WeightedVoteOption { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for WeightedVoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4463,7 +4463,7 @@ impl<'de> serde::Deserialize<'de> for WeightedVoteOption { Option, Weight, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs index f2e80741..e67aaac7 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.gov.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Deposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -34,7 +34,7 @@ impl serde::Serialize for Deposit { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Deposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -49,7 +49,7 @@ impl<'de> serde::Deserialize<'de> for Deposit { Depositor, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -133,7 +133,7 @@ impl<'de> serde::Deserialize<'de> for Deposit { deserializer.deserialize_struct("cosmos.gov.v1beta1.Deposit", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DepositParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -159,7 +159,7 @@ impl serde::Serialize for DepositParams { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DepositParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -178,7 +178,7 @@ impl<'de> serde::Deserialize<'de> for DepositParams { MinDeposit, MaxDepositPeriod, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -256,7 +256,7 @@ impl<'de> serde::Deserialize<'de> for DepositParams { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -315,7 +315,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -346,7 +346,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { VotingParams, TallyParams, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -470,7 +470,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmos.gov.v1beta1.GenesisState", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgDeposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -505,7 +505,7 @@ impl serde::Serialize for MsgDeposit { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgDeposit { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -520,7 +520,7 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { Depositor, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -604,7 +604,7 @@ impl<'de> serde::Deserialize<'de> for MsgDeposit { deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgDeposit", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgDepositResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -618,7 +618,7 @@ impl serde::Serialize for MsgDepositResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgDepositResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -629,7 +629,7 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -683,7 +683,7 @@ impl<'de> serde::Deserialize<'de> for MsgDepositResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSubmitProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -715,7 +715,7 @@ impl serde::Serialize for MsgSubmitProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -730,7 +730,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { InitialDeposit, Proposer, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -817,7 +817,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSubmitProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -841,7 +841,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -854,7 +854,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -927,7 +927,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -965,7 +965,7 @@ impl serde::Serialize for MsgVote { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -980,7 +980,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { Voter, Option, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1064,7 +1064,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { deserializer.deserialize_struct("cosmos.gov.v1beta1.MsgVote", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1077,7 +1077,7 @@ impl serde::Serialize for MsgVoteResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1088,7 +1088,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1142,7 +1142,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVoteWeighted { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1178,7 +1178,7 @@ impl serde::Serialize for MsgVoteWeighted { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1193,7 +1193,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { Voter, Options, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1281,7 +1281,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeighted { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVoteWeightedResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1295,7 +1295,7 @@ impl serde::Serialize for MsgVoteWeightedResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1306,7 +1306,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1363,7 +1363,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteWeightedResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Proposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1437,7 +1437,7 @@ impl serde::Serialize for Proposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Proposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1475,7 +1475,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { VotingStartTime, VotingEndTime, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1621,7 +1621,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { deserializer.deserialize_struct("cosmos.gov.v1beta1.Proposal", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ProposalStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1639,7 +1639,7 @@ impl serde::Serialize for ProposalStatus { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ProposalStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1706,7 +1706,7 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDepositRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1736,7 +1736,7 @@ impl serde::Serialize for QueryDepositRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDepositRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1750,7 +1750,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { ProposalId, Depositor, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1829,7 +1829,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDepositResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1849,7 +1849,7 @@ impl serde::Serialize for QueryDepositResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDepositResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1862,7 +1862,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { enum GeneratedField { Deposit, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1930,7 +1930,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDepositsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1960,7 +1960,7 @@ impl serde::Serialize for QueryDepositsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1974,7 +1974,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { ProposalId, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2056,7 +2056,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDepositsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2082,7 +2082,7 @@ impl serde::Serialize for QueryDepositsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2096,7 +2096,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { Deposits, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2175,7 +2175,7 @@ impl<'de> serde::Deserialize<'de> for QueryDepositsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2195,7 +2195,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2208,7 +2208,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { enum GeneratedField { ParamsType, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2275,7 +2275,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2307,7 +2307,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2329,7 +2329,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { DepositParams, TallyParams, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2414,7 +2414,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2438,7 +2438,7 @@ impl serde::Serialize for QueryProposalRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2451,7 +2451,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2524,7 +2524,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2544,7 +2544,7 @@ impl serde::Serialize for QueryProposalResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2557,7 +2557,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { enum GeneratedField { Proposal, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2627,7 +2627,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2668,7 +2668,7 @@ impl serde::Serialize for QueryProposalsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2690,7 +2690,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { Depositor, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2789,7 +2789,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2815,7 +2815,7 @@ impl serde::Serialize for QueryProposalsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2829,7 +2829,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { Proposals, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2908,7 +2908,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryTallyResultRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2932,7 +2932,7 @@ impl serde::Serialize for QueryTallyResultRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2945,7 +2945,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3018,7 +3018,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryTallyResultResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3038,7 +3038,7 @@ impl serde::Serialize for QueryTallyResultResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3051,7 +3051,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { enum GeneratedField { Tally, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3119,7 +3119,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVoteRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3149,7 +3149,7 @@ impl serde::Serialize for QueryVoteRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVoteRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3163,7 +3163,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { ProposalId, Voter, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3242,7 +3242,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3262,7 +3262,7 @@ impl serde::Serialize for QueryVoteResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3275,7 +3275,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { enum GeneratedField { Vote, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3340,7 +3340,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVotesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3370,7 +3370,7 @@ impl serde::Serialize for QueryVotesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVotesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3384,7 +3384,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { ProposalId, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3463,7 +3463,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVotesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3489,7 +3489,7 @@ impl serde::Serialize for QueryVotesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVotesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3503,7 +3503,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { Votes, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3579,7 +3579,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TallyParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3622,7 +3622,7 @@ impl serde::Serialize for TallyParams { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TallyParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3637,7 +3637,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { Threshold, VetoThreshold, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3727,7 +3727,7 @@ impl<'de> serde::Deserialize<'de> for TallyParams { deserializer.deserialize_struct("cosmos.gov.v1beta1.TallyParams", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TallyResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3764,7 +3764,7 @@ impl serde::Serialize for TallyResult { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TallyResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3780,7 +3780,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { No, NoWithVeto, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3870,7 +3870,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { deserializer.deserialize_struct("cosmos.gov.v1beta1.TallyResult", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TextProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3895,7 +3895,7 @@ impl serde::Serialize for TextProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TextProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3909,7 +3909,7 @@ impl<'de> serde::Deserialize<'de> for TextProposal { Title, Description, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3981,7 +3981,7 @@ impl<'de> serde::Deserialize<'de> for TextProposal { deserializer.deserialize_struct("cosmos.gov.v1beta1.TextProposal", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Vote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4025,7 +4025,7 @@ impl serde::Serialize for Vote { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Vote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4041,7 +4041,7 @@ impl<'de> serde::Deserialize<'de> for Vote { Option, Options, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4134,7 +4134,7 @@ impl<'de> serde::Deserialize<'de> for Vote { deserializer.deserialize_struct("cosmos.gov.v1beta1.Vote", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for VoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4151,7 +4151,7 @@ impl serde::Serialize for VoteOption { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for VoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4216,7 +4216,7 @@ impl<'de> serde::Deserialize<'de> for VoteOption { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for VotingParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4235,7 +4235,7 @@ impl serde::Serialize for VotingParams { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for VotingParams { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4248,7 +4248,7 @@ impl<'de> serde::Deserialize<'de> for VotingParams { enum GeneratedField { VotingPeriod, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4311,7 +4311,7 @@ impl<'de> serde::Deserialize<'de> for VotingParams { deserializer.deserialize_struct("cosmos.gov.v1beta1.VotingParams", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for WeightedVoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4340,7 +4340,7 @@ impl serde::Serialize for WeightedVoteOption { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for WeightedVoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4354,7 +4354,7 @@ impl<'de> serde::Deserialize<'de> for WeightedVoteOption { Option, Weight, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs index 54e2c098..1eeadb41 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.group.v1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DecisionPolicyWindows { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,7 +25,7 @@ impl serde::Serialize for DecisionPolicyWindows { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -44,7 +44,7 @@ impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { VotingPeriod, MinExecutionPeriod, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -127,7 +127,7 @@ impl<'de> serde::Deserialize<'de> for DecisionPolicyWindows { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventCreateGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -148,7 +148,7 @@ impl serde::Serialize for EventCreateGroup { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventCreateGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -161,7 +161,7 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroup { enum GeneratedField { GroupId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -231,7 +231,7 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroup { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventCreateGroupPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -251,7 +251,7 @@ impl serde::Serialize for EventCreateGroupPolicy { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventCreateGroupPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -264,7 +264,7 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroupPolicy { enum GeneratedField { Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -334,7 +334,7 @@ impl<'de> serde::Deserialize<'de> for EventCreateGroupPolicy { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventExec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -372,7 +372,7 @@ impl serde::Serialize for EventExec { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventExec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -387,7 +387,7 @@ impl<'de> serde::Deserialize<'de> for EventExec { Result, Logs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -471,7 +471,7 @@ impl<'de> serde::Deserialize<'de> for EventExec { deserializer.deserialize_struct("cosmos.group.v1.EventExec", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventLeaveGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -497,7 +497,7 @@ impl serde::Serialize for EventLeaveGroup { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventLeaveGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -511,7 +511,7 @@ impl<'de> serde::Deserialize<'de> for EventLeaveGroup { GroupId, Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -586,7 +586,7 @@ impl<'de> serde::Deserialize<'de> for EventLeaveGroup { deserializer.deserialize_struct("cosmos.group.v1.EventLeaveGroup", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventProposalPruned { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -625,7 +625,7 @@ impl serde::Serialize for EventProposalPruned { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventProposalPruned { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -646,7 +646,7 @@ impl<'de> serde::Deserialize<'de> for EventProposalPruned { Status, TallyResult, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -734,7 +734,7 @@ impl<'de> serde::Deserialize<'de> for EventProposalPruned { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventSubmitProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -758,7 +758,7 @@ impl serde::Serialize for EventSubmitProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventSubmitProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -771,7 +771,7 @@ impl<'de> serde::Deserialize<'de> for EventSubmitProposal { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -841,7 +841,7 @@ impl<'de> serde::Deserialize<'de> for EventSubmitProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventUpdateGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -862,7 +862,7 @@ impl serde::Serialize for EventUpdateGroup { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventUpdateGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -875,7 +875,7 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroup { enum GeneratedField { GroupId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -945,7 +945,7 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroup { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventUpdateGroupPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -965,7 +965,7 @@ impl serde::Serialize for EventUpdateGroupPolicy { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventUpdateGroupPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -978,7 +978,7 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroupPolicy { enum GeneratedField { Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1048,7 +1048,7 @@ impl<'de> serde::Deserialize<'de> for EventUpdateGroupPolicy { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventVote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1071,7 +1071,7 @@ impl serde::Serialize for EventVote { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventVote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1084,7 +1084,7 @@ impl<'de> serde::Deserialize<'de> for EventVote { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1150,7 +1150,7 @@ impl<'de> serde::Deserialize<'de> for EventVote { deserializer.deserialize_struct("cosmos.group.v1.EventVote", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventWithdrawProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1174,7 +1174,7 @@ impl serde::Serialize for EventWithdrawProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventWithdrawProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1187,7 +1187,7 @@ impl<'de> serde::Deserialize<'de> for EventWithdrawProposal { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1260,7 +1260,7 @@ impl<'de> serde::Deserialize<'de> for EventWithdrawProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Exec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1274,7 +1274,7 @@ impl serde::Serialize for Exec { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Exec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1330,7 +1330,7 @@ impl<'de> serde::Deserialize<'de> for Exec { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1401,7 +1401,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1435,7 +1435,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Proposals, Votes, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1572,7 +1572,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmos.group.v1.GenesisState", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GroupInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1623,7 +1623,7 @@ impl serde::Serialize for GroupInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GroupInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1650,7 +1650,7 @@ impl<'de> serde::Deserialize<'de> for GroupInfo { TotalWeight, CreatedAt, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1764,7 +1764,7 @@ impl<'de> serde::Deserialize<'de> for GroupInfo { deserializer.deserialize_struct("cosmos.group.v1.GroupInfo", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GroupMember { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1790,7 +1790,7 @@ impl serde::Serialize for GroupMember { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GroupMember { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1804,7 +1804,7 @@ impl<'de> serde::Deserialize<'de> for GroupMember { GroupId, Member, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1879,7 +1879,7 @@ impl<'de> serde::Deserialize<'de> for GroupMember { deserializer.deserialize_struct("cosmos.group.v1.GroupMember", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GroupPolicyInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1936,7 +1936,7 @@ impl serde::Serialize for GroupPolicyInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1966,7 +1966,7 @@ impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { DecisionPolicy, CreatedAt, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2091,7 +2091,7 @@ impl<'de> serde::Deserialize<'de> for GroupPolicyInfo { deserializer.deserialize_struct("cosmos.group.v1.GroupPolicyInfo", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Member { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2128,7 +2128,7 @@ impl serde::Serialize for Member { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Member { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2144,7 +2144,7 @@ impl<'de> serde::Deserialize<'de> for Member { Metadata, AddedAt, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2234,7 +2234,7 @@ impl<'de> serde::Deserialize<'de> for Member { deserializer.deserialize_struct("cosmos.group.v1.Member", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MemberRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2265,7 +2265,7 @@ impl serde::Serialize for MemberRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MemberRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2280,7 +2280,7 @@ impl<'de> serde::Deserialize<'de> for MemberRequest { Weight, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2361,7 +2361,7 @@ impl<'de> serde::Deserialize<'de> for MemberRequest { deserializer.deserialize_struct("cosmos.group.v1.MemberRequest", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2392,7 +2392,7 @@ impl serde::Serialize for MsgCreateGroup { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2407,7 +2407,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroup { Members, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2488,7 +2488,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroup { deserializer.deserialize_struct("cosmos.group.v1.MsgCreateGroup", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateGroupPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2527,7 +2527,7 @@ impl serde::Serialize for MsgCreateGroupPolicy { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2550,7 +2550,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { Metadata, DecisionPolicy, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2652,7 +2652,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicy { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateGroupPolicyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2672,7 +2672,7 @@ impl serde::Serialize for MsgCreateGroupPolicyResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2685,7 +2685,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicyResponse { enum GeneratedField { Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2755,7 +2755,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupPolicyResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateGroupResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2776,7 +2776,7 @@ impl serde::Serialize for MsgCreateGroupResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2789,7 +2789,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupResponse { enum GeneratedField { GroupId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2862,7 +2862,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateGroupWithPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2912,7 +2912,7 @@ impl serde::Serialize for MsgCreateGroupWithPolicy { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2941,7 +2941,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { GroupPolicyAsAdmin, DecisionPolicy, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3066,7 +3066,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicy { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateGroupWithPolicyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3093,7 +3093,7 @@ impl serde::Serialize for MsgCreateGroupWithPolicyResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3112,7 +3112,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { GroupId, GroupPolicyAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3198,7 +3198,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateGroupWithPolicyResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgExec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3227,7 +3227,7 @@ impl serde::Serialize for MsgExec { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgExec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3241,7 +3241,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { ProposalId, Executor, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3316,7 +3316,7 @@ impl<'de> serde::Deserialize<'de> for MsgExec { deserializer.deserialize_struct("cosmos.group.v1.MsgExec", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgExecResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3338,7 +3338,7 @@ impl serde::Serialize for MsgExecResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgExecResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3351,7 +3351,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { enum GeneratedField { Result, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3414,7 +3414,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecResponse { deserializer.deserialize_struct("cosmos.group.v1.MsgExecResponse", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgLeaveGroup { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3440,7 +3440,7 @@ impl serde::Serialize for MsgLeaveGroup { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgLeaveGroup { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3454,7 +3454,7 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroup { Address, GroupId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3529,7 +3529,7 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroup { deserializer.deserialize_struct("cosmos.group.v1.MsgLeaveGroup", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgLeaveGroupResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3543,7 +3543,7 @@ impl serde::Serialize for MsgLeaveGroupResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgLeaveGroupResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3554,7 +3554,7 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroupResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3611,7 +3611,7 @@ impl<'de> serde::Deserialize<'de> for MsgLeaveGroupResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSubmitProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3657,7 +3657,7 @@ impl serde::Serialize for MsgSubmitProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3681,7 +3681,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { Messages, Exec, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3788,7 +3788,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSubmitProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3812,7 +3812,7 @@ impl serde::Serialize for MsgSubmitProposalResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3825,7 +3825,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3898,7 +3898,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposalResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3931,7 +3931,7 @@ impl serde::Serialize for MsgUpdateGroupAdmin { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3946,7 +3946,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { GroupId, NewAdmin, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4034,7 +4034,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdmin { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4048,7 +4048,7 @@ impl serde::Serialize for MsgUpdateGroupAdminResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4059,7 +4059,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdminResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4116,7 +4116,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupAdminResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupMembers { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4149,7 +4149,7 @@ impl serde::Serialize for MsgUpdateGroupMembers { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4170,7 +4170,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { GroupId, MemberUpdates, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4261,7 +4261,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembers { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupMembersResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4275,7 +4275,7 @@ impl serde::Serialize for MsgUpdateGroupMembersResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembersResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4286,7 +4286,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembersResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4343,7 +4343,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMembersResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupMetadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4376,7 +4376,7 @@ impl serde::Serialize for MsgUpdateGroupMetadata { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4391,7 +4391,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { GroupId, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4482,7 +4482,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadata { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupMetadataResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4496,7 +4496,7 @@ impl serde::Serialize for MsgUpdateGroupMetadataResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadataResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4507,7 +4507,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadataResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4564,7 +4564,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupMetadataResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupPolicyAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4596,7 +4596,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyAdmin { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4617,7 +4617,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { GroupPolicyAddress, NewAdmin, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4709,7 +4709,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdmin { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupPolicyAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4723,7 +4723,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyAdminResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4734,7 +4734,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdminResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4791,7 +4791,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyAdminResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4823,7 +4823,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicy { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4844,7 +4844,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { GroupPolicyAddress, DecisionPolicy, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4938,7 +4938,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicy { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4954,7 +4954,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyDecisionPolicyResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4965,7 +4965,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicyResponse #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5023,7 +5023,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyDecisionPolicyResponse ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupPolicyMetadata { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5055,7 +5055,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyMetadata { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5075,7 +5075,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { GroupPolicyAddress, Metadata, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5167,7 +5167,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadata { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateGroupPolicyMetadataResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5181,7 +5181,7 @@ impl serde::Serialize for MsgUpdateGroupPolicyMetadataResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadataResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5192,7 +5192,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadataResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5249,7 +5249,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateGroupPolicyMetadataResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5301,7 +5301,7 @@ impl serde::Serialize for MsgVote { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5325,7 +5325,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { Metadata, Exec, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5427,7 +5427,7 @@ impl<'de> serde::Deserialize<'de> for MsgVote { deserializer.deserialize_struct("cosmos.group.v1.MsgVote", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgVoteResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5440,7 +5440,7 @@ impl serde::Serialize for MsgVoteResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5451,7 +5451,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5501,7 +5501,7 @@ impl<'de> serde::Deserialize<'de> for MsgVoteResponse { deserializer.deserialize_struct("cosmos.group.v1.MsgVoteResponse", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgWithdrawProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5531,7 +5531,7 @@ impl serde::Serialize for MsgWithdrawProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5545,7 +5545,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { ProposalId, Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5624,7 +5624,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgWithdrawProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5638,7 +5638,7 @@ impl serde::Serialize for MsgWithdrawProposalResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgWithdrawProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5649,7 +5649,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposalResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5706,7 +5706,7 @@ impl<'de> serde::Deserialize<'de> for MsgWithdrawProposalResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PercentageDecisionPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5732,7 +5732,7 @@ impl serde::Serialize for PercentageDecisionPolicy { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PercentageDecisionPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5746,7 +5746,7 @@ impl<'de> serde::Deserialize<'de> for PercentageDecisionPolicy { Percentage, Windows, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5825,7 +5825,7 @@ impl<'de> serde::Deserialize<'de> for PercentageDecisionPolicy { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Proposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5925,7 +5925,7 @@ impl serde::Serialize for Proposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Proposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5969,7 +5969,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { ExecutorResult, Messages, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6155,7 +6155,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { deserializer.deserialize_struct("cosmos.group.v1.Proposal", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ProposalExecutorResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6171,7 +6171,7 @@ impl serde::Serialize for ProposalExecutorResult { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ProposalExecutorResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6236,7 +6236,7 @@ impl<'de> serde::Deserialize<'de> for ProposalExecutorResult { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ProposalStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6254,7 +6254,7 @@ impl serde::Serialize for ProposalStatus { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ProposalStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6321,7 +6321,7 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6342,7 +6342,7 @@ impl serde::Serialize for QueryGroupInfoRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6355,7 +6355,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoRequest { enum GeneratedField { GroupId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6428,7 +6428,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6448,7 +6448,7 @@ impl serde::Serialize for QueryGroupInfoResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6461,7 +6461,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoResponse { enum GeneratedField { Info, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6529,7 +6529,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupInfoResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupMembersRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6556,7 +6556,7 @@ impl serde::Serialize for QueryGroupMembersRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6570,7 +6570,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { GroupId, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6652,7 +6652,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupMembersResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6678,7 +6678,7 @@ impl serde::Serialize for QueryGroupMembersResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupMembersResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6692,7 +6692,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersResponse { Members, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6771,7 +6771,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupMembersResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupPoliciesByAdminRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6797,7 +6797,7 @@ impl serde::Serialize for QueryGroupPoliciesByAdminRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6811,7 +6811,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminRequest { Admin, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6890,7 +6890,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupPoliciesByAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6916,7 +6916,7 @@ impl serde::Serialize for QueryGroupPoliciesByAdminResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6930,7 +6930,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminResponse { GroupPolicies, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7009,7 +7009,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByAdminResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupPoliciesByGroupRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7036,7 +7036,7 @@ impl serde::Serialize for QueryGroupPoliciesByGroupRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7050,7 +7050,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { GroupId, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7132,7 +7132,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupPoliciesByGroupResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7158,7 +7158,7 @@ impl serde::Serialize for QueryGroupPoliciesByGroupResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7172,7 +7172,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupResponse { GroupPolicies, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7251,7 +7251,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPoliciesByGroupResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupPolicyInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7271,7 +7271,7 @@ impl serde::Serialize for QueryGroupPolicyInfoRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7284,7 +7284,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoRequest { enum GeneratedField { Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7354,7 +7354,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupPolicyInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7374,7 +7374,7 @@ impl serde::Serialize for QueryGroupPolicyInfoResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7387,7 +7387,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoResponse { enum GeneratedField { Info, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7455,7 +7455,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupPolicyInfoResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupsByAdminRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7481,7 +7481,7 @@ impl serde::Serialize for QueryGroupsByAdminRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7495,7 +7495,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminRequest { Admin, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7574,7 +7574,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupsByAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7600,7 +7600,7 @@ impl serde::Serialize for QueryGroupsByAdminResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7614,7 +7614,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminResponse { Groups, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7693,7 +7693,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByAdminResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupsByMemberRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7719,7 +7719,7 @@ impl serde::Serialize for QueryGroupsByMemberRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7733,7 +7733,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberRequest { Address, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7812,7 +7812,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupsByMemberResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7838,7 +7838,7 @@ impl serde::Serialize for QueryGroupsByMemberResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7852,7 +7852,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberResponse { Groups, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7931,7 +7931,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsByMemberResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7951,7 +7951,7 @@ impl serde::Serialize for QueryGroupsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7964,7 +7964,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8031,7 +8031,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryGroupsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8057,7 +8057,7 @@ impl serde::Serialize for QueryGroupsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryGroupsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8071,7 +8071,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsResponse { Groups, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8147,7 +8147,7 @@ impl<'de> serde::Deserialize<'de> for QueryGroupsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8171,7 +8171,7 @@ impl serde::Serialize for QueryProposalRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8184,7 +8184,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8257,7 +8257,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8277,7 +8277,7 @@ impl serde::Serialize for QueryProposalResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8290,7 +8290,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { enum GeneratedField { Proposal, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8360,7 +8360,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalsByGroupPolicyRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8386,7 +8386,7 @@ impl serde::Serialize for QueryProposalsByGroupPolicyRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8400,7 +8400,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyRequest { Address, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8479,7 +8479,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryProposalsByGroupPolicyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8505,7 +8505,7 @@ impl serde::Serialize for QueryProposalsByGroupPolicyResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8519,7 +8519,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyResponse { Proposals, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8598,7 +8598,7 @@ impl<'de> serde::Deserialize<'de> for QueryProposalsByGroupPolicyResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryTallyResultRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8622,7 +8622,7 @@ impl serde::Serialize for QueryTallyResultRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8635,7 +8635,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { enum GeneratedField { ProposalId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8708,7 +8708,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryTallyResultResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8728,7 +8728,7 @@ impl serde::Serialize for QueryTallyResultResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8741,7 +8741,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { enum GeneratedField { Tally, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8809,7 +8809,7 @@ impl<'de> serde::Deserialize<'de> for QueryTallyResultResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVoteByProposalVoterRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8839,7 +8839,7 @@ impl serde::Serialize for QueryVoteByProposalVoterRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8853,7 +8853,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { ProposalId, Voter, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8935,7 +8935,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVoteByProposalVoterResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8955,7 +8955,7 @@ impl serde::Serialize for QueryVoteByProposalVoterResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8968,7 +8968,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterResponse { enum GeneratedField { Vote, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9036,7 +9036,7 @@ impl<'de> serde::Deserialize<'de> for QueryVoteByProposalVoterResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVotesByProposalRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9066,7 +9066,7 @@ impl serde::Serialize for QueryVotesByProposalRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9080,7 +9080,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { ProposalId, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9162,7 +9162,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVotesByProposalResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9188,7 +9188,7 @@ impl serde::Serialize for QueryVotesByProposalResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVotesByProposalResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9202,7 +9202,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalResponse { Votes, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9281,7 +9281,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByProposalResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVotesByVoterRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9307,7 +9307,7 @@ impl serde::Serialize for QueryVotesByVoterRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVotesByVoterRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9321,7 +9321,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterRequest { Voter, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9400,7 +9400,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryVotesByVoterResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9426,7 +9426,7 @@ impl serde::Serialize for QueryVotesByVoterResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryVotesByVoterResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9440,7 +9440,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterResponse { Votes, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9519,7 +9519,7 @@ impl<'de> serde::Deserialize<'de> for QueryVotesByVoterResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TallyResult { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9556,7 +9556,7 @@ impl serde::Serialize for TallyResult { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TallyResult { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9581,7 +9581,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { NoCount, NoWithVetoCount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9673,7 +9673,7 @@ impl<'de> serde::Deserialize<'de> for TallyResult { deserializer.deserialize_struct("cosmos.group.v1.TallyResult", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ThresholdDecisionPolicy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9699,7 +9699,7 @@ impl serde::Serialize for ThresholdDecisionPolicy { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ThresholdDecisionPolicy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9713,7 +9713,7 @@ impl<'de> serde::Deserialize<'de> for ThresholdDecisionPolicy { Threshold, Windows, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9792,7 +9792,7 @@ impl<'de> serde::Deserialize<'de> for ThresholdDecisionPolicy { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Vote { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9842,7 +9842,7 @@ impl serde::Serialize for Vote { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Vote { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -9867,7 +9867,7 @@ impl<'de> serde::Deserialize<'de> for Vote { Metadata, SubmitTime, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -9969,7 +9969,7 @@ impl<'de> serde::Deserialize<'de> for Vote { deserializer.deserialize_struct("cosmos.group.v1.Vote", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for VoteOption { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -9986,7 +9986,7 @@ impl serde::Serialize for VoteOption { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for VoteOption { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs index 144350a4..53c957ef 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.mint.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,7 +25,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Minter, Params, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -115,7 +115,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Minter { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -140,7 +140,7 @@ impl serde::Serialize for Minter { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Minter { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -154,7 +154,7 @@ impl<'de> serde::Deserialize<'de> for Minter { Inflation, AnnualProvisions, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -228,7 +228,7 @@ impl<'de> serde::Deserialize<'de> for Minter { deserializer.deserialize_struct("cosmos.mint.v1beta1.Minter", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -281,7 +281,7 @@ impl serde::Serialize for Params { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -312,7 +312,7 @@ impl<'de> serde::Deserialize<'de> for Params { GoalBonded, BlocksPerYear, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -429,7 +429,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.mint.v1beta1.Params", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAnnualProvisionsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -443,7 +443,7 @@ impl serde::Serialize for QueryAnnualProvisionsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -454,7 +454,7 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -511,7 +511,7 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAnnualProvisionsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -535,7 +535,7 @@ impl serde::Serialize for QueryAnnualProvisionsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -548,7 +548,7 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsResponse { enum GeneratedField { AnnualProvisions, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -623,7 +623,7 @@ impl<'de> serde::Deserialize<'de> for QueryAnnualProvisionsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryInflationRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -637,7 +637,7 @@ impl serde::Serialize for QueryInflationRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryInflationRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -648,7 +648,7 @@ impl<'de> serde::Deserialize<'de> for QueryInflationRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -705,7 +705,7 @@ impl<'de> serde::Deserialize<'de> for QueryInflationRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryInflationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -729,7 +729,7 @@ impl serde::Serialize for QueryInflationResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryInflationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -742,7 +742,7 @@ impl<'de> serde::Deserialize<'de> for QueryInflationResponse { enum GeneratedField { Inflation, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -815,7 +815,7 @@ impl<'de> serde::Deserialize<'de> for QueryInflationResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -829,7 +829,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -840,7 +840,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -894,7 +894,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -914,7 +914,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -927,7 +927,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs index 06f52f43..a61ca837 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.nft.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Class { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -54,7 +54,7 @@ impl serde::Serialize for Class { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Class { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -82,7 +82,7 @@ impl<'de> serde::Deserialize<'de> for Class { UriHash, Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -199,7 +199,7 @@ impl<'de> serde::Deserialize<'de> for Class { deserializer.deserialize_struct("cosmos.nft.v1beta1.Class", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Entry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -224,7 +224,7 @@ impl serde::Serialize for Entry { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Entry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -238,7 +238,7 @@ impl<'de> serde::Deserialize<'de> for Entry { Owner, Nfts, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -310,7 +310,7 @@ impl<'de> serde::Deserialize<'de> for Entry { deserializer.deserialize_struct("cosmos.nft.v1beta1.Entry", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventBurn { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -341,7 +341,7 @@ impl serde::Serialize for EventBurn { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventBurn { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -356,7 +356,7 @@ impl<'de> serde::Deserialize<'de> for EventBurn { Id, Owner, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -437,7 +437,7 @@ impl<'de> serde::Deserialize<'de> for EventBurn { deserializer.deserialize_struct("cosmos.nft.v1beta1.EventBurn", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventMint { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -468,7 +468,7 @@ impl serde::Serialize for EventMint { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventMint { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -483,7 +483,7 @@ impl<'de> serde::Deserialize<'de> for EventMint { Id, Owner, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -564,7 +564,7 @@ impl<'de> serde::Deserialize<'de> for EventMint { deserializer.deserialize_struct("cosmos.nft.v1beta1.EventMint", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for EventSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -601,7 +601,7 @@ impl serde::Serialize for EventSend { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for EventSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -617,7 +617,7 @@ impl<'de> serde::Deserialize<'de> for EventSend { Sender, Receiver, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -707,7 +707,7 @@ impl<'de> serde::Deserialize<'de> for EventSend { deserializer.deserialize_struct("cosmos.nft.v1beta1.EventSend", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -732,7 +732,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -746,7 +746,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Classes, Entries, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -818,7 +818,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmos.nft.v1beta1.GenesisState", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -855,7 +855,7 @@ impl serde::Serialize for MsgSend { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -871,7 +871,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { Sender, Receiver, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -961,7 +961,7 @@ impl<'de> serde::Deserialize<'de> for MsgSend { deserializer.deserialize_struct("cosmos.nft.v1beta1.MsgSend", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSendResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -974,7 +974,7 @@ impl serde::Serialize for MsgSendResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSendResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -985,7 +985,7 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1039,7 +1039,7 @@ impl<'de> serde::Deserialize<'de> for MsgSendResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Nft { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1082,7 +1082,7 @@ impl serde::Serialize for Nft { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Nft { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1101,7 +1101,7 @@ impl<'de> serde::Deserialize<'de> for Nft { UriHash, Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1200,7 +1200,7 @@ impl<'de> serde::Deserialize<'de> for Nft { deserializer.deserialize_struct("cosmos.nft.v1beta1.NFT", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryBalanceRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1226,7 +1226,7 @@ impl serde::Serialize for QueryBalanceRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1240,7 +1240,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { ClassId, Owner, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1316,7 +1316,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryBalanceResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1337,7 +1337,7 @@ impl serde::Serialize for QueryBalanceResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1350,7 +1350,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { enum GeneratedField { Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1423,7 +1423,7 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryClassRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1443,7 +1443,7 @@ impl serde::Serialize for QueryClassRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryClassRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1456,7 +1456,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassRequest { enum GeneratedField { ClassId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1523,7 +1523,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryClassResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1543,7 +1543,7 @@ impl serde::Serialize for QueryClassResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryClassResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1556,7 +1556,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassResponse { enum GeneratedField { Class, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1621,7 +1621,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryClassesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1641,7 +1641,7 @@ impl serde::Serialize for QueryClassesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryClassesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1654,7 +1654,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassesRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1721,7 +1721,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryClassesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1747,7 +1747,7 @@ impl serde::Serialize for QueryClassesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryClassesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1761,7 +1761,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassesResponse { Classes, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1840,7 +1840,7 @@ impl<'de> serde::Deserialize<'de> for QueryClassesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryNftRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1866,7 +1866,7 @@ impl serde::Serialize for QueryNftRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryNftRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1880,7 +1880,7 @@ impl<'de> serde::Deserialize<'de> for QueryNftRequest { ClassId, Id, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1956,7 +1956,7 @@ impl<'de> serde::Deserialize<'de> for QueryNftRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryNftResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1976,7 +1976,7 @@ impl serde::Serialize for QueryNftResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryNftResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1989,7 +1989,7 @@ impl<'de> serde::Deserialize<'de> for QueryNftResponse { enum GeneratedField { Nft, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2054,7 +2054,7 @@ impl<'de> serde::Deserialize<'de> for QueryNftResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryNfTsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2086,7 +2086,7 @@ impl serde::Serialize for QueryNfTsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryNfTsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2101,7 +2101,7 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsRequest { Owner, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2186,7 +2186,7 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryNfTsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2212,7 +2212,7 @@ impl serde::Serialize for QueryNfTsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryNfTsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2226,7 +2226,7 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsResponse { Nfts, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2302,7 +2302,7 @@ impl<'de> serde::Deserialize<'de> for QueryNfTsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryOwnerRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2328,7 +2328,7 @@ impl serde::Serialize for QueryOwnerRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryOwnerRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2342,7 +2342,7 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerRequest { ClassId, Id, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2418,7 +2418,7 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryOwnerResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2438,7 +2438,7 @@ impl serde::Serialize for QueryOwnerResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryOwnerResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2451,7 +2451,7 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerResponse { enum GeneratedField { Owner, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2518,7 +2518,7 @@ impl<'de> serde::Deserialize<'de> for QueryOwnerResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySupplyRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2538,7 +2538,7 @@ impl serde::Serialize for QuerySupplyRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySupplyRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2551,7 +2551,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyRequest { enum GeneratedField { ClassId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2618,7 +2618,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySupplyResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2639,7 +2639,7 @@ impl serde::Serialize for QuerySupplyResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySupplyResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2652,7 +2652,7 @@ impl<'de> serde::Deserialize<'de> for QuerySupplyResponse { enum GeneratedField { Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs index f7917f3f..632f3636 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.module.v1alpha1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Module { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -12,7 +12,7 @@ impl serde::Serialize for Module { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Module { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -23,7 +23,7 @@ impl<'de> serde::Deserialize<'de> for Module { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs index 7ce975c0..c39fcf7c 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PrimaryKeyDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,7 +25,7 @@ impl serde::Serialize for PrimaryKeyDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PrimaryKeyDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for PrimaryKeyDescriptor { Fields, AutoIncrement, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -118,7 +118,7 @@ impl<'de> serde::Deserialize<'de> for PrimaryKeyDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SecondaryIndexDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -150,7 +150,7 @@ impl serde::Serialize for SecondaryIndexDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -165,7 +165,7 @@ impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { Id, Unique, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -256,7 +256,7 @@ impl<'de> serde::Deserialize<'de> for SecondaryIndexDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SingletonDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -276,7 +276,7 @@ impl serde::Serialize for SingletonDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SingletonDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -289,7 +289,7 @@ impl<'de> serde::Deserialize<'de> for SingletonDescriptor { enum GeneratedField { Id, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -359,7 +359,7 @@ impl<'de> serde::Deserialize<'de> for SingletonDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TableDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -390,7 +390,7 @@ impl serde::Serialize for TableDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TableDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -405,7 +405,7 @@ impl<'de> serde::Deserialize<'de> for TableDescriptor { Index, Id, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs index d81677b1..2b5b4f84 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.orm.v1alpha1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ModuleSchemaDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -29,7 +29,7 @@ impl serde::Serialize for ModuleSchemaDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ModuleSchemaDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -43,7 +43,7 @@ impl<'de> serde::Deserialize<'de> for ModuleSchemaDescriptor { SchemaFile, Prefix, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -125,7 +125,7 @@ impl<'de> serde::Deserialize<'de> for ModuleSchemaDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for module_schema_descriptor::FileEntry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -160,7 +160,7 @@ impl serde::Serialize for module_schema_descriptor::FileEntry { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -181,7 +181,7 @@ impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { ProtoFileName, StorageType, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -274,7 +274,7 @@ impl<'de> serde::Deserialize<'de> for module_schema_descriptor::FileEntry { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for StorageType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -291,7 +291,7 @@ impl serde::Serialize for StorageType { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for StorageType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs index a7a4a22e..a06d6009 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.params.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ParamChange { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -31,7 +31,7 @@ impl serde::Serialize for ParamChange { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ParamChange { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -46,7 +46,7 @@ impl<'de> serde::Deserialize<'de> for ParamChange { Key, Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -131,7 +131,7 @@ impl<'de> serde::Deserialize<'de> for ParamChange { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ParameterChangeProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -163,7 +163,7 @@ impl serde::Serialize for ParameterChangeProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -178,7 +178,7 @@ impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { Description, Changes, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -266,7 +266,7 @@ impl<'de> serde::Deserialize<'de> for ParameterChangeProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -292,7 +292,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -306,7 +306,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { Subspace, Key, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -382,7 +382,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -402,7 +402,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -415,7 +415,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Param, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -480,7 +480,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySubspacesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -494,7 +494,7 @@ impl serde::Serialize for QuerySubspacesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySubspacesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -505,7 +505,7 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -562,7 +562,7 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySubspacesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -582,7 +582,7 @@ impl serde::Serialize for QuerySubspacesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySubspacesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -595,7 +595,7 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesResponse { enum GeneratedField { Subspaces, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -665,7 +665,7 @@ impl<'de> serde::Deserialize<'de> for QuerySubspacesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Subspace { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -690,7 +690,7 @@ impl serde::Serialize for Subspace { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Subspace { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -704,7 +704,7 @@ impl<'de> serde::Deserialize<'de> for Subspace { Subspace, Keys, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs index 42274574..47bc4d2b 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.slashing.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -31,7 +31,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -52,7 +52,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { SigningInfos, MissedBlocks, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -137,7 +137,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MissedBlock { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -164,7 +164,7 @@ impl serde::Serialize for MissedBlock { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MissedBlock { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -178,7 +178,7 @@ impl<'de> serde::Deserialize<'de> for MissedBlock { Index, Missed, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -257,7 +257,7 @@ impl<'de> serde::Deserialize<'de> for MissedBlock { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUnjail { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -277,7 +277,7 @@ impl serde::Serialize for MsgUnjail { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUnjail { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -290,7 +290,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnjail { enum GeneratedField { ValidatorAddr, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -357,7 +357,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnjail { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUnjailResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -371,7 +371,7 @@ impl serde::Serialize for MsgUnjailResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUnjailResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -382,7 +382,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnjailResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -436,7 +436,7 @@ impl<'de> serde::Deserialize<'de> for MsgUnjailResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -495,7 +495,7 @@ impl serde::Serialize for Params { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -523,7 +523,7 @@ impl<'de> serde::Deserialize<'de> for Params { SlashFractionDoubleSign, SlashFractionDowntime, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -654,7 +654,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.slashing.v1beta1.Params", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -668,7 +668,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -679,7 +679,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -733,7 +733,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -753,7 +753,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -766,7 +766,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -831,7 +831,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySigningInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -851,7 +851,7 @@ impl serde::Serialize for QuerySigningInfoRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySigningInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -864,7 +864,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoRequest { enum GeneratedField { ConsAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -934,7 +934,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySigningInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -954,7 +954,7 @@ impl serde::Serialize for QuerySigningInfoResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySigningInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -967,7 +967,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoResponse { enum GeneratedField { ValSigningInfo, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1039,7 +1039,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfoResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySigningInfosRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1059,7 +1059,7 @@ impl serde::Serialize for QuerySigningInfosRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySigningInfosRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1072,7 +1072,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1142,7 +1142,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySigningInfosResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1168,7 +1168,7 @@ impl serde::Serialize for QuerySigningInfosResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySigningInfosResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1182,7 +1182,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosResponse { Info, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1261,7 +1261,7 @@ impl<'de> serde::Deserialize<'de> for QuerySigningInfosResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SigningInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1287,7 +1287,7 @@ impl serde::Serialize for SigningInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SigningInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1301,7 +1301,7 @@ impl<'de> serde::Deserialize<'de> for SigningInfo { Address, ValidatorSigningInfo, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1381,7 +1381,7 @@ impl<'de> serde::Deserialize<'de> for SigningInfo { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorMissedBlocks { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1407,7 +1407,7 @@ impl serde::Serialize for ValidatorMissedBlocks { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorMissedBlocks { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1421,7 +1421,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorMissedBlocks { Address, MissedBlocks, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1500,7 +1500,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorMissedBlocks { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValidatorSigningInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1562,7 +1562,7 @@ impl serde::Serialize for ValidatorSigningInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1591,7 +1591,7 @@ impl<'de> serde::Deserialize<'de> for ValidatorSigningInfo { Tombstoned, MissedBlocksCounter, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs index a31573a8..ec7d5727 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.staking.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AuthorizationType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -15,7 +15,7 @@ impl serde::Serialize for AuthorizationType { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AuthorizationType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -78,7 +78,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizationType { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for BondStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -94,7 +94,7 @@ impl serde::Serialize for BondStatus { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for BondStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -157,7 +157,7 @@ impl<'de> serde::Deserialize<'de> for BondStatus { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Commission { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -183,7 +183,7 @@ impl serde::Serialize for Commission { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Commission { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -202,7 +202,7 @@ impl<'de> serde::Deserialize<'de> for Commission { CommissionRates, UpdateTime, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -280,7 +280,7 @@ impl<'de> serde::Deserialize<'de> for Commission { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CommissionRates { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -312,7 +312,7 @@ impl serde::Serialize for CommissionRates { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CommissionRates { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -333,7 +333,7 @@ impl<'de> serde::Deserialize<'de> for CommissionRates { MaxRate, MaxChangeRate, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -420,7 +420,7 @@ impl<'de> serde::Deserialize<'de> for CommissionRates { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DvPair { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -445,7 +445,7 @@ impl serde::Serialize for DvPair { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DvPair { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -464,7 +464,7 @@ impl<'de> serde::Deserialize<'de> for DvPair { DelegatorAddress, ValidatorAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -540,7 +540,7 @@ impl<'de> serde::Deserialize<'de> for DvPair { deserializer.deserialize_struct("cosmos.staking.v1beta1.DVPair", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DvPairs { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -559,7 +559,7 @@ impl serde::Serialize for DvPairs { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DvPairs { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -572,7 +572,7 @@ impl<'de> serde::Deserialize<'de> for DvPairs { enum GeneratedField { Pairs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -635,7 +635,7 @@ impl<'de> serde::Deserialize<'de> for DvPairs { deserializer.deserialize_struct("cosmos.staking.v1beta1.DVPairs", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DvvTriplet { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -667,7 +667,7 @@ impl serde::Serialize for DvvTriplet { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DvvTriplet { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -689,7 +689,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplet { ValidatorSrcAddress, ValidatorDstAddress, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -784,7 +784,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplet { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DvvTriplets { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -804,7 +804,7 @@ impl serde::Serialize for DvvTriplets { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DvvTriplets { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -817,7 +817,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplets { enum GeneratedField { Triplets, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -884,7 +884,7 @@ impl<'de> serde::Deserialize<'de> for DvvTriplets { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Delegation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -916,7 +916,7 @@ impl serde::Serialize for Delegation { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Delegation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -937,7 +937,7 @@ impl<'de> serde::Deserialize<'de> for Delegation { ValidatorAddress, Shares, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1026,7 +1026,7 @@ impl<'de> serde::Deserialize<'de> for Delegation { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1052,7 +1052,7 @@ impl serde::Serialize for DelegationResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1066,7 +1066,7 @@ impl<'de> serde::Deserialize<'de> for DelegationResponse { Delegation, Balance, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1142,7 +1142,7 @@ impl<'de> serde::Deserialize<'de> for DelegationResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Description { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1186,7 +1186,7 @@ impl serde::Serialize for Description { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Description { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1210,7 +1210,7 @@ impl<'de> serde::Deserialize<'de> for Description { SecurityContact, Details, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1315,7 +1315,7 @@ impl<'de> serde::Deserialize<'de> for Description { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1381,7 +1381,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1413,7 +1413,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Redelegations, Exported, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1556,7 +1556,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for HistoricalInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1582,7 +1582,7 @@ impl serde::Serialize for HistoricalInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for HistoricalInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1596,7 +1596,7 @@ impl<'de> serde::Deserialize<'de> for HistoricalInfo { Header, Valset, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1672,7 +1672,7 @@ impl<'de> serde::Deserialize<'de> for HistoricalInfo { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for LastValidatorPower { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1699,7 +1699,7 @@ impl serde::Serialize for LastValidatorPower { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for LastValidatorPower { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1713,7 +1713,7 @@ impl<'de> serde::Deserialize<'de> for LastValidatorPower { Address, Power, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1792,7 +1792,7 @@ impl<'de> serde::Deserialize<'de> for LastValidatorPower { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgBeginRedelegate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1830,7 +1830,7 @@ impl serde::Serialize for MsgBeginRedelegate { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1854,7 +1854,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { ValidatorDstAddress, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1958,7 +1958,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegate { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgBeginRedelegateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1978,7 +1978,7 @@ impl serde::Serialize for MsgBeginRedelegateResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1991,7 +1991,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { enum GeneratedField { CompletionTime, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2063,7 +2063,7 @@ impl<'de> serde::Deserialize<'de> for MsgBeginRedelegateResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCancelUnbondingDelegation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2105,7 +2105,7 @@ impl serde::Serialize for MsgCancelUnbondingDelegation { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2129,7 +2129,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { Amount, CreationHeight, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2235,7 +2235,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegation { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCancelUnbondingDelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2251,7 +2251,7 @@ impl serde::Serialize for MsgCancelUnbondingDelegationResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2262,7 +2262,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2320,7 +2320,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUnbondingDelegationResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateValidator { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2376,7 +2376,7 @@ impl serde::Serialize for MsgCreateValidator { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateValidator { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2406,7 +2406,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidator { Pubkey, Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2533,7 +2533,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidator { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateValidatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2547,7 +2547,7 @@ impl serde::Serialize for MsgCreateValidatorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2558,7 +2558,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2615,7 +2615,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateValidatorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgDelegate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2647,7 +2647,7 @@ impl serde::Serialize for MsgDelegate { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgDelegate { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2668,7 +2668,7 @@ impl<'de> serde::Deserialize<'de> for MsgDelegate { ValidatorAddress, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2757,7 +2757,7 @@ impl<'de> serde::Deserialize<'de> for MsgDelegate { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgDelegateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2771,7 +2771,7 @@ impl serde::Serialize for MsgDelegateResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2782,7 +2782,7 @@ impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2836,7 +2836,7 @@ impl<'de> serde::Deserialize<'de> for MsgDelegateResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgEditValidator { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2874,7 +2874,7 @@ impl serde::Serialize for MsgEditValidator { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgEditValidator { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2898,7 +2898,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidator { CommissionRate, MinSelfDelegation, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2998,7 +2998,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidator { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgEditValidatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3012,7 +3012,7 @@ impl serde::Serialize for MsgEditValidatorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3023,7 +3023,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3080,7 +3080,7 @@ impl<'de> serde::Deserialize<'de> for MsgEditValidatorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUndelegate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3112,7 +3112,7 @@ impl serde::Serialize for MsgUndelegate { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUndelegate { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3133,7 +3133,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegate { ValidatorAddress, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3222,7 +3222,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegate { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUndelegateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3242,7 +3242,7 @@ impl serde::Serialize for MsgUndelegateResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3255,7 +3255,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { enum GeneratedField { CompletionTime, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3327,7 +3327,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3376,7 +3376,7 @@ impl serde::Serialize for Params { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3407,7 +3407,7 @@ impl<'de> serde::Deserialize<'de> for Params { BondDenom, MinCommissionRate, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3528,7 +3528,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmos.staking.v1beta1.Params", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Pool { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3553,7 +3553,7 @@ impl serde::Serialize for Pool { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Pool { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3572,7 +3572,7 @@ impl<'de> serde::Deserialize<'de> for Pool { NotBondedTokens, BondedTokens, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3646,7 +3646,7 @@ impl<'de> serde::Deserialize<'de> for Pool { deserializer.deserialize_struct("cosmos.staking.v1beta1.Pool", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegationRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3672,7 +3672,7 @@ impl serde::Serialize for QueryDelegationRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3691,7 +3691,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { DelegatorAddr, ValidatorAddr, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3770,7 +3770,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3790,7 +3790,7 @@ impl serde::Serialize for QueryDelegationResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3803,7 +3803,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { enum GeneratedField { DelegationResponse, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3877,7 +3877,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegationResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorDelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3905,7 +3905,7 @@ impl serde::Serialize for QueryDelegatorDelegationsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3919,7 +3919,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { DelegatorAddr, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3999,7 +3999,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorDelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4027,7 +4027,7 @@ impl serde::Serialize for QueryDelegatorDelegationsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4041,7 +4041,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { DelegationResponses, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4125,7 +4125,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorDelegationsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorUnbondingDelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4153,7 +4153,7 @@ impl serde::Serialize for QueryDelegatorUnbondingDelegationsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4167,7 +4167,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest DelegatorAddr, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4248,7 +4248,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsRequest ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorUnbondingDelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4276,7 +4276,7 @@ impl serde::Serialize for QueryDelegatorUnbondingDelegationsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4290,7 +4290,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse UnbondingResponses, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4375,7 +4375,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorUnbondingDelegationsResponse ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorValidatorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4401,7 +4401,7 @@ impl serde::Serialize for QueryDelegatorValidatorRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4420,7 +4420,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { DelegatorAddr, ValidatorAddr, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4499,7 +4499,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorValidatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4521,7 +4521,7 @@ impl serde::Serialize for QueryDelegatorValidatorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4534,7 +4534,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { enum GeneratedField { Validator, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4604,7 +4604,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorValidatorsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4632,7 +4632,7 @@ impl serde::Serialize for QueryDelegatorValidatorsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4646,7 +4646,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { DelegatorAddr, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4725,7 +4725,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryDelegatorValidatorsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4753,7 +4753,7 @@ impl serde::Serialize for QueryDelegatorValidatorsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4767,7 +4767,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { Validators, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4847,7 +4847,7 @@ impl<'de> serde::Deserialize<'de> for QueryDelegatorValidatorsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryHistoricalInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4868,7 +4868,7 @@ impl serde::Serialize for QueryHistoricalInfoRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4881,7 +4881,7 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { enum GeneratedField { Height, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4954,7 +4954,7 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryHistoricalInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4974,7 +4974,7 @@ impl serde::Serialize for QueryHistoricalInfoResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4987,7 +4987,7 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { enum GeneratedField { Hist, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5055,7 +5055,7 @@ impl<'de> serde::Deserialize<'de> for QueryHistoricalInfoResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5069,7 +5069,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5080,7 +5080,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5134,7 +5134,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5154,7 +5154,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5167,7 +5167,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5232,7 +5232,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryPoolRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5246,7 +5246,7 @@ impl serde::Serialize for QueryPoolRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryPoolRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5257,7 +5257,7 @@ impl<'de> serde::Deserialize<'de> for QueryPoolRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5311,7 +5311,7 @@ impl<'de> serde::Deserialize<'de> for QueryPoolRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryPoolResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5331,7 +5331,7 @@ impl serde::Serialize for QueryPoolResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryPoolResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5344,7 +5344,7 @@ impl<'de> serde::Deserialize<'de> for QueryPoolResponse { enum GeneratedField { Pool, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5409,7 +5409,7 @@ impl<'de> serde::Deserialize<'de> for QueryPoolResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryRedelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5447,7 +5447,7 @@ impl serde::Serialize for QueryRedelegationsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5471,7 +5471,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { DstValidatorAddr, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5572,7 +5572,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryRedelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5598,7 +5598,7 @@ impl serde::Serialize for QueryRedelegationsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5616,7 +5616,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { RedelegationResponses, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5699,7 +5699,7 @@ impl<'de> serde::Deserialize<'de> for QueryRedelegationsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryUnbondingDelegationRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5727,7 +5727,7 @@ impl serde::Serialize for QueryUnbondingDelegationRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5746,7 +5746,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { DelegatorAddr, ValidatorAddr, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5825,7 +5825,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryUnbondingDelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5847,7 +5847,7 @@ impl serde::Serialize for QueryUnbondingDelegationResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5860,7 +5860,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { enum GeneratedField { Unbond, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5929,7 +5929,7 @@ impl<'de> serde::Deserialize<'de> for QueryUnbondingDelegationResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorDelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5957,7 +5957,7 @@ impl serde::Serialize for QueryValidatorDelegationsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5971,7 +5971,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { ValidatorAddr, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6051,7 +6051,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorDelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6079,7 +6079,7 @@ impl serde::Serialize for QueryValidatorDelegationsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6093,7 +6093,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { DelegationResponses, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6177,7 +6177,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorDelegationsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6197,7 +6197,7 @@ impl serde::Serialize for QueryValidatorRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6210,7 +6210,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { enum GeneratedField { ValidatorAddr, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6280,7 +6280,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6300,7 +6300,7 @@ impl serde::Serialize for QueryValidatorResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6313,7 +6313,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { enum GeneratedField { Validator, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6383,7 +6383,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorUnbondingDelegationsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6411,7 +6411,7 @@ impl serde::Serialize for QueryValidatorUnbondingDelegationsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6425,7 +6425,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest ValidatorAddr, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6506,7 +6506,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsRequest ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorUnbondingDelegationsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6534,7 +6534,7 @@ impl serde::Serialize for QueryValidatorUnbondingDelegationsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6548,7 +6548,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse UnbondingResponses, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6633,7 +6633,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorUnbondingDelegationsResponse ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6659,7 +6659,7 @@ impl serde::Serialize for QueryValidatorsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6673,7 +6673,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { Status, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6752,7 +6752,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryValidatorsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6778,7 +6778,7 @@ impl serde::Serialize for QueryValidatorsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6792,7 +6792,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { Validators, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6871,7 +6871,7 @@ impl<'de> serde::Deserialize<'de> for QueryValidatorsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Redelegation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6909,7 +6909,7 @@ impl serde::Serialize for Redelegation { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Redelegation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6933,7 +6933,7 @@ impl<'de> serde::Deserialize<'de> for Redelegation { ValidatorDstAddress, Entries, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7037,7 +7037,7 @@ impl<'de> serde::Deserialize<'de> for Redelegation { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for RedelegationEntry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7079,7 +7079,7 @@ impl serde::Serialize for RedelegationEntry { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for RedelegationEntry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7104,7 +7104,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntry { InitialBalance, SharesDst, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7207,7 +7207,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntry { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for RedelegationEntryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7233,7 +7233,7 @@ impl serde::Serialize for RedelegationEntryResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7247,7 +7247,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { RedelegationEntry, Balance, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7328,7 +7328,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationEntryResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for RedelegationResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7354,7 +7354,7 @@ impl serde::Serialize for RedelegationResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for RedelegationResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7368,7 +7368,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationResponse { Redelegation, Entries, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7447,7 +7447,7 @@ impl<'de> serde::Deserialize<'de> for RedelegationResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for StakeAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7489,7 +7489,7 @@ impl serde::Serialize for StakeAuthorization { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for StakeAuthorization { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7514,7 +7514,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { AllowList, DenyList, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7613,7 +7613,7 @@ impl<'de> serde::Deserialize<'de> for StakeAuthorization { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for stake_authorization::Validators { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7633,7 +7633,7 @@ impl serde::Serialize for stake_authorization::Validators { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7646,7 +7646,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { enum GeneratedField { Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7716,7 +7716,7 @@ impl<'de> serde::Deserialize<'de> for stake_authorization::Validators { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for UnbondingDelegation { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7748,7 +7748,7 @@ impl serde::Serialize for UnbondingDelegation { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for UnbondingDelegation { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7769,7 +7769,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegation { ValidatorAddress, Entries, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7858,7 +7858,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegation { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for UnbondingDelegationEntry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7900,7 +7900,7 @@ impl serde::Serialize for UnbondingDelegationEntry { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7924,7 +7924,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { InitialBalance, Balance, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8030,7 +8030,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingDelegationEntry { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ValAddresses { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8050,7 +8050,7 @@ impl serde::Serialize for ValAddresses { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ValAddresses { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8063,7 +8063,7 @@ impl<'de> serde::Deserialize<'de> for ValAddresses { enum GeneratedField { Addresses, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8130,7 +8130,7 @@ impl<'de> serde::Deserialize<'de> for ValAddresses { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Validator { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8217,7 +8217,7 @@ impl serde::Serialize for Validator { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Validator { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8258,7 +8258,7 @@ impl<'de> serde::Deserialize<'de> for Validator { Commission, MinSelfDelegation, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs index ae3a4e5c..3a33f86a 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.signing.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SignMode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -17,7 +17,7 @@ impl serde::Serialize for SignMode { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SignMode { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -84,7 +84,7 @@ impl<'de> serde::Deserialize<'de> for SignMode { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SignatureDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -117,7 +117,7 @@ impl serde::Serialize for SignatureDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SignatureDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -132,7 +132,7 @@ impl<'de> serde::Deserialize<'de> for SignatureDescriptor { Data, Sequence, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -220,7 +220,7 @@ impl<'de> serde::Deserialize<'de> for SignatureDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for signature_descriptor::Data { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -247,7 +247,7 @@ impl serde::Serialize for signature_descriptor::Data { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -261,7 +261,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { Single, Multi, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -340,7 +340,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::Data { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for signature_descriptor::data::Multi { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -368,7 +368,7 @@ impl serde::Serialize for signature_descriptor::data::Multi { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -382,7 +382,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { Bitarray, Signatures, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -462,7 +462,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Multi { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for signature_descriptor::data::Single { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -496,7 +496,7 @@ impl serde::Serialize for signature_descriptor::data::Single { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -510,7 +510,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { Mode, Signature, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -593,7 +593,7 @@ impl<'de> serde::Deserialize<'de> for signature_descriptor::data::Single { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SignatureDescriptors { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -613,7 +613,7 @@ impl serde::Serialize for SignatureDescriptors { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SignatureDescriptors { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -626,7 +626,7 @@ impl<'de> serde::Deserialize<'de> for SignatureDescriptors { enum GeneratedField { Signatures, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs index ce7e2c7b..37cc696a 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.tx.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AuthInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -30,7 +30,7 @@ impl serde::Serialize for AuthInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AuthInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -45,7 +45,7 @@ impl<'de> serde::Deserialize<'de> for AuthInfo { Fee, Tip, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -126,7 +126,7 @@ impl<'de> serde::Deserialize<'de> for AuthInfo { deserializer.deserialize_struct("cosmos.tx.v1beta1.AuthInfo", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AuxSignerData { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -167,7 +167,7 @@ impl serde::Serialize for AuxSignerData { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AuxSignerData { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -183,7 +183,7 @@ impl<'de> serde::Deserialize<'de> for AuxSignerData { Mode, Sig, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -278,7 +278,7 @@ impl<'de> serde::Deserialize<'de> for AuxSignerData { deserializer.deserialize_struct("cosmos.tx.v1beta1.AuxSignerData", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for BroadcastMode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -294,7 +294,7 @@ impl serde::Serialize for BroadcastMode { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for BroadcastMode { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -357,7 +357,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastMode { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for BroadcastTxRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -389,7 +389,7 @@ impl serde::Serialize for BroadcastTxRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -403,7 +403,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { TxBytes, Mode, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -482,7 +482,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for BroadcastTxResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -502,7 +502,7 @@ impl serde::Serialize for BroadcastTxResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for BroadcastTxResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -515,7 +515,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxResponse { enum GeneratedField { TxResponse, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -582,7 +582,7 @@ impl<'de> serde::Deserialize<'de> for BroadcastTxResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Fee { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -621,7 +621,7 @@ impl serde::Serialize for Fee { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Fee { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -637,7 +637,7 @@ impl<'de> serde::Deserialize<'de> for Fee { Payer, Granter, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -730,7 +730,7 @@ impl<'de> serde::Deserialize<'de> for Fee { deserializer.deserialize_struct("cosmos.tx.v1beta1.Fee", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetBlockWithTxsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -757,7 +757,7 @@ impl serde::Serialize for GetBlockWithTxsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -771,7 +771,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { Height, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -853,7 +853,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetBlockWithTxsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -891,7 +891,7 @@ impl serde::Serialize for GetBlockWithTxsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -907,7 +907,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { Block, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1004,7 +1004,7 @@ impl<'de> serde::Deserialize<'de> for GetBlockWithTxsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetTxRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1023,7 +1023,7 @@ impl serde::Serialize for GetTxRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetTxRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1036,7 +1036,7 @@ impl<'de> serde::Deserialize<'de> for GetTxRequest { enum GeneratedField { Hash, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1099,7 +1099,7 @@ impl<'de> serde::Deserialize<'de> for GetTxRequest { deserializer.deserialize_struct("cosmos.tx.v1beta1.GetTxRequest", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetTxResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1124,7 +1124,7 @@ impl serde::Serialize for GetTxResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetTxResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1138,7 +1138,7 @@ impl<'de> serde::Deserialize<'de> for GetTxResponse { Tx, TxResponse, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1210,7 +1210,7 @@ impl<'de> serde::Deserialize<'de> for GetTxResponse { deserializer.deserialize_struct("cosmos.tx.v1beta1.GetTxResponse", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetTxsEventRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1259,7 +1259,7 @@ impl serde::Serialize for GetTxsEventRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1283,7 +1283,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { Page, Limit, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1392,7 +1392,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GetTxsEventResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1431,7 +1431,7 @@ impl serde::Serialize for GetTxsEventResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1447,7 +1447,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { Pagination, Total, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1544,7 +1544,7 @@ impl<'de> serde::Deserialize<'de> for GetTxsEventResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ModeInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1570,7 +1570,7 @@ impl serde::Serialize for ModeInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ModeInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1584,7 +1584,7 @@ impl<'de> serde::Deserialize<'de> for ModeInfo { Single, Multi, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1656,7 +1656,7 @@ impl<'de> serde::Deserialize<'de> for ModeInfo { deserializer.deserialize_struct("cosmos.tx.v1beta1.ModeInfo", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for mode_info::Multi { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1682,7 +1682,7 @@ impl serde::Serialize for mode_info::Multi { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for mode_info::Multi { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1696,7 +1696,7 @@ impl<'de> serde::Deserialize<'de> for mode_info::Multi { Bitarray, ModeInfos, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1772,7 +1772,7 @@ impl<'de> serde::Deserialize<'de> for mode_info::Multi { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for mode_info::Single { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1794,7 +1794,7 @@ impl serde::Serialize for mode_info::Single { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for mode_info::Single { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1807,7 +1807,7 @@ impl<'de> serde::Deserialize<'de> for mode_info::Single { enum GeneratedField { Mode, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1876,7 +1876,7 @@ impl<'de> serde::Deserialize<'de> for mode_info::Single { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for OrderBy { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1891,7 +1891,7 @@ impl serde::Serialize for OrderBy { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for OrderBy { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1948,7 +1948,7 @@ impl<'de> serde::Deserialize<'de> for OrderBy { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SignDoc { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1997,7 +1997,7 @@ impl serde::Serialize for SignDoc { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SignDoc { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2022,7 +2022,7 @@ impl<'de> serde::Deserialize<'de> for SignDoc { ChainId, AccountNumber, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2123,7 +2123,7 @@ impl<'de> serde::Deserialize<'de> for SignDoc { deserializer.deserialize_struct("cosmos.tx.v1beta1.SignDoc", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SignDocDirectAux { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2182,7 +2182,7 @@ impl serde::Serialize for SignDocDirectAux { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SignDocDirectAux { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2211,7 +2211,7 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { Sequence, Tip, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2332,7 +2332,7 @@ impl<'de> serde::Deserialize<'de> for SignDocDirectAux { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SignerInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2364,7 +2364,7 @@ impl serde::Serialize for SignerInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SignerInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2385,7 +2385,7 @@ impl<'de> serde::Deserialize<'de> for SignerInfo { ModeInfo, Sequence, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2469,7 +2469,7 @@ impl<'de> serde::Deserialize<'de> for SignerInfo { deserializer.deserialize_struct("cosmos.tx.v1beta1.SignerInfo", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SimulateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2499,7 +2499,7 @@ impl serde::Serialize for SimulateRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SimulateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2513,7 +2513,7 @@ impl<'de> serde::Deserialize<'de> for SimulateRequest { Tx, TxBytes, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2592,7 +2592,7 @@ impl<'de> serde::Deserialize<'de> for SimulateRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SimulateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2618,7 +2618,7 @@ impl serde::Serialize for SimulateResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SimulateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2632,7 +2632,7 @@ impl<'de> serde::Deserialize<'de> for SimulateResponse { GasInfo, Result, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2708,7 +2708,7 @@ impl<'de> serde::Deserialize<'de> for SimulateResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Tip { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2733,7 +2733,7 @@ impl serde::Serialize for Tip { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Tip { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2747,7 +2747,7 @@ impl<'de> serde::Deserialize<'de> for Tip { Amount, Tipper, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2819,7 +2819,7 @@ impl<'de> serde::Deserialize<'de> for Tip { deserializer.deserialize_struct("cosmos.tx.v1beta1.Tip", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Tx { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2857,7 +2857,7 @@ impl serde::Serialize for Tx { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Tx { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2872,7 +2872,7 @@ impl<'de> serde::Deserialize<'de> for Tx { AuthInfo, Signatures, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2958,7 +2958,7 @@ impl<'de> serde::Deserialize<'de> for Tx { deserializer.deserialize_struct("cosmos.tx.v1beta1.Tx", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TxBody { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3008,7 +3008,7 @@ impl serde::Serialize for TxBody { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TxBody { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3034,7 +3034,7 @@ impl<'de> serde::Deserialize<'de> for TxBody { ExtensionOptions, NonCriticalExtensionOptions, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3143,7 +3143,7 @@ impl<'de> serde::Deserialize<'de> for TxBody { deserializer.deserialize_struct("cosmos.tx.v1beta1.TxBody", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for TxRaw { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3189,7 +3189,7 @@ impl serde::Serialize for TxRaw { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for TxRaw { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3210,7 +3210,7 @@ impl<'de> serde::Deserialize<'de> for TxRaw { AuthInfoBytes, Signatures, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs index fbfae25f..0dd6e6aa 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.upgrade.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CancelSoftwareUpgradeProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,7 +25,7 @@ impl serde::Serialize for CancelSoftwareUpgradeProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { Title, Description, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -118,7 +118,7 @@ impl<'de> serde::Deserialize<'de> for CancelSoftwareUpgradeProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ModuleVersion { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -145,7 +145,7 @@ impl serde::Serialize for ModuleVersion { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ModuleVersion { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -159,7 +159,7 @@ impl<'de> serde::Deserialize<'de> for ModuleVersion { Name, Version, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -238,7 +238,7 @@ impl<'de> serde::Deserialize<'de> for ModuleVersion { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCancelUpgrade { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -258,7 +258,7 @@ impl serde::Serialize for MsgCancelUpgrade { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -271,7 +271,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { enum GeneratedField { Authority, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -338,7 +338,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgrade { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCancelUpgradeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -352,7 +352,7 @@ impl serde::Serialize for MsgCancelUpgradeResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -363,7 +363,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -420,7 +420,7 @@ impl<'de> serde::Deserialize<'de> for MsgCancelUpgradeResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSoftwareUpgrade { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -446,7 +446,7 @@ impl serde::Serialize for MsgSoftwareUpgrade { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -460,7 +460,7 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { Authority, Plan, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -536,7 +536,7 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgrade { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgSoftwareUpgradeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -550,7 +550,7 @@ impl serde::Serialize for MsgSoftwareUpgradeResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -561,7 +561,7 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -618,7 +618,7 @@ impl<'de> serde::Deserialize<'de> for MsgSoftwareUpgradeResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Plan { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -662,7 +662,7 @@ impl serde::Serialize for Plan { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Plan { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -686,7 +686,7 @@ impl<'de> serde::Deserialize<'de> for Plan { Info, UpgradedClientState, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -792,7 +792,7 @@ impl<'de> serde::Deserialize<'de> for Plan { deserializer.deserialize_struct("cosmos.upgrade.v1beta1.Plan", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAppliedPlanRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -812,7 +812,7 @@ impl serde::Serialize for QueryAppliedPlanRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -825,7 +825,7 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { enum GeneratedField { Name, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -895,7 +895,7 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAppliedPlanResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -916,7 +916,7 @@ impl serde::Serialize for QueryAppliedPlanResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -929,7 +929,7 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { enum GeneratedField { Height, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1002,7 +1002,7 @@ impl<'de> serde::Deserialize<'de> for QueryAppliedPlanResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAuthorityRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1016,7 +1016,7 @@ impl serde::Serialize for QueryAuthorityRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1027,7 +1027,7 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1084,7 +1084,7 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAuthorityResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1104,7 +1104,7 @@ impl serde::Serialize for QueryAuthorityResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1117,7 +1117,7 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { enum GeneratedField { Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1187,7 +1187,7 @@ impl<'de> serde::Deserialize<'de> for QueryAuthorityResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryCurrentPlanRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1201,7 +1201,7 @@ impl serde::Serialize for QueryCurrentPlanRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1212,7 +1212,7 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1269,7 +1269,7 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryCurrentPlanResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1289,7 +1289,7 @@ impl serde::Serialize for QueryCurrentPlanResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1302,7 +1302,7 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { enum GeneratedField { Plan, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1370,7 +1370,7 @@ impl<'de> serde::Deserialize<'de> for QueryCurrentPlanResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryModuleVersionsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1390,7 +1390,7 @@ impl serde::Serialize for QueryModuleVersionsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1403,7 +1403,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { enum GeneratedField { ModuleName, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1473,7 +1473,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryModuleVersionsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1493,7 +1493,7 @@ impl serde::Serialize for QueryModuleVersionsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1506,7 +1506,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { enum GeneratedField { ModuleVersions, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1578,7 +1578,7 @@ impl<'de> serde::Deserialize<'de> for QueryModuleVersionsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryUpgradedConsensusStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1604,7 +1604,7 @@ impl serde::Serialize for QueryUpgradedConsensusStateRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1617,7 +1617,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { enum GeneratedField { LastHeight, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1691,7 +1691,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryUpgradedConsensusStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1717,7 +1717,7 @@ impl serde::Serialize for QueryUpgradedConsensusStateResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1730,7 +1730,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { enum GeneratedField { UpgradedConsensusState, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1808,7 +1808,7 @@ impl<'de> serde::Deserialize<'de> for QueryUpgradedConsensusStateResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SoftwareUpgradeProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1840,7 +1840,7 @@ impl serde::Serialize for SoftwareUpgradeProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SoftwareUpgradeProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1855,7 +1855,7 @@ impl<'de> serde::Deserialize<'de> for SoftwareUpgradeProposal { Description, Plan, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs index 35708862..9e6e285b 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.vesting.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for BaseVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -44,7 +44,7 @@ impl serde::Serialize for BaseVestingAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for BaseVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -72,7 +72,7 @@ impl<'de> serde::Deserialize<'de> for BaseVestingAccount { DelegatedVesting, EndTime, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -182,7 +182,7 @@ impl<'de> serde::Deserialize<'de> for BaseVestingAccount { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ContinuousVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -210,7 +210,7 @@ impl serde::Serialize for ContinuousVestingAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -229,7 +229,7 @@ impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { BaseVestingAccount, StartTime, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -315,7 +315,7 @@ impl<'de> serde::Deserialize<'de> for ContinuousVestingAccount { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DelayedVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -335,7 +335,7 @@ impl serde::Serialize for DelayedVestingAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -348,7 +348,7 @@ impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { enum GeneratedField { BaseVestingAccount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -422,7 +422,7 @@ impl<'de> serde::Deserialize<'de> for DelayedVestingAccount { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreatePeriodicVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -464,7 +464,7 @@ impl serde::Serialize for MsgCreatePeriodicVestingAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -489,7 +489,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { StartTime, VestingPeriods, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -591,7 +591,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccount { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreatePeriodicVestingAccountResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -607,7 +607,7 @@ impl serde::Serialize for MsgCreatePeriodicVestingAccountResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccountResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -618,7 +618,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccountResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -677,7 +677,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePeriodicVestingAccountResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreatePermanentLockedAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -711,7 +711,7 @@ impl serde::Serialize for MsgCreatePermanentLockedAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -732,7 +732,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { ToAddress, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -820,7 +820,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccount { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreatePermanentLockedAccountResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -836,7 +836,7 @@ impl serde::Serialize for MsgCreatePermanentLockedAccountResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccountResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -847,7 +847,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccountResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -906,7 +906,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreatePermanentLockedAccountResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -951,7 +951,7 @@ impl serde::Serialize for MsgCreateVestingAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -977,7 +977,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { EndTime, Delayed, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1086,7 +1086,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccount { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgCreateVestingAccountResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1102,7 +1102,7 @@ impl serde::Serialize for MsgCreateVestingAccountResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccountResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1113,7 +1113,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccountResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1170,7 +1170,7 @@ impl<'de> serde::Deserialize<'de> for MsgCreateVestingAccountResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Period { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1196,7 +1196,7 @@ impl serde::Serialize for Period { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Period { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1210,7 +1210,7 @@ impl<'de> serde::Deserialize<'de> for Period { Length, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1285,7 +1285,7 @@ impl<'de> serde::Deserialize<'de> for Period { deserializer.deserialize_struct("cosmos.vesting.v1beta1.Period", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PeriodicVestingAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1319,7 +1319,7 @@ impl serde::Serialize for PeriodicVestingAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1341,7 +1341,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { StartTime, VestingPeriods, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1438,7 +1438,7 @@ impl<'de> serde::Deserialize<'de> for PeriodicVestingAccount { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PermanentLockedAccount { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1458,7 +1458,7 @@ impl serde::Serialize for PermanentLockedAccount { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PermanentLockedAccount { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1471,7 +1471,7 @@ impl<'de> serde::Deserialize<'de> for PermanentLockedAccount { enum GeneratedField { BaseVestingAccount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs index 9628d2fc..0ebdf0ed 100644 --- a/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs +++ b/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos_proto.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for InterfaceDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,7 +25,7 @@ impl serde::Serialize for InterfaceDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { Name, Description, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -115,7 +115,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ScalarDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -155,7 +155,7 @@ impl serde::Serialize for ScalarDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ScalarDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -170,7 +170,7 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { Description, FieldType, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -256,7 +256,7 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { deserializer.deserialize_struct("cosmos_proto.ScalarDescriptor", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ScalarType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -271,7 +271,7 @@ impl serde::Serialize for ScalarType { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ScalarType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs index 650edac4..27639f3d 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.query.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PageRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -47,7 +47,7 @@ impl serde::Serialize for PageRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PageRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -71,7 +71,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { CountTotal, Reverse, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -183,7 +183,7 @@ impl<'de> serde::Deserialize<'de> for PageRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PageResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -214,7 +214,7 @@ impl serde::Serialize for PageResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PageResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -228,7 +228,7 @@ impl<'de> serde::Deserialize<'de> for PageResponse { NextKey, Total, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs index 63cadeef..92880130 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.base.v1beta1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Coin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24,7 +24,7 @@ impl serde::Serialize for Coin { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Coin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -38,7 +38,7 @@ impl<'de> serde::Deserialize<'de> for Coin { Denom, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -110,7 +110,7 @@ impl<'de> serde::Deserialize<'de> for Coin { deserializer.deserialize_struct("cosmos.base.v1beta1.Coin", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DecCoin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -135,7 +135,7 @@ impl serde::Serialize for DecCoin { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DecCoin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -149,7 +149,7 @@ impl<'de> serde::Deserialize<'de> for DecCoin { Denom, Amount, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -221,7 +221,7 @@ impl<'de> serde::Deserialize<'de> for DecCoin { deserializer.deserialize_struct("cosmos.base.v1beta1.DecCoin", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for DecProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -240,7 +240,7 @@ impl serde::Serialize for DecProto { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for DecProto { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -253,7 +253,7 @@ impl<'de> serde::Deserialize<'de> for DecProto { enum GeneratedField { Dec, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -316,7 +316,7 @@ impl<'de> serde::Deserialize<'de> for DecProto { deserializer.deserialize_struct("cosmos.base.v1beta1.DecProto", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for IntProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -335,7 +335,7 @@ impl serde::Serialize for IntProto { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for IntProto { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -348,7 +348,7 @@ impl<'de> serde::Deserialize<'de> for IntProto { enum GeneratedField { Int, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs index 9628d2fc..0ebdf0ed 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos_proto.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for InterfaceDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -25,7 +25,7 @@ impl serde::Serialize for InterfaceDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -39,7 +39,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { Name, Description, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -115,7 +115,7 @@ impl<'de> serde::Deserialize<'de> for InterfaceDescriptor { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ScalarDescriptor { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -155,7 +155,7 @@ impl serde::Serialize for ScalarDescriptor { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ScalarDescriptor { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -170,7 +170,7 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { Description, FieldType, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -256,7 +256,7 @@ impl<'de> serde::Deserialize<'de> for ScalarDescriptor { deserializer.deserialize_struct("cosmos_proto.ScalarDescriptor", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ScalarType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -271,7 +271,7 @@ impl serde::Serialize for ScalarType { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ScalarType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs index e3ba95df..1820e4e7 100644 --- a/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmwasm.wasm.v1.serde.rs @@ -1,5 +1,5 @@ // @generated -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AbsoluteTxPosition { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -30,7 +30,7 @@ impl serde::Serialize for AbsoluteTxPosition { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -44,7 +44,7 @@ impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { BlockHeight, TxIndex, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -126,7 +126,7 @@ impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AccessConfig { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -160,7 +160,7 @@ impl serde::Serialize for AccessConfig { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AccessConfig { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -175,7 +175,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { Address, Addresses, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -256,7 +256,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfig { deserializer.deserialize_struct("cosmwasm.wasm.v1.AccessConfig", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AccessConfigUpdate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -283,7 +283,7 @@ impl serde::Serialize for AccessConfigUpdate { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AccessConfigUpdate { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -302,7 +302,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfigUpdate { CodeId, InstantiatePermission, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -385,7 +385,7 @@ impl<'de> serde::Deserialize<'de> for AccessConfigUpdate { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AccessType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -402,7 +402,7 @@ impl serde::Serialize for AccessType { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AccessType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -467,7 +467,7 @@ impl<'de> serde::Deserialize<'de> for AccessType { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for AccessTypeParam { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -490,7 +490,7 @@ impl serde::Serialize for AccessTypeParam { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for AccessTypeParam { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -503,7 +503,7 @@ impl<'de> serde::Deserialize<'de> for AccessTypeParam { enum GeneratedField { Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -570,7 +570,7 @@ impl<'de> serde::Deserialize<'de> for AccessTypeParam { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ClearAdminProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -602,7 +602,7 @@ impl serde::Serialize for ClearAdminProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ClearAdminProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -617,7 +617,7 @@ impl<'de> serde::Deserialize<'de> for ClearAdminProposal { Description, Contract, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -702,7 +702,7 @@ impl<'de> serde::Deserialize<'de> for ClearAdminProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Code { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -744,7 +744,7 @@ impl serde::Serialize for Code { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Code { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -768,7 +768,7 @@ impl<'de> serde::Deserialize<'de> for Code { CodeBytes, Pinned, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -864,7 +864,7 @@ impl<'de> serde::Deserialize<'de> for Code { deserializer.deserialize_struct("cosmwasm.wasm.v1.Code", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CodeInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -899,7 +899,7 @@ impl serde::Serialize for CodeInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CodeInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -920,7 +920,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfo { Creator, InstantiateConfig, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1006,7 +1006,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfo { deserializer.deserialize_struct("cosmwasm.wasm.v1.CodeInfo", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for CodeInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1049,7 +1049,7 @@ impl serde::Serialize for CodeInfoResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for CodeInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1073,7 +1073,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfoResponse { DataHash, InstantiatePermission, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1177,7 +1177,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfoResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Contract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1208,7 +1208,7 @@ impl serde::Serialize for Contract { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Contract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1230,7 +1230,7 @@ impl<'de> serde::Deserialize<'de> for Contract { ContractInfo, ContractState, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1313,7 +1313,7 @@ impl<'de> serde::Deserialize<'de> for Contract { deserializer.deserialize_struct("cosmwasm.wasm.v1.Contract", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ContractCodeHistoryEntry { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1357,7 +1357,7 @@ impl serde::Serialize for ContractCodeHistoryEntry { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ContractCodeHistoryEntry { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1373,7 +1373,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryEntry { Updated, Msg, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1477,7 +1477,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryEntry { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ContractCodeHistoryOperationType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1493,7 +1493,7 @@ impl serde::Serialize for ContractCodeHistoryOperationType { serializer.serialize_str(variant) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ContractCodeHistoryOperationType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1564,7 +1564,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryOperationType { deserializer.deserialize_any(GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ContractInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1620,7 +1620,7 @@ impl serde::Serialize for ContractInfo { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ContractInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1649,7 +1649,7 @@ impl<'de> serde::Deserialize<'de> for ContractInfo { IbcPortId, Extension, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1769,7 +1769,7 @@ impl<'de> serde::Deserialize<'de> for ContractInfo { deserializer.deserialize_struct("cosmwasm.wasm.v1.ContractInfo", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for ExecuteContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1821,7 +1821,7 @@ impl serde::Serialize for ExecuteContractProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -1847,7 +1847,7 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { Msg, Funds, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -1965,7 +1965,7 @@ impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2008,7 +2008,7 @@ impl serde::Serialize for GenesisState { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GenesisState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2032,7 +2032,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { Sequences, GenMsgs, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2131,7 +2131,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { deserializer.deserialize_struct("cosmwasm.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for genesis_state::GenMsgs { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2161,7 +2161,7 @@ impl serde::Serialize for genesis_state::GenMsgs { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2183,7 +2183,7 @@ impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { InstantiateContract, ExecuteContract, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2277,7 +2277,7 @@ impl<'de> serde::Deserialize<'de> for genesis_state::GenMsgs { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for InstantiateContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2342,7 +2342,7 @@ impl serde::Serialize for InstantiateContractProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2373,7 +2373,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { Msg, Funds, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2512,7 +2512,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MigrateContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2559,7 +2559,7 @@ impl serde::Serialize for MigrateContractProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MigrateContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2583,7 +2583,7 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { CodeId, Msg, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2695,7 +2695,7 @@ impl<'de> serde::Deserialize<'de> for MigrateContractProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Model { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2726,7 +2726,7 @@ impl serde::Serialize for Model { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Model { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2740,7 +2740,7 @@ impl<'de> serde::Deserialize<'de> for Model { Key, Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2818,7 +2818,7 @@ impl<'de> serde::Deserialize<'de> for Model { deserializer.deserialize_struct("cosmwasm.wasm.v1.Model", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgClearAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2843,7 +2843,7 @@ impl serde::Serialize for MsgClearAdmin { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgClearAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2857,7 +2857,7 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdmin { Sender, Contract, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -2929,7 +2929,7 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdmin { deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgClearAdmin", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgClearAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2943,7 +2943,7 @@ impl serde::Serialize for MsgClearAdminResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -2954,7 +2954,7 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3011,7 +3011,7 @@ impl<'de> serde::Deserialize<'de> for MsgClearAdminResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgExecuteContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3051,7 +3051,7 @@ impl serde::Serialize for MsgExecuteContract { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgExecuteContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3067,7 +3067,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContract { Msg, Funds, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3164,7 +3164,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContract { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgExecuteContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3186,7 +3186,7 @@ impl serde::Serialize for MsgExecuteContractResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3199,7 +3199,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { enum GeneratedField { Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3272,7 +3272,7 @@ impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgIbcCloseChannel { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3292,7 +3292,7 @@ impl serde::Serialize for MsgIbcCloseChannel { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3305,7 +3305,7 @@ impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { enum GeneratedField { Channel, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3372,7 +3372,7 @@ impl<'de> serde::Deserialize<'de> for MsgIbcCloseChannel { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgIbcSend { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3419,7 +3419,7 @@ impl serde::Serialize for MsgIbcSend { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgIbcSend { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3442,7 +3442,7 @@ impl<'de> serde::Deserialize<'de> for MsgIbcSend { TimeoutTimestamp, Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3543,7 +3543,7 @@ impl<'de> serde::Deserialize<'de> for MsgIbcSend { deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgIBCSend", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgInstantiateContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3596,7 +3596,7 @@ impl serde::Serialize for MsgInstantiateContract { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3616,7 +3616,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { Msg, Funds, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3737,7 +3737,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgInstantiateContract2 { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3804,7 +3804,7 @@ impl serde::Serialize for MsgInstantiateContract2 { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -3827,7 +3827,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { Salt, FixMsg, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -3969,7 +3969,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2 { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgInstantiateContract2Response { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3997,7 +3997,7 @@ impl serde::Serialize for MsgInstantiateContract2Response { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4011,7 +4011,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { Address, Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4093,7 +4093,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContract2Response { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgInstantiateContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4121,7 +4121,7 @@ impl serde::Serialize for MsgInstantiateContractResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4135,7 +4135,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { Address, Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4217,7 +4217,7 @@ impl<'de> serde::Deserialize<'de> for MsgInstantiateContractResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgMigrateContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4258,7 +4258,7 @@ impl serde::Serialize for MsgMigrateContract { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgMigrateContract { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4274,7 +4274,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContract { CodeId, Msg, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4374,7 +4374,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContract { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgMigrateContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4396,7 +4396,7 @@ impl serde::Serialize for MsgMigrateContractResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4409,7 +4409,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { enum GeneratedField { Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4482,7 +4482,7 @@ impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgStoreCode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4517,7 +4517,7 @@ impl serde::Serialize for MsgStoreCode { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgStoreCode { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4538,7 +4538,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { WasmByteCode, InstantiatePermission, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4626,7 +4626,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCode { deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgStoreCode", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgStoreCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4657,7 +4657,7 @@ impl serde::Serialize for MsgStoreCodeResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4671,7 +4671,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { CodeId, Checksum, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4756,7 +4756,7 @@ impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4787,7 +4787,7 @@ impl serde::Serialize for MsgUpdateAdmin { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4802,7 +4802,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { NewAdmin, Contract, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4883,7 +4883,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdmin { deserializer.deserialize_struct("cosmwasm.wasm.v1.MsgUpdateAdmin", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for MsgUpdateAdminResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4897,7 +4897,7 @@ impl serde::Serialize for MsgUpdateAdminResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -4908,7 +4908,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -4965,7 +4965,7 @@ impl<'de> serde::Deserialize<'de> for MsgUpdateAdminResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4996,7 +4996,7 @@ impl serde::Serialize for Params { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Params { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5015,7 +5015,7 @@ impl<'de> serde::Deserialize<'de> for Params { CodeUploadAccess, InstantiateDefaultPermission, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5095,7 +5095,7 @@ impl<'de> serde::Deserialize<'de> for Params { deserializer.deserialize_struct("cosmwasm.wasm.v1.Params", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for PinCodesProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5134,7 +5134,7 @@ impl serde::Serialize for PinCodesProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for PinCodesProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5149,7 +5149,7 @@ impl<'de> serde::Deserialize<'de> for PinCodesProposal { Description, CodeIds, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5239,7 +5239,7 @@ impl<'de> serde::Deserialize<'de> for PinCodesProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5265,7 +5265,7 @@ impl serde::Serialize for QueryAllContractStateRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5279,7 +5279,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { Address, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5358,7 +5358,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryAllContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5384,7 +5384,7 @@ impl serde::Serialize for QueryAllContractStateResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5398,7 +5398,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { Models, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5477,7 +5477,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllContractStateResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5498,7 +5498,7 @@ impl serde::Serialize for QueryCodeRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryCodeRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5511,7 +5511,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodeRequest { enum GeneratedField { CodeId, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5581,7 +5581,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodeRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5609,7 +5609,7 @@ impl serde::Serialize for QueryCodeResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5623,7 +5623,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodeResponse { CodeInfo, Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5702,7 +5702,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodeResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5722,7 +5722,7 @@ impl serde::Serialize for QueryCodesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryCodesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5735,7 +5735,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5802,7 +5802,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5828,7 +5828,7 @@ impl serde::Serialize for QueryCodesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryCodesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5842,7 +5842,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { CodeInfos, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -5918,7 +5918,7 @@ impl<'de> serde::Deserialize<'de> for QueryCodesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryContractHistoryRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -5944,7 +5944,7 @@ impl serde::Serialize for QueryContractHistoryRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -5958,7 +5958,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { Address, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6037,7 +6037,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryContractHistoryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6063,7 +6063,7 @@ impl serde::Serialize for QueryContractHistoryResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6077,7 +6077,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { Entries, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6156,7 +6156,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractHistoryResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryContractInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6176,7 +6176,7 @@ impl serde::Serialize for QueryContractInfoRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6189,7 +6189,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { enum GeneratedField { Address, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6259,7 +6259,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryContractInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6285,7 +6285,7 @@ impl serde::Serialize for QueryContractInfoResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6299,7 +6299,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { Address, ContractInfo, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6378,7 +6378,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractInfoResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryContractsByCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6405,7 +6405,7 @@ impl serde::Serialize for QueryContractsByCodeRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6419,7 +6419,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { CodeId, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6501,7 +6501,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryContractsByCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6527,7 +6527,7 @@ impl serde::Serialize for QueryContractsByCodeResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6541,7 +6541,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { Contracts, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6620,7 +6620,7 @@ impl<'de> serde::Deserialize<'de> for QueryContractsByCodeResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6633,7 +6633,7 @@ impl serde::Serialize for QueryParamsRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6644,7 +6644,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField {} - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6698,7 +6698,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6718,7 +6718,7 @@ impl serde::Serialize for QueryParamsResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryParamsResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6731,7 +6731,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { enum GeneratedField { Params, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6796,7 +6796,7 @@ impl<'de> serde::Deserialize<'de> for QueryParamsResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryPinnedCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6816,7 +6816,7 @@ impl serde::Serialize for QueryPinnedCodesRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6829,7 +6829,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { enum GeneratedField { Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -6899,7 +6899,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryPinnedCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -6932,7 +6932,7 @@ impl serde::Serialize for QueryPinnedCodesResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -6946,7 +6946,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { CodeIds, Pagination, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7030,7 +7030,7 @@ impl<'de> serde::Deserialize<'de> for QueryPinnedCodesResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryRawContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7060,7 +7060,7 @@ impl serde::Serialize for QueryRawContractStateRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7074,7 +7074,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { Address, QueryData, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7156,7 +7156,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QueryRawContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7178,7 +7178,7 @@ impl serde::Serialize for QueryRawContractStateResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7191,7 +7191,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { enum GeneratedField { Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7264,7 +7264,7 @@ impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySmartContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7294,7 +7294,7 @@ impl serde::Serialize for QuerySmartContractStateRequest { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7308,7 +7308,7 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { Address, QueryData, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7390,7 +7390,7 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for QuerySmartContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7412,7 +7412,7 @@ impl serde::Serialize for QuerySmartContractStateResponse { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7425,7 +7425,7 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { enum GeneratedField { Data, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7498,7 +7498,7 @@ impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for Sequence { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7528,7 +7528,7 @@ impl serde::Serialize for Sequence { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for Sequence { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7542,7 +7542,7 @@ impl<'de> serde::Deserialize<'de> for Sequence { IdKey, Value, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7620,7 +7620,7 @@ impl<'de> serde::Deserialize<'de> for Sequence { deserializer.deserialize_struct("cosmwasm.wasm.v1.Sequence", FIELDS, GeneratedVisitor) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for StoreCodeProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7674,7 +7674,7 @@ impl serde::Serialize for StoreCodeProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for StoreCodeProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7703,7 +7703,7 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { InstantiatePermission, UnpinCode, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7822,7 +7822,7 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for SudoContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7862,7 +7862,7 @@ impl serde::Serialize for SudoContractProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for SudoContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -7878,7 +7878,7 @@ impl<'de> serde::Deserialize<'de> for SudoContractProposal { Contract, Msg, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -7978,7 +7978,7 @@ impl<'de> serde::Deserialize<'de> for SudoContractProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for UnpinCodesProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8017,7 +8017,7 @@ impl serde::Serialize for UnpinCodesProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for UnpinCodesProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8032,7 +8032,7 @@ impl<'de> serde::Deserialize<'de> for UnpinCodesProposal { Description, CodeIds, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8122,7 +8122,7 @@ impl<'de> serde::Deserialize<'de> for UnpinCodesProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for UpdateAdminProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8160,7 +8160,7 @@ impl serde::Serialize for UpdateAdminProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for UpdateAdminProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8176,7 +8176,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAdminProposal { NewAdmin, Contract, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where @@ -8270,7 +8270,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAdminProposal { ) } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl serde::Serialize for UpdateInstantiateConfigProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -8302,7 +8302,7 @@ impl serde::Serialize for UpdateInstantiateConfigProposal { struct_ser.end() } } -#[cfg(feature = "serialization")] +#[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for UpdateInstantiateConfigProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result @@ -8322,7 +8322,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInstantiateConfigProposal { Description, AccessConfigUpdates, } - #[cfg(feature = "serialization")] + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result where diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index acf8bf46..e1ed924a 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -380,9 +380,9 @@ fn copy_and_patch(src: impl AsRef, dest: impl AsRef) -> io::Result<( // TODO(tarcieri): figure out what's wrong with our `buf` config and do it there ("::prost_types::", "::tendermint_proto::google::protobuf::"), // add the feature flag to the serde definitions - ("impl serde::Serialize for", "#[cfg(feature = \"serialization\")]\n\ + ("impl serde::Serialize for", "#[cfg(feature = \"serde\")]\n\ impl serde::Serialize for"), - ("impl<'de> serde::Deserialize<'de> for", "#[cfg(feature = \"serialization\")]\n\ + ("impl<'de> serde::Deserialize<'de> for", "#[cfg(feature = \"serde\")]\n\ impl<'de> serde::Deserialize<'de> for") ]; From 41b9a2151d854e3f3b70210296af32aca1987f5a Mon Sep 17 00:00:00 2001 From: Ash Date: Tue, 13 Aug 2024 11:58:48 -0700 Subject: [PATCH 31/31] format --- proto-build/src/main.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index e1ed924a..17d457b6 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -380,10 +380,16 @@ fn copy_and_patch(src: impl AsRef, dest: impl AsRef) -> io::Result<( // TODO(tarcieri): figure out what's wrong with our `buf` config and do it there ("::prost_types::", "::tendermint_proto::google::protobuf::"), // add the feature flag to the serde definitions - ("impl serde::Serialize for", "#[cfg(feature = \"serde\")]\n\ - impl serde::Serialize for"), - ("impl<'de> serde::Deserialize<'de> for", "#[cfg(feature = \"serde\")]\n\ - impl<'de> serde::Deserialize<'de> for") + ( + "impl serde::Serialize for", + "#[cfg(feature = \"serde\")]\n\ + impl serde::Serialize for", + ), + ( + "impl<'de> serde::Deserialize<'de> for", + "#[cfg(feature = \"serde\")]\n\ + impl<'de> serde::Deserialize<'de> for", + ), ]; // Skip proto files belonging to `EXCLUDED_PROTO_PACKAGES`