From c484269142bd03b895ccb807bc0f4b53f0189ebe Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Wed, 14 Aug 2024 12:58:42 -0600 Subject: [PATCH] Bump `cosmos-sdk` to v0.47.10; `wasmd` to v0.45.0 --- .../src/prost/cosmos-sdk/COSMOS_SDK_COMMIT | 2 +- cosmos-sdk-proto/src/prost/wasmd/WASMD_COMMIT | 2 +- cosmos-sdk-proto/src/prost/wasmd/amino.rs | 2 + .../src/prost/wasmd/cosmos.msg.v1.rs | 2 + .../src/prost/wasmd/cosmwasm.wasm.v1.rs | 912 +- .../src/prost/wasmd/cosmwasm.wasm.v1.serde.rs | 8814 +++++++++++++---- .../src/prost/wasmd/cosmwasm.wasm.v1.tonic.rs | 474 +- cosmrs/src/cosmwasm/access_config.rs | 5 - proto-build/src/main.rs | 4 +- wasmd | 2 +- 10 files changed, 7726 insertions(+), 2493 deletions(-) create mode 100644 cosmos-sdk-proto/src/prost/wasmd/amino.rs create mode 100644 cosmos-sdk-proto/src/prost/wasmd/cosmos.msg.v1.rs 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/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/amino.rs b/cosmos-sdk-proto/src/prost/wasmd/amino.rs new file mode 100644 index 00000000..8e2ac1be --- /dev/null +++ b/cosmos-sdk-proto/src/prost/wasmd/amino.rs @@ -0,0 +1,2 @@ +// @generated +// @@protoc_insertion_point(module) diff --git a/cosmos-sdk-proto/src/prost/wasmd/cosmos.msg.v1.rs b/cosmos-sdk-proto/src/prost/wasmd/cosmos.msg.v1.rs new file mode 100644 index 00000000..8e2ac1be --- /dev/null +++ b/cosmos-sdk-proto/src/prost/wasmd/cosmos.msg.v1.rs @@ -0,0 +1,2 @@ +// @generated +// @@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 b7655700..207bf584 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<::tendermint_proto::google::protobuf::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<::tendermint_proto::google::protobuf::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 1820e4e7..083658b3 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 @@ -127,7 +127,7 @@ impl<'de> serde::Deserialize<'de> for AbsoluteTxPosition { } } #[cfg(feature = "serde")] -impl serde::Serialize for AccessConfig { +impl serde::Serialize for AcceptedMessageKeysFilter { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -135,10 +135,225 @@ 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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() { @@ -151,9 +366,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)?; } @@ -167,12 +379,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, } #[cfg(feature = "serde")] @@ -200,7 +411,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)), } @@ -222,7 +432,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 { @@ -232,12 +441,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")); @@ -248,7 +451,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(), }) } @@ -395,7 +597,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", }; @@ -412,7 +613,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", ]; @@ -457,7 +657,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)), @@ -571,52 +770,30 @@ impl<'de> serde::Deserialize<'de> for AccessTypeParam { } } #[cfg(feature = "serde")] -impl serde::Serialize for ClearAdminProposal { +impl serde::Serialize for AllowAllMessagesFilter { #[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)?; - } + let len = 0; + let struct_ser = + serializer.serialize_struct("cosmwasm.wasm.v1.AllowAllMessagesFilter", len)?; struct_ser.end() } } #[cfg(feature = "serde")] -impl<'de> serde::Deserialize<'de> for ClearAdminProposal { +impl<'de> serde::Deserialize<'de> for AllowAllMessagesFilter { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { - const FIELDS: &[&str] = &["title", "description", "contract"]; + const FIELDS: &[&str] = &[]; #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Title, - Description, - Contract, - } + enum GeneratedField {} #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -640,12 +817,7 @@ impl<'de> serde::Deserialize<'de> for ClearAdminProposal { 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)), - } + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -653,35 +825,144 @@ impl<'de> serde::Deserialize<'de> for ClearAdminProposal { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ClearAdminProposal; + type Value = AllowAllMessagesFilter; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct cosmwasm.wasm.v1.ClearAdminProposal") + formatter.write_str("struct cosmwasm.wasm.v1.AllowAllMessagesFilter") } - fn visit_map(self, 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 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() { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(AllowAllMessagesFilter {}) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.AllowAllMessagesFilter", + FIELDS, + GeneratedVisitor, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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()?); @@ -865,6 +1146,133 @@ impl<'de> serde::Deserialize<'de> for Code { } } #[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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) + } +} +#[cfg(feature = "serde")] impl serde::Serialize for CodeInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -1178,7 +1586,7 @@ impl<'de> serde::Deserialize<'de> for CodeInfoResponse { } } #[cfg(feature = "serde")] -impl serde::Serialize for Contract { +impl serde::Serialize for CombinedLimit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -1186,25 +1594,151 @@ impl serde::Serialize for Contract { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.contract_address.is_empty() { + if self.calls_remaining != 0 { len += 1; } - if self.contract_info.is_some() { - len += 1; - } - if !self.contract_state.is_empty() { + if !self.amounts.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)?; + 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 let Some(v) = self.contract_info.as_ref() { - struct_ser.serialize_field("contractInfo", v)?; + if !self.amounts.is_empty() { + struct_ser.serialize_field("amounts", &self.amounts)?; + } + struct_ser.end() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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) + } +} +#[cfg(feature = "serde")] +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; + } + 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)?; + } + 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)?; } + if !self.contract_code_history.is_empty() { + struct_ser.serialize_field("contractCodeHistory", &self.contract_code_history)?; + } struct_ser.end() } } @@ -1222,6 +1756,8 @@ impl<'de> serde::Deserialize<'de> for Contract { "contractInfo", "contract_state", "contractState", + "contract_code_history", + "contractCodeHistory", ]; #[allow(clippy::enum_variant_names)] @@ -1229,6 +1765,7 @@ impl<'de> serde::Deserialize<'de> for Contract { ContractAddress, ContractInfo, ContractState, + ContractCodeHistory, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -1259,6 +1796,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)), } } @@ -1281,6 +1821,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 => { @@ -1301,12 +1842,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(), }) } } @@ -1565,7 +2115,7 @@ impl<'de> serde::Deserialize<'de> for ContractCodeHistoryOperationType { } } #[cfg(feature = "serde")] -impl serde::Serialize for ContractInfo { +impl serde::Serialize for ContractExecutionAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -1573,81 +2123,29 @@ 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() { + if !self.grants.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)?; + 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -1673,13 +2171,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)), } } @@ -1689,88 +2181,44 @@ 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")); - } - 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")); + GeneratedField::Grants => { + if grants__.is_some() { + return Err(serde::de::Error::duplicate_field("grants")); } - 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, + ) } } #[cfg(feature = "serde")] -impl serde::Serialize for ExecuteContractProposal { +impl serde::Serialize for ContractGrant { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -1778,74 +2226,42 @@ impl serde::Serialize for ExecuteContractProposal { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.title.is_empty() { + if !self.contract.is_empty() { len += 1; } - if !self.description.is_empty() { + if self.limit.is_some() { len += 1; } - if !self.run_as.is_empty() { + if self.filter.is_some() { len += 1; } + let mut struct_ser = serializer.serialize_struct("cosmwasm.wasm.v1.ContractGrant", len)?; if !self.contract.is_empty() { - len += 1; + struct_ser.serialize_field("contract", &self.contract)?; } - if !self.msg.is_empty() { - len += 1; + if let Some(v) = self.limit.as_ref() { + struct_ser.serialize_field("limit", v)?; } - 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)?; + if let Some(v) = self.filter.as_ref() { + struct_ser.serialize_field("filter", v)?; } struct_ser.end() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -1871,12 +2287,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)), } } @@ -1886,87 +2299,53 @@ 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) } } #[cfg(feature = "serde")] -impl serde::Serialize for GenesisState { +impl serde::Serialize for ContractInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -1974,63 +2353,81 @@ 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.gen_msgs.is_empty() { - struct_ser.serialize_field("genMsgs", &self.gen_msgs)?; + 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2056,11 +2453,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)), } } @@ -2070,69 +2469,88 @@ 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::GenMsgs => { - if gen_msgs__.is_some() { - return Err(serde::de::Error::duplicate_field("genMsgs")); + 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")); } - 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) } } #[cfg(feature = "serde")] -impl serde::Serialize for genesis_state::GenMsgs { +impl serde::Serialize for ContractMigrationAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2140,48 +2558,29 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2207,13 +2606,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)), } } @@ -2223,62 +2616,44 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for InstantiateContractProposal { +impl serde::Serialize for ExecuteContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2295,13 +2670,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() { @@ -2311,7 +2680,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)?; } @@ -2321,15 +2690,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)] @@ -2343,7 +2705,7 @@ impl serde::Serialize for InstantiateContractProposal { } } #[cfg(feature = "serde")] -impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { +impl<'de> serde::Deserialize<'de> for ExecuteContractProposal { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -2354,10 +2716,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { "description", "run_as", "runAs", - "admin", - "code_id", - "codeId", - "label", + "contract", "msg", "funds", ]; @@ -2367,9 +2726,7 @@ impl<'de> serde::Deserialize<'de> for InstantiateContractProposal { Title, Description, RunAs, - Admin, - CodeId, - Label, + Contract, Msg, Funds, } @@ -2400,9 +2757,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)), @@ -2414,25 +2769,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()? { @@ -2455,26 +2808,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() { @@ -2493,27 +2831,25 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MigrateContractProposal { +impl serde::Serialize for GenesisState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2521,67 +2857,49 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2607,11 +2925,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)), } } @@ -2621,82 +2938,61 @@ 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.MigrateContractProposal") + 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 title__ = None; - let mut description__ = None; - let mut contract__ = None; - let mut code_id__ = None; - let mut msg__ = None; + 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::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::Params => { + if params__.is_some() { + return Err(serde::de::Error::duplicate_field("params")); } - description__ = Some(map_.next_value()?); + params__ = map_.next_value()?; } - GeneratedField::Contract => { - if contract__.is_some() { - return Err(serde::de::Error::duplicate_field("contract")); + GeneratedField::Codes => { + if codes__.is_some() { + return Err(serde::de::Error::duplicate_field("codes")); } - contract__ = Some(map_.next_value()?); + codes__ = Some(map_.next_value()?); } - GeneratedField::CodeId => { - if code_id__.is_some() { - return Err(serde::de::Error::duplicate_field("codeId")); + GeneratedField::Contracts => { + if contracts__.is_some() { + return Err(serde::de::Error::duplicate_field("contracts")); } - code_id__ = Some( - map_.next_value::<::pbjson::private::NumberDeserialize<_>>()? - .0, - ); + contracts__ = Some(map_.next_value()?); } - GeneratedField::Msg => { - if msg__.is_some() { - return Err(serde::de::Error::duplicate_field("msg")); + GeneratedField::Sequences => { + if sequences__.is_some() { + return Err(serde::de::Error::duplicate_field("sequences")); } - msg__ = Some( - map_.next_value::<::pbjson::private::BytesDeserialize<_>>()? - .0, - ); + sequences__ = Some(map_.next_value()?); } } } - 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(), + 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.MigrateContractProposal", - FIELDS, - GeneratedVisitor, - ) + deserializer.deserialize_struct("cosmwasm.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) } } #[cfg(feature = "serde")] -impl serde::Serialize for Model { +impl serde::Serialize for InstantiateContract2Proposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2704,41 +3000,4059 @@ impl serde::Serialize for Model { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.key.is_empty() { + if !self.title.is_empty() { len += 1; } - if !self.value.is_empty() { + if !self.description.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.run_as.is_empty() { + len += 1; } - if !self.value.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field( - "value", - pbjson::private::base64::encode(&self.value).as_str(), - )?; + if !self.admin.is_empty() { + len += 1; } - struct_ser.end() - } -} -#[cfg(feature = "serde")] + 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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] 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"]; + const FIELDS: &[&str] = &["key", "value"]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Key, + Value, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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 {} + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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 {} + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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 {} + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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 {} + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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, + ) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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, + } + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(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 authority__ = None; + let mut wasm_byte_code__ = None; + let mut instantiate_permission__ = None; + let mut contract__ = 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")); + } + 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() { + 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(MsgStoreAndMigrateContract { + authority: authority__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + instantiate_permission: instantiate_permission__, + contract: contract__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct( + "cosmwasm.wasm.v1.MsgStoreAndMigrateContract", + FIELDS, + GeneratedVisitor, + ) + } +} +#[cfg(feature = "serde")] +impl serde::Serialize for MsgStoreAndMigrateContractResponse { + #[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; + } + 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("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(), + )?; + } + 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() + } +} +#[cfg(feature = "serde")] +impl<'de> serde::Deserialize<'de> for MsgStoreAndMigrateContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &["code_id", "codeId", "checksum", "data"]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Key, - Value, + CodeId, + Checksum, + Data, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2764,8 +7078,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)), } } @@ -2775,51 +7090,69 @@ 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, + ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgClearAdmin { +impl serde::Serialize for MsgStoreCode { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -2830,32 +7163,49 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2882,7 +7232,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)), } } @@ -2892,18 +7245,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 => { @@ -2912,48 +7266,80 @@ 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) } } #[cfg(feature = "serde")] -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() } } #[cfg(feature = "serde")] -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, + } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2977,7 +7363,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) @@ -2985,34 +7375,58 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgExecuteContract { +impl serde::Serialize for MsgSudoContract { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3020,7 +7434,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() { @@ -3029,13 +7443,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)?; @@ -3045,27 +7456,23 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3091,10 +7498,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)), } } @@ -3104,27 +7510,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() { @@ -3141,31 +7546,24 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgExecuteContractResponse { +impl serde::Serialize for MsgSudoContractResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3177,7 +7575,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 @@ -3187,7 +7585,7 @@ impl serde::Serialize for MsgExecuteContractResponse { } } #[cfg(feature = "serde")] -impl<'de> serde::Deserialize<'de> for MsgExecuteContractResponse { +impl<'de> serde::Deserialize<'de> for MsgSudoContractResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -3233,16 +7631,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>, { @@ -3260,20 +7658,20 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgIbcCloseChannel { +impl serde::Serialize for MsgUnpinCodes { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3281,29 +7679,42 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3329,7 +7740,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)), } } @@ -3339,41 +7751,132 @@ 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) + } +} +#[cfg(feature = "serde")] +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() + } +} +#[cfg(feature = "serde")] +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 {} + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgIbcSend { +impl serde::Serialize for MsgUpdateAdmin { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3381,66 +7884,42 @@ 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() } } #[cfg(feature = "serde")] -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", - ]; + const FIELDS: &[&str] = &["sender", "new_admin", "newAdmin", "contract"]; - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Channel, - TimeoutHeight, - TimeoutTimestamp, - Data, + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + NewAdmin, + Contract, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3466,12 +7945,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)), } } @@ -3481,141 +7957,76 @@ 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) } } #[cfg(feature = "serde")] -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() } } #[cfg(feature = "serde")] -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 {} #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3639,15 +8050,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) @@ -3655,90 +8058,34 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgInstantiateContract2 { +impl serde::Serialize for MsgUpdateContractLabel { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3749,83 +8096,40 @@ impl serde::Serialize for MsgInstantiateContract2 { 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.new_label.is_empty() { + len += 1; } - if !self.funds.is_empty() { - struct_ser.serialize_field("funds", &self.funds)?; + if !self.contract.is_empty() { + len += 1; } - if !self.salt.is_empty() { - #[allow(clippy::needless_borrow)] - struct_ser - .serialize_field("salt", pbjson::private::base64::encode(&self.salt).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.fix_msg { - struct_ser.serialize_field("fixMsg", &self.fix_msg)?; + if !self.new_label.is_empty() { + struct_ser.serialize_field("newLabel", &self.new_label)?; + } + if !self.contract.is_empty() { + struct_ser.serialize_field("contract", &self.contract)?; } struct_ser.end() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3852,13 +8156,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)), } } @@ -3868,27 +8167,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 => { @@ -3897,80 +8191,118 @@ 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, ) } } #[cfg(feature = "serde")] -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() + } +} +#[cfg(feature = "serde")] +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 {} + #[cfg(feature = "serde")] + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting( + &self, + formatter: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::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, + ) + } +} +#[cfg(feature = "serde")] +impl serde::Serialize for MsgUpdateInstantiateConfig { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -3978,38 +8310,50 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4035,8 +8379,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)), } } @@ -4046,95 +8393,88 @@ 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, ) } } #[cfg(feature = "serde")] -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() } } #[cfg(feature = "serde")] -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 {} #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4158,11 +8498,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) @@ -4170,55 +8506,34 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgMigrateContract { +impl serde::Serialize for MsgUpdateParams { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4226,53 +8541,36 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4298,10 +8596,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)), } } @@ -4311,104 +8607,72 @@ 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, ) } } #[cfg(feature = "serde")] -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() } } #[cfg(feature = "serde")] -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 {} #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4432,10 +8696,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) @@ -4443,47 +8704,34 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgStoreCode { +impl serde::Serialize for Params { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4491,52 +8739,46 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4562,10 +8804,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)), } @@ -4576,58 +8819,49 @@ 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) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgStoreCodeResponse { +impl serde::Serialize for PinCodesProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4635,41 +8869,50 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4695,8 +8938,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)), } } @@ -4706,58 +8950,62 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for MsgUpdateAdmin { +impl serde::Serialize for QueryAllContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4765,42 +9013,36 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4826,9 +9068,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)), } } @@ -4838,76 +9079,90 @@ 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, + ) } } #[cfg(feature = "serde")] -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() } } #[cfg(feature = "serde")] -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, + } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4931,7 +9186,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) @@ -4939,34 +9198,52 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for Params { +impl serde::Serialize for QueryCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -4974,46 +9251,30 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5039,12 +9300,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)), } } @@ -5054,49 +9310,44 @@ 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, + ) } } #[cfg(feature = "serde")] -impl serde::Serialize for PinCodesProposal { +impl serde::Serialize for QueryCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5104,50 +9355,38 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5173,9 +9412,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)), } } @@ -5185,62 +9423,52 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryAllContractStateRequest { +impl serde::Serialize for QueryCodesRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5248,17 +9476,11 @@ 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)?; } @@ -5266,17 +9488,16 @@ impl serde::Serialize for QueryAllContractStateRequest { } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] @@ -5303,7 +9524,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)), } @@ -5314,29 +9534,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")); @@ -5345,21 +9555,20 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryAllContractStateResponse { +impl serde::Serialize for QueryCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5367,16 +9576,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)?; @@ -5385,17 +9594,17 @@ impl serde::Serialize for QueryAllContractStateResponse { } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] @@ -5422,7 +9631,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)), } @@ -5433,28 +9642,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() { @@ -5464,21 +9670,21 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryCodeRequest { +impl serde::Serialize for QueryContractHistoryRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5486,30 +9692,36 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5535,7 +9747,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)), } } @@ -5545,44 +9758,52 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryCodeResponse { +impl serde::Serialize for QueryContractHistoryResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5590,38 +9811,36 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5647,8 +9866,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)), } } @@ -5658,52 +9877,52 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryCodesRequest { +impl serde::Serialize for QueryContractInfoRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5711,29 +9930,29 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5759,7 +9978,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)), } } @@ -5769,41 +9988,44 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryCodesResponse { +impl serde::Serialize for QueryContractInfoResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5811,36 +10033,36 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5866,8 +10088,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)), } } @@ -5877,49 +10099,52 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryContractHistoryRequest { +impl serde::Serialize for QueryContractsByCodeRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5927,16 +10152,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)?; @@ -5945,17 +10171,17 @@ impl serde::Serialize for QueryContractHistoryRequest { } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] @@ -5982,7 +10208,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)), } @@ -5993,28 +10219,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() { @@ -6024,21 +10253,21 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryContractHistoryResponse { +impl serde::Serialize for QueryContractsByCodeResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6046,16 +10275,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)?; @@ -6064,17 +10293,17 @@ impl serde::Serialize for QueryContractHistoryResponse { } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] @@ -6101,7 +10330,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)), } @@ -6112,28 +10341,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() { @@ -6143,21 +10372,21 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryContractInfoRequest { +impl serde::Serialize for QueryContractsByCreatorRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6165,29 +10394,36 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6213,7 +10449,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)), } } @@ -6223,44 +10462,52 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryContractInfoResponse { +impl serde::Serialize for QueryContractsByCreatorResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6268,36 +10515,36 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6323,8 +10570,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)), } } @@ -6334,91 +10583,74 @@ 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, ) } } #[cfg(feature = "serde")] -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() } } #[cfg(feature = "serde")] -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 {} #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6442,11 +10674,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) @@ -6454,55 +10682,31 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryContractsByCodeResponse { +impl serde::Serialize for QueryParamsResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6510,36 +10714,29 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6565,8 +10762,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)), } } @@ -6576,74 +10772,70 @@ 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, ) } } #[cfg(feature = "serde")] -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() } } #[cfg(feature = "serde")] -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, + } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6667,7 +10859,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) @@ -6675,31 +10870,44 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryParamsResponse { +impl serde::Serialize for QueryPinnedCodesResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6707,29 +10915,43 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6755,7 +10977,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)), } } @@ -6765,39 +10988,57 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryPinnedCodesRequest { +impl serde::Serialize for QueryRawContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6805,29 +11046,40 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6853,7 +11105,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)), } } @@ -6863,44 +11116,55 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryPinnedCodesResponse { +impl serde::Serialize for QueryRawContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6908,43 +11172,31 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6970,8 +11222,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)), } } @@ -6981,57 +11232,47 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryRawContractStateRequest { +impl serde::Serialize for QuerySmartContractStateRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7046,7 +11287,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)?; } @@ -7061,7 +11302,7 @@ impl serde::Serialize for QueryRawContractStateRequest { } } #[cfg(feature = "serde")] -impl<'de> serde::Deserialize<'de> for QueryRawContractStateRequest { +impl<'de> serde::Deserialize<'de> for QuerySmartContractStateRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -7109,16 +11350,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>, { @@ -7143,21 +11384,21 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QueryRawContractStateResponse { +impl serde::Serialize for QuerySmartContractStateResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7169,7 +11410,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 @@ -7179,7 +11420,7 @@ impl serde::Serialize for QueryRawContractStateResponse { } } #[cfg(feature = "serde")] -impl<'de> serde::Deserialize<'de> for QueryRawContractStateResponse { +impl<'de> serde::Deserialize<'de> for QuerySmartContractStateResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where @@ -7225,16 +11466,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>, { @@ -7252,20 +11493,20 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for QuerySmartContractStateRequest { +impl serde::Serialize for Sequence { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7273,40 +11514,40 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7332,8 +11573,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)), } } @@ -7343,55 +11584,51 @@ 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) } } #[cfg(feature = "serde")] -impl serde::Serialize for QuerySmartContractStateResponse { +impl serde::Serialize for StoreAndInstantiateContractProposal { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7399,31 +11636,142 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7449,7 +11797,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)), } } @@ -7459,47 +11821,151 @@ 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, ) } } #[cfg(feature = "serde")] -impl serde::Serialize for Sequence { +impl serde::Serialize for StoreCodeAuthorization { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7507,40 +11973,29 @@ 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() } } #[cfg(feature = "serde")] -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, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7566,8 +12021,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)), } } @@ -7577,47 +12031,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, + ) } } #[cfg(feature = "serde")] @@ -7647,6 +12094,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() { @@ -7671,6 +12127,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() } } @@ -7692,6 +12161,10 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { "instantiatePermission", "unpin_code", "unpinCode", + "source", + "builder", + "code_hash", + "codeHash", ]; #[allow(clippy::enum_variant_names)] @@ -7702,6 +12175,9 @@ impl<'de> serde::Deserialize<'de> for StoreCodeProposal { WasmByteCode, InstantiatePermission, UnpinCode, + Source, + Builder, + CodeHash, } #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7735,6 +12211,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)), } } @@ -7760,6 +12239,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 => { @@ -7803,6 +12285,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 { @@ -7812,6 +12315,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/cosmrs/src/cosmwasm/access_config.rs b/cosmrs/src/cosmwasm/access_config.rs index 0edc0697..6c6345a2 100644 --- a/cosmrs/src/cosmwasm/access_config.rs +++ b/cosmrs/src/cosmwasm/access_config.rs @@ -31,10 +31,6 @@ impl TryFrom<&proto::cosmwasm::wasm::v1::AccessConfig> for AccessConfig { let mut addresses = Vec::with_capacity(proto.addresses.len()); - if !proto.address.is_empty() { - addresses.push(proto.address.parse()?); - } - for address in &proto.addresses { addresses.push(address.parse()?); } @@ -56,7 +52,6 @@ impl From<&AccessConfig> for proto::cosmwasm::wasm::v1::AccessConfig { fn from(config: &AccessConfig) -> proto::cosmwasm::wasm::v1::AccessConfig { proto::cosmwasm::wasm::v1::AccessConfig { permission: config.permission as i32, - address: "".to_string(), addresses: config.addresses.iter().map(ToString::to_string).collect(), } } diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index 17d457b6..ebf965bb 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