terra_proto_rs/models/
cosmwasm.wasm.v1.rs

1/// AccessTypeParam
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct AccessTypeParam {
5    #[prost(enumeration = "AccessType", tag = "1")]
6    pub value: i32,
7}
8/// AccessConfig access control type.
9#[allow(clippy::derive_partial_eq_without_eq)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct AccessConfig {
12    #[prost(enumeration = "AccessType", tag = "1")]
13    pub permission: i32,
14    /// Address
15    /// Deprecated: replaced by addresses
16    #[prost(string, tag = "2")]
17    pub address: ::prost::alloc::string::String,
18    #[prost(string, repeated, tag = "3")]
19    pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
20}
21/// Params defines the set of wasm parameters.
22#[allow(clippy::derive_partial_eq_without_eq)]
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct Params {
25    #[prost(message, optional, tag = "1")]
26    pub code_upload_access: ::core::option::Option<AccessConfig>,
27    #[prost(enumeration = "AccessType", tag = "2")]
28    pub instantiate_default_permission: i32,
29}
30/// CodeInfo is data for the uploaded contract WASM code
31#[allow(clippy::derive_partial_eq_without_eq)]
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct CodeInfo {
34    /// CodeHash is the unique identifier created by wasmvm
35    #[prost(bytes = "vec", tag = "1")]
36    pub code_hash: ::prost::alloc::vec::Vec<u8>,
37    /// Creator address who initially stored the code
38    #[prost(string, tag = "2")]
39    pub creator: ::prost::alloc::string::String,
40    /// InstantiateConfig access control to apply on contract creation, optional
41    #[prost(message, optional, tag = "5")]
42    pub instantiate_config: ::core::option::Option<AccessConfig>,
43}
44/// ContractInfo stores a WASM contract instance
45#[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct ContractInfo {
48    /// CodeID is the reference to the stored Wasm code
49    #[prost(uint64, tag = "1")]
50    pub code_id: u64,
51    /// Creator address who initially instantiated the contract
52    #[prost(string, tag = "2")]
53    pub creator: ::prost::alloc::string::String,
54    /// Admin is an optional address that can execute migrations
55    #[prost(string, tag = "3")]
56    pub admin: ::prost::alloc::string::String,
57    /// Label is optional metadata to be stored with a contract instance.
58    #[prost(string, tag = "4")]
59    pub label: ::prost::alloc::string::String,
60    /// Created Tx position when the contract was instantiated.
61    #[prost(message, optional, tag = "5")]
62    pub created: ::core::option::Option<AbsoluteTxPosition>,
63    #[prost(string, tag = "6")]
64    pub ibc_port_id: ::prost::alloc::string::String,
65    /// Extension is an extension point to store custom metadata within the
66    /// persistence model.
67    #[prost(message, optional, tag = "7")]
68    pub extension: ::core::option::Option<::prost_types::Any>,
69}
70/// ContractCodeHistoryEntry metadata to a contract.
71#[allow(clippy::derive_partial_eq_without_eq)]
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct ContractCodeHistoryEntry {
74    #[prost(enumeration = "ContractCodeHistoryOperationType", tag = "1")]
75    pub operation: i32,
76    /// CodeID is the reference to the stored WASM code
77    #[prost(uint64, tag = "2")]
78    pub code_id: u64,
79    /// Updated Tx position when the operation was executed.
80    #[prost(message, optional, tag = "3")]
81    pub updated: ::core::option::Option<AbsoluteTxPosition>,
82    #[prost(bytes = "vec", tag = "4")]
83    pub msg: ::prost::alloc::vec::Vec<u8>,
84}
85/// AbsoluteTxPosition is a unique transaction position that allows for global
86/// ordering of transactions.
87#[allow(clippy::derive_partial_eq_without_eq)]
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct AbsoluteTxPosition {
90    /// BlockHeight is the block the contract was created at
91    #[prost(uint64, tag = "1")]
92    pub block_height: u64,
93    /// TxIndex is a monotonic counter within the block (actual transaction index,
94    /// or gas consumed)
95    #[prost(uint64, tag = "2")]
96    pub tx_index: u64,
97}
98/// Model is a struct that holds a KV pair
99#[allow(clippy::derive_partial_eq_without_eq)]
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct Model {
102    /// hex-encode key to read it better (this is often ascii)
103    #[prost(bytes = "vec", tag = "1")]
104    pub key: ::prost::alloc::vec::Vec<u8>,
105    /// base64-encode raw value
106    #[prost(bytes = "vec", tag = "2")]
107    pub value: ::prost::alloc::vec::Vec<u8>,
108}
109/// AccessType permission types
110#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
111#[repr(i32)]
112pub enum AccessType {
113    /// AccessTypeUnspecified placeholder for empty value
114    Unspecified = 0,
115    /// AccessTypeNobody forbidden
116    Nobody = 1,
117    /// AccessTypeOnlyAddress restricted to a single address
118    /// Deprecated: use AccessTypeAnyOfAddresses instead
119    OnlyAddress = 2,
120    /// AccessTypeEverybody unrestricted
121    Everybody = 3,
122    /// AccessTypeAnyOfAddresses allow any of the addresses
123    AnyOfAddresses = 4,
124}
125impl AccessType {
126    /// String value of the enum field names used in the ProtoBuf definition.
127    ///
128    /// The values are not transformed in any way and thus are considered stable
129    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
130    pub fn as_str_name(&self) -> &'static str {
131        match self {
132            AccessType::Unspecified => "ACCESS_TYPE_UNSPECIFIED",
133            AccessType::Nobody => "ACCESS_TYPE_NOBODY",
134            AccessType::OnlyAddress => "ACCESS_TYPE_ONLY_ADDRESS",
135            AccessType::Everybody => "ACCESS_TYPE_EVERYBODY",
136            AccessType::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES",
137        }
138    }
139    /// Creates an enum from field names used in the ProtoBuf definition.
140    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
141        match value {
142            "ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
143            "ACCESS_TYPE_NOBODY" => Some(Self::Nobody),
144            "ACCESS_TYPE_ONLY_ADDRESS" => Some(Self::OnlyAddress),
145            "ACCESS_TYPE_EVERYBODY" => Some(Self::Everybody),
146            "ACCESS_TYPE_ANY_OF_ADDRESSES" => Some(Self::AnyOfAddresses),
147            _ => None,
148        }
149    }
150}
151/// ContractCodeHistoryOperationType actions that caused a code change
152#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
153#[repr(i32)]
154pub enum ContractCodeHistoryOperationType {
155    /// ContractCodeHistoryOperationTypeUnspecified placeholder for empty value
156    Unspecified = 0,
157    /// ContractCodeHistoryOperationTypeInit on chain contract instantiation
158    Init = 1,
159    /// ContractCodeHistoryOperationTypeMigrate code migration
160    Migrate = 2,
161    /// ContractCodeHistoryOperationTypeGenesis based on genesis data
162    Genesis = 3,
163}
164impl ContractCodeHistoryOperationType {
165    /// String value of the enum field names used in the ProtoBuf definition.
166    ///
167    /// The values are not transformed in any way and thus are considered stable
168    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
169    pub fn as_str_name(&self) -> &'static str {
170        match self {
171            ContractCodeHistoryOperationType::Unspecified => {
172                "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"
173            }
174            ContractCodeHistoryOperationType::Init => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",
175            ContractCodeHistoryOperationType::Migrate => {
176                "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"
177            }
178            ContractCodeHistoryOperationType::Genesis => {
179                "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"
180            }
181        }
182    }
183    /// Creates an enum from field names used in the ProtoBuf definition.
184    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
185        match value {
186            "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
187            "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT" => Some(Self::Init),
188            "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" => Some(Self::Migrate),
189            "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" => Some(Self::Genesis),
190            _ => None,
191        }
192    }
193}
194/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
195/// an explicit StoreCodeProposal. To submit WASM code to the system,
196/// a simple MsgStoreCode can be invoked from the x/gov module via
197/// a v1 governance proposal.
198#[allow(clippy::derive_partial_eq_without_eq)]
199#[derive(Clone, PartialEq, ::prost::Message)]
200pub struct StoreCodeProposal {
201    /// Title is a short summary
202    #[prost(string, tag = "1")]
203    pub title: ::prost::alloc::string::String,
204    /// Description is a human readable text
205    #[prost(string, tag = "2")]
206    pub description: ::prost::alloc::string::String,
207    /// RunAs is the address that is passed to the contract's environment as sender
208    #[prost(string, tag = "3")]
209    pub run_as: ::prost::alloc::string::String,
210    /// WASMByteCode can be raw or gzip compressed
211    #[prost(bytes = "vec", tag = "4")]
212    pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
213    /// InstantiatePermission to apply on contract creation, optional
214    #[prost(message, optional, tag = "7")]
215    pub instantiate_permission: ::core::option::Option<AccessConfig>,
216    /// UnpinCode code on upload, optional
217    #[prost(bool, tag = "8")]
218    pub unpin_code: bool,
219    /// Source is the URL where the code is hosted
220    #[prost(string, tag = "9")]
221    pub source: ::prost::alloc::string::String,
222    /// Builder is the docker image used to build the code deterministically, used
223    /// for smart contract verification
224    #[prost(string, tag = "10")]
225    pub builder: ::prost::alloc::string::String,
226    /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart
227    /// contract verification
228    #[prost(bytes = "vec", tag = "11")]
229    pub code_hash: ::prost::alloc::vec::Vec<u8>,
230}
231/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
232/// an explicit InstantiateContractProposal. To instantiate a contract,
233/// a simple MsgInstantiateContract can be invoked from the x/gov module via
234/// a v1 governance proposal.
235#[allow(clippy::derive_partial_eq_without_eq)]
236#[derive(Clone, PartialEq, ::prost::Message)]
237pub struct InstantiateContractProposal {
238    /// Title is a short summary
239    #[prost(string, tag = "1")]
240    pub title: ::prost::alloc::string::String,
241    /// Description is a human readable text
242    #[prost(string, tag = "2")]
243    pub description: ::prost::alloc::string::String,
244    /// RunAs is the address that is passed to the contract's environment as sender
245    #[prost(string, tag = "3")]
246    pub run_as: ::prost::alloc::string::String,
247    /// Admin is an optional address that can execute migrations
248    #[prost(string, tag = "4")]
249    pub admin: ::prost::alloc::string::String,
250    /// CodeID is the reference to the stored WASM code
251    #[prost(uint64, tag = "5")]
252    pub code_id: u64,
253    /// Label is optional metadata to be stored with a constract instance.
254    #[prost(string, tag = "6")]
255    pub label: ::prost::alloc::string::String,
256    /// Msg json encoded message to be passed to the contract on instantiation
257    #[prost(bytes = "vec", tag = "7")]
258    pub msg: ::prost::alloc::vec::Vec<u8>,
259    /// Funds coins that are transferred to the contract on instantiation
260    #[prost(message, repeated, tag = "8")]
261    pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
262}
263/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
264/// an explicit InstantiateContract2Proposal. To instantiate contract 2,
265/// a simple MsgInstantiateContract2 can be invoked from the x/gov module via
266/// a v1 governance proposal.
267#[allow(clippy::derive_partial_eq_without_eq)]
268#[derive(Clone, PartialEq, ::prost::Message)]
269pub struct InstantiateContract2Proposal {
270    /// Title is a short summary
271    #[prost(string, tag = "1")]
272    pub title: ::prost::alloc::string::String,
273    /// Description is a human readable text
274    #[prost(string, tag = "2")]
275    pub description: ::prost::alloc::string::String,
276    /// RunAs is the address that is passed to the contract's enviroment as sender
277    #[prost(string, tag = "3")]
278    pub run_as: ::prost::alloc::string::String,
279    /// Admin is an optional address that can execute migrations
280    #[prost(string, tag = "4")]
281    pub admin: ::prost::alloc::string::String,
282    /// CodeID is the reference to the stored WASM code
283    #[prost(uint64, tag = "5")]
284    pub code_id: u64,
285    /// Label is optional metadata to be stored with a constract instance.
286    #[prost(string, tag = "6")]
287    pub label: ::prost::alloc::string::String,
288    /// Msg json encode message to be passed to the contract on instantiation
289    #[prost(bytes = "vec", tag = "7")]
290    pub msg: ::prost::alloc::vec::Vec<u8>,
291    /// Funds coins that are transferred to the contract on instantiation
292    #[prost(message, repeated, tag = "8")]
293    pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
294    /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64.
295    #[prost(bytes = "vec", tag = "9")]
296    pub salt: ::prost::alloc::vec::Vec<u8>,
297    /// FixMsg include the msg value into the hash for the predictable address.
298    /// Default is false
299    #[prost(bool, tag = "10")]
300    pub fix_msg: bool,
301}
302/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
303/// an explicit MigrateContractProposal. To migrate a contract,
304/// a simple MsgMigrateContract can be invoked from the x/gov module via
305/// a v1 governance proposal.
306#[allow(clippy::derive_partial_eq_without_eq)]
307#[derive(Clone, PartialEq, ::prost::Message)]
308pub struct MigrateContractProposal {
309    /// Title is a short summary
310    #[prost(string, tag = "1")]
311    pub title: ::prost::alloc::string::String,
312    /// Description is a human readable text
313    ///
314    /// Note: skipping 3 as this was previously used for unneeded run_as
315    #[prost(string, tag = "2")]
316    pub description: ::prost::alloc::string::String,
317    /// Contract is the address of the smart contract
318    #[prost(string, tag = "4")]
319    pub contract: ::prost::alloc::string::String,
320    /// CodeID references the new WASM code
321    #[prost(uint64, tag = "5")]
322    pub code_id: u64,
323    /// Msg json encoded message to be passed to the contract on migration
324    #[prost(bytes = "vec", tag = "6")]
325    pub msg: ::prost::alloc::vec::Vec<u8>,
326}
327/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
328/// an explicit SudoContractProposal. To call sudo on a contract,
329/// a simple MsgSudoContract can be invoked from the x/gov module via
330/// a v1 governance proposal.
331#[allow(clippy::derive_partial_eq_without_eq)]
332#[derive(Clone, PartialEq, ::prost::Message)]
333pub struct SudoContractProposal {
334    /// Title is a short summary
335    #[prost(string, tag = "1")]
336    pub title: ::prost::alloc::string::String,
337    /// Description is a human readable text
338    #[prost(string, tag = "2")]
339    pub description: ::prost::alloc::string::String,
340    /// Contract is the address of the smart contract
341    #[prost(string, tag = "3")]
342    pub contract: ::prost::alloc::string::String,
343    /// Msg json encoded message to be passed to the contract as sudo
344    #[prost(bytes = "vec", tag = "4")]
345    pub msg: ::prost::alloc::vec::Vec<u8>,
346}
347/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
348/// an explicit ExecuteContractProposal. To call execute on a contract,
349/// a simple MsgExecuteContract can be invoked from the x/gov module via
350/// a v1 governance proposal.
351#[allow(clippy::derive_partial_eq_without_eq)]
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct ExecuteContractProposal {
354    /// Title is a short summary
355    #[prost(string, tag = "1")]
356    pub title: ::prost::alloc::string::String,
357    /// Description is a human readable text
358    #[prost(string, tag = "2")]
359    pub description: ::prost::alloc::string::String,
360    /// RunAs is the address that is passed to the contract's environment as sender
361    #[prost(string, tag = "3")]
362    pub run_as: ::prost::alloc::string::String,
363    /// Contract is the address of the smart contract
364    #[prost(string, tag = "4")]
365    pub contract: ::prost::alloc::string::String,
366    /// Msg json encoded message to be passed to the contract as execute
367    #[prost(bytes = "vec", tag = "5")]
368    pub msg: ::prost::alloc::vec::Vec<u8>,
369    /// Funds coins that are transferred to the contract on instantiation
370    #[prost(message, repeated, tag = "6")]
371    pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
372}
373/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
374/// an explicit UpdateAdminProposal. To set an admin for a contract,
375/// a simple MsgUpdateAdmin can be invoked from the x/gov module via
376/// a v1 governance proposal.
377#[allow(clippy::derive_partial_eq_without_eq)]
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct UpdateAdminProposal {
380    /// Title is a short summary
381    #[prost(string, tag = "1")]
382    pub title: ::prost::alloc::string::String,
383    /// Description is a human readable text
384    #[prost(string, tag = "2")]
385    pub description: ::prost::alloc::string::String,
386    /// NewAdmin address to be set
387    #[prost(string, tag = "3")]
388    pub new_admin: ::prost::alloc::string::String,
389    /// Contract is the address of the smart contract
390    #[prost(string, tag = "4")]
391    pub contract: ::prost::alloc::string::String,
392}
393/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
394/// an explicit ClearAdminProposal. To clear the admin of a contract,
395/// a simple MsgClearAdmin can be invoked from the x/gov module via
396/// a v1 governance proposal.
397#[allow(clippy::derive_partial_eq_without_eq)]
398#[derive(Clone, PartialEq, ::prost::Message)]
399pub struct ClearAdminProposal {
400    /// Title is a short summary
401    #[prost(string, tag = "1")]
402    pub title: ::prost::alloc::string::String,
403    /// Description is a human readable text
404    #[prost(string, tag = "2")]
405    pub description: ::prost::alloc::string::String,
406    /// Contract is the address of the smart contract
407    #[prost(string, tag = "3")]
408    pub contract: ::prost::alloc::string::String,
409}
410/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
411/// an explicit PinCodesProposal. To pin a set of code ids in the wasmvm
412/// cache, a simple MsgPinCodes can be invoked from the x/gov module via
413/// a v1 governance proposal.
414#[allow(clippy::derive_partial_eq_without_eq)]
415#[derive(Clone, PartialEq, ::prost::Message)]
416pub struct PinCodesProposal {
417    /// Title is a short summary
418    #[prost(string, tag = "1")]
419    pub title: ::prost::alloc::string::String,
420    /// Description is a human readable text
421    #[prost(string, tag = "2")]
422    pub description: ::prost::alloc::string::String,
423    /// CodeIDs references the new WASM codes
424    #[prost(uint64, repeated, packed = "false", tag = "3")]
425    pub code_ids: ::prost::alloc::vec::Vec<u64>,
426}
427/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
428/// an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm
429/// cache, a simple MsgUnpinCodes can be invoked from the x/gov module via
430/// a v1 governance proposal.
431#[allow(clippy::derive_partial_eq_without_eq)]
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct UnpinCodesProposal {
434    /// Title is a short summary
435    #[prost(string, tag = "1")]
436    pub title: ::prost::alloc::string::String,
437    /// Description is a human readable text
438    #[prost(string, tag = "2")]
439    pub description: ::prost::alloc::string::String,
440    /// CodeIDs references the WASM codes
441    #[prost(uint64, repeated, packed = "false", tag = "3")]
442    pub code_ids: ::prost::alloc::vec::Vec<u64>,
443}
444/// AccessConfigUpdate contains the code id and the access config to be
445/// applied.
446#[allow(clippy::derive_partial_eq_without_eq)]
447#[derive(Clone, PartialEq, ::prost::Message)]
448pub struct AccessConfigUpdate {
449    /// CodeID is the reference to the stored WASM code to be updated
450    #[prost(uint64, tag = "1")]
451    pub code_id: u64,
452    /// InstantiatePermission to apply to the set of code ids
453    #[prost(message, optional, tag = "2")]
454    pub instantiate_permission: ::core::option::Option<AccessConfig>,
455}
456/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
457/// an explicit UpdateInstantiateConfigProposal. To update instantiate config
458/// to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from
459/// the x/gov module via a v1 governance proposal.
460#[allow(clippy::derive_partial_eq_without_eq)]
461#[derive(Clone, PartialEq, ::prost::Message)]
462pub struct UpdateInstantiateConfigProposal {
463    /// Title is a short summary
464    #[prost(string, tag = "1")]
465    pub title: ::prost::alloc::string::String,
466    /// Description is a human readable text
467    #[prost(string, tag = "2")]
468    pub description: ::prost::alloc::string::String,
469    /// AccessConfigUpdate contains the list of code ids and the access config
470    /// to be applied.
471    #[prost(message, repeated, tag = "3")]
472    pub access_config_updates: ::prost::alloc::vec::Vec<AccessConfigUpdate>,
473}
474/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
475/// an explicit StoreAndInstantiateContractProposal. To store and instantiate
476/// the contract, a simple MsgStoreAndInstantiateContract can be invoked from
477/// the x/gov module via a v1 governance proposal.
478#[allow(clippy::derive_partial_eq_without_eq)]
479#[derive(Clone, PartialEq, ::prost::Message)]
480pub struct StoreAndInstantiateContractProposal {
481    /// Title is a short summary
482    #[prost(string, tag = "1")]
483    pub title: ::prost::alloc::string::String,
484    /// Description is a human readable text
485    #[prost(string, tag = "2")]
486    pub description: ::prost::alloc::string::String,
487    /// RunAs is the address that is passed to the contract's environment as sender
488    #[prost(string, tag = "3")]
489    pub run_as: ::prost::alloc::string::String,
490    /// WASMByteCode can be raw or gzip compressed
491    #[prost(bytes = "vec", tag = "4")]
492    pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
493    /// InstantiatePermission to apply on contract creation, optional
494    #[prost(message, optional, tag = "5")]
495    pub instantiate_permission: ::core::option::Option<AccessConfig>,
496    /// UnpinCode code on upload, optional
497    #[prost(bool, tag = "6")]
498    pub unpin_code: bool,
499    /// Admin is an optional address that can execute migrations
500    #[prost(string, tag = "7")]
501    pub admin: ::prost::alloc::string::String,
502    /// Label is optional metadata to be stored with a constract instance.
503    #[prost(string, tag = "8")]
504    pub label: ::prost::alloc::string::String,
505    /// Msg json encoded message to be passed to the contract on instantiation
506    #[prost(bytes = "vec", tag = "9")]
507    pub msg: ::prost::alloc::vec::Vec<u8>,
508    /// Funds coins that are transferred to the contract on instantiation
509    #[prost(message, repeated, tag = "10")]
510    pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
511    /// Source is the URL where the code is hosted
512    #[prost(string, tag = "11")]
513    pub source: ::prost::alloc::string::String,
514    /// Builder is the docker image used to build the code deterministically, used
515    /// for smart contract verification
516    #[prost(string, tag = "12")]
517    pub builder: ::prost::alloc::string::String,
518    /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart
519    /// contract verification
520    #[prost(bytes = "vec", tag = "13")]
521    pub code_hash: ::prost::alloc::vec::Vec<u8>,
522}
523/// GenesisState - genesis state of x/wasm
524#[allow(clippy::derive_partial_eq_without_eq)]
525#[derive(Clone, PartialEq, ::prost::Message)]
526pub struct GenesisState {
527    #[prost(message, optional, tag = "1")]
528    pub params: ::core::option::Option<Params>,
529    #[prost(message, repeated, tag = "2")]
530    pub codes: ::prost::alloc::vec::Vec<Code>,
531    #[prost(message, repeated, tag = "3")]
532    pub contracts: ::prost::alloc::vec::Vec<Contract>,
533    #[prost(message, repeated, tag = "4")]
534    pub sequences: ::prost::alloc::vec::Vec<Sequence>,
535}
536/// Code struct encompasses CodeInfo and CodeBytes
537#[allow(clippy::derive_partial_eq_without_eq)]
538#[derive(Clone, PartialEq, ::prost::Message)]
539pub struct Code {
540    #[prost(uint64, tag = "1")]
541    pub code_id: u64,
542    #[prost(message, optional, tag = "2")]
543    pub code_info: ::core::option::Option<CodeInfo>,
544    #[prost(bytes = "vec", tag = "3")]
545    pub code_bytes: ::prost::alloc::vec::Vec<u8>,
546    /// Pinned to wasmvm cache
547    #[prost(bool, tag = "4")]
548    pub pinned: bool,
549}
550/// Contract struct encompasses ContractAddress, ContractInfo, and ContractState
551#[allow(clippy::derive_partial_eq_without_eq)]
552#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct Contract {
554    #[prost(string, tag = "1")]
555    pub contract_address: ::prost::alloc::string::String,
556    #[prost(message, optional, tag = "2")]
557    pub contract_info: ::core::option::Option<ContractInfo>,
558    #[prost(message, repeated, tag = "3")]
559    pub contract_state: ::prost::alloc::vec::Vec<Model>,
560    #[prost(message, repeated, tag = "4")]
561    pub contract_code_history: ::prost::alloc::vec::Vec<ContractCodeHistoryEntry>,
562}
563/// Sequence key and value of an id generation counter
564#[allow(clippy::derive_partial_eq_without_eq)]
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct Sequence {
567    #[prost(bytes = "vec", tag = "1")]
568    pub id_key: ::prost::alloc::vec::Vec<u8>,
569    #[prost(uint64, tag = "2")]
570    pub value: u64,
571}
572/// MsgIBCSend
573#[allow(clippy::derive_partial_eq_without_eq)]
574#[derive(Clone, PartialEq, ::prost::Message)]
575pub struct MsgIbcSend {
576    /// the channel by which the packet will be sent
577    #[prost(string, tag = "2")]
578    pub channel: ::prost::alloc::string::String,
579    /// Timeout height relative to the current block height.
580    /// The timeout is disabled when set to 0.
581    #[prost(uint64, tag = "4")]
582    pub timeout_height: u64,
583    /// Timeout timestamp (in nanoseconds) relative to the current block timestamp.
584    /// The timeout is disabled when set to 0.
585    #[prost(uint64, tag = "5")]
586    pub timeout_timestamp: u64,
587    /// Data is the payload to transfer. We must not make assumption what format or
588    /// content is in here.
589    #[prost(bytes = "vec", tag = "6")]
590    pub data: ::prost::alloc::vec::Vec<u8>,
591}
592/// MsgIBCSendResponse
593#[allow(clippy::derive_partial_eq_without_eq)]
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct MsgIbcSendResponse {
596    /// Sequence number of the IBC packet sent
597    #[prost(uint64, tag = "1")]
598    pub sequence: u64,
599}
600/// MsgIBCCloseChannel port and channel need to be owned by the contract
601#[allow(clippy::derive_partial_eq_without_eq)]
602#[derive(Clone, PartialEq, ::prost::Message)]
603pub struct MsgIbcCloseChannel {
604    #[prost(string, tag = "2")]
605    pub channel: ::prost::alloc::string::String,
606}
607/// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC
608/// method
609#[allow(clippy::derive_partial_eq_without_eq)]
610#[derive(Clone, PartialEq, ::prost::Message)]
611pub struct QueryContractInfoRequest {
612    /// address is the address of the contract to query
613    #[prost(string, tag = "1")]
614    pub address: ::prost::alloc::string::String,
615}
616/// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC
617/// method
618#[allow(clippy::derive_partial_eq_without_eq)]
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct QueryContractInfoResponse {
621    /// address is the address of the contract
622    #[prost(string, tag = "1")]
623    pub address: ::prost::alloc::string::String,
624    #[prost(message, optional, tag = "2")]
625    pub contract_info: ::core::option::Option<ContractInfo>,
626}
627/// QueryContractHistoryRequest is the request type for the Query/ContractHistory
628/// RPC method
629#[allow(clippy::derive_partial_eq_without_eq)]
630#[derive(Clone, PartialEq, ::prost::Message)]
631pub struct QueryContractHistoryRequest {
632    /// address is the address of the contract to query
633    #[prost(string, tag = "1")]
634    pub address: ::prost::alloc::string::String,
635    /// pagination defines an optional pagination for the request.
636    #[prost(message, optional, tag = "2")]
637    pub pagination:
638        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
639}
640/// QueryContractHistoryResponse is the response type for the
641/// Query/ContractHistory RPC method
642#[allow(clippy::derive_partial_eq_without_eq)]
643#[derive(Clone, PartialEq, ::prost::Message)]
644pub struct QueryContractHistoryResponse {
645    #[prost(message, repeated, tag = "1")]
646    pub entries: ::prost::alloc::vec::Vec<ContractCodeHistoryEntry>,
647    /// pagination defines the pagination in the response.
648    #[prost(message, optional, tag = "2")]
649    pub pagination:
650        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
651}
652/// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode
653/// RPC method
654#[allow(clippy::derive_partial_eq_without_eq)]
655#[derive(Clone, PartialEq, ::prost::Message)]
656pub struct QueryContractsByCodeRequest {
657    /// grpc-gateway_out does not support Go style CodID
658    #[prost(uint64, tag = "1")]
659    pub code_id: u64,
660    /// pagination defines an optional pagination for the request.
661    #[prost(message, optional, tag = "2")]
662    pub pagination:
663        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
664}
665/// QueryContractsByCodeResponse is the response type for the
666/// Query/ContractsByCode RPC method
667#[allow(clippy::derive_partial_eq_without_eq)]
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct QueryContractsByCodeResponse {
670    /// contracts are a set of contract addresses
671    #[prost(string, repeated, tag = "1")]
672    pub contracts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
673    /// pagination defines the pagination in the response.
674    #[prost(message, optional, tag = "2")]
675    pub pagination:
676        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
677}
678/// QueryAllContractStateRequest is the request type for the
679/// Query/AllContractState RPC method
680#[allow(clippy::derive_partial_eq_without_eq)]
681#[derive(Clone, PartialEq, ::prost::Message)]
682pub struct QueryAllContractStateRequest {
683    /// address is the address of the contract
684    #[prost(string, tag = "1")]
685    pub address: ::prost::alloc::string::String,
686    /// pagination defines an optional pagination for the request.
687    #[prost(message, optional, tag = "2")]
688    pub pagination:
689        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
690}
691/// QueryAllContractStateResponse is the response type for the
692/// Query/AllContractState RPC method
693#[allow(clippy::derive_partial_eq_without_eq)]
694#[derive(Clone, PartialEq, ::prost::Message)]
695pub struct QueryAllContractStateResponse {
696    #[prost(message, repeated, tag = "1")]
697    pub models: ::prost::alloc::vec::Vec<Model>,
698    /// pagination defines the pagination in the response.
699    #[prost(message, optional, tag = "2")]
700    pub pagination:
701        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
702}
703/// QueryRawContractStateRequest is the request type for the
704/// Query/RawContractState RPC method
705#[allow(clippy::derive_partial_eq_without_eq)]
706#[derive(Clone, PartialEq, ::prost::Message)]
707pub struct QueryRawContractStateRequest {
708    /// address is the address of the contract
709    #[prost(string, tag = "1")]
710    pub address: ::prost::alloc::string::String,
711    #[prost(bytes = "vec", tag = "2")]
712    pub query_data: ::prost::alloc::vec::Vec<u8>,
713}
714/// QueryRawContractStateResponse is the response type for the
715/// Query/RawContractState RPC method
716#[allow(clippy::derive_partial_eq_without_eq)]
717#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct QueryRawContractStateResponse {
719    /// Data contains the raw store data
720    #[prost(bytes = "vec", tag = "1")]
721    pub data: ::prost::alloc::vec::Vec<u8>,
722}
723/// QuerySmartContractStateRequest is the request type for the
724/// Query/SmartContractState RPC method
725#[allow(clippy::derive_partial_eq_without_eq)]
726#[derive(Clone, PartialEq, ::prost::Message)]
727pub struct QuerySmartContractStateRequest {
728    /// address is the address of the contract
729    #[prost(string, tag = "1")]
730    pub address: ::prost::alloc::string::String,
731    /// QueryData contains the query data passed to the contract
732    #[prost(bytes = "vec", tag = "2")]
733    pub query_data: ::prost::alloc::vec::Vec<u8>,
734}
735/// QuerySmartContractStateResponse is the response type for the
736/// Query/SmartContractState RPC method
737#[allow(clippy::derive_partial_eq_without_eq)]
738#[derive(Clone, PartialEq, ::prost::Message)]
739pub struct QuerySmartContractStateResponse {
740    /// Data contains the json data returned from the smart contract
741    #[prost(bytes = "vec", tag = "1")]
742    pub data: ::prost::alloc::vec::Vec<u8>,
743}
744/// QueryCodeRequest is the request type for the Query/Code RPC method
745#[allow(clippy::derive_partial_eq_without_eq)]
746#[derive(Clone, PartialEq, ::prost::Message)]
747pub struct QueryCodeRequest {
748    /// grpc-gateway_out does not support Go style CodID
749    #[prost(uint64, tag = "1")]
750    pub code_id: u64,
751}
752/// CodeInfoResponse contains code meta data from CodeInfo
753#[allow(clippy::derive_partial_eq_without_eq)]
754#[derive(Clone, PartialEq, ::prost::Message)]
755pub struct CodeInfoResponse {
756    /// id for legacy support
757    #[prost(uint64, tag = "1")]
758    pub code_id: u64,
759    #[prost(string, tag = "2")]
760    pub creator: ::prost::alloc::string::String,
761    #[prost(bytes = "vec", tag = "3")]
762    pub data_hash: ::prost::alloc::vec::Vec<u8>,
763    #[prost(message, optional, tag = "6")]
764    pub instantiate_permission: ::core::option::Option<AccessConfig>,
765}
766/// QueryCodeResponse is the response type for the Query/Code RPC method
767#[allow(clippy::derive_partial_eq_without_eq)]
768#[derive(Clone, PartialEq, ::prost::Message)]
769pub struct QueryCodeResponse {
770    #[prost(message, optional, tag = "1")]
771    pub code_info: ::core::option::Option<CodeInfoResponse>,
772    #[prost(bytes = "vec", tag = "2")]
773    pub data: ::prost::alloc::vec::Vec<u8>,
774}
775/// QueryCodesRequest is the request type for the Query/Codes RPC method
776#[allow(clippy::derive_partial_eq_without_eq)]
777#[derive(Clone, PartialEq, ::prost::Message)]
778pub struct QueryCodesRequest {
779    /// pagination defines an optional pagination for the request.
780    #[prost(message, optional, tag = "1")]
781    pub pagination:
782        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
783}
784/// QueryCodesResponse is the response type for the Query/Codes RPC method
785#[allow(clippy::derive_partial_eq_without_eq)]
786#[derive(Clone, PartialEq, ::prost::Message)]
787pub struct QueryCodesResponse {
788    #[prost(message, repeated, tag = "1")]
789    pub code_infos: ::prost::alloc::vec::Vec<CodeInfoResponse>,
790    /// pagination defines the pagination in the response.
791    #[prost(message, optional, tag = "2")]
792    pub pagination:
793        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
794}
795/// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes
796/// RPC method
797#[allow(clippy::derive_partial_eq_without_eq)]
798#[derive(Clone, PartialEq, ::prost::Message)]
799pub struct QueryPinnedCodesRequest {
800    /// pagination defines an optional pagination for the request.
801    #[prost(message, optional, tag = "2")]
802    pub pagination:
803        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
804}
805/// QueryPinnedCodesResponse is the response type for the
806/// Query/PinnedCodes RPC method
807#[allow(clippy::derive_partial_eq_without_eq)]
808#[derive(Clone, PartialEq, ::prost::Message)]
809pub struct QueryPinnedCodesResponse {
810    #[prost(uint64, repeated, packed = "false", tag = "1")]
811    pub code_ids: ::prost::alloc::vec::Vec<u64>,
812    /// pagination defines the pagination in the response.
813    #[prost(message, optional, tag = "2")]
814    pub pagination:
815        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
816}
817/// QueryParamsRequest is the request type for the Query/Params RPC method.
818#[allow(clippy::derive_partial_eq_without_eq)]
819#[derive(Clone, PartialEq, ::prost::Message)]
820pub struct QueryParamsRequest {}
821/// QueryParamsResponse is the response type for the Query/Params RPC method.
822#[allow(clippy::derive_partial_eq_without_eq)]
823#[derive(Clone, PartialEq, ::prost::Message)]
824pub struct QueryParamsResponse {
825    /// params defines the parameters of the module.
826    #[prost(message, optional, tag = "1")]
827    pub params: ::core::option::Option<Params>,
828}
829/// QueryContractsByCreatorRequest is the request type for the
830/// Query/ContractsByCreator RPC method.
831#[allow(clippy::derive_partial_eq_without_eq)]
832#[derive(Clone, PartialEq, ::prost::Message)]
833pub struct QueryContractsByCreatorRequest {
834    /// CreatorAddress is the address of contract creator
835    #[prost(string, tag = "1")]
836    pub creator_address: ::prost::alloc::string::String,
837    /// Pagination defines an optional pagination for the request.
838    #[prost(message, optional, tag = "2")]
839    pub pagination:
840        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
841}
842/// QueryContractsByCreatorResponse is the response type for the
843/// Query/ContractsByCreator RPC method.
844#[allow(clippy::derive_partial_eq_without_eq)]
845#[derive(Clone, PartialEq, ::prost::Message)]
846pub struct QueryContractsByCreatorResponse {
847    /// ContractAddresses result set
848    #[prost(string, repeated, tag = "1")]
849    pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
850    /// Pagination defines the pagination in the response.
851    #[prost(message, optional, tag = "2")]
852    pub pagination:
853        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
854}
855/// Generated client implementations.
856#[cfg(feature = "grpc")]
857#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
858pub mod query_client {
859    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
860    use tonic::codegen::http::Uri;
861    use tonic::codegen::*;
862    /// Query provides defines the gRPC querier service
863    #[derive(Debug, Clone)]
864    pub struct QueryClient<T> {
865        inner: tonic::client::Grpc<T>,
866    }
867    #[cfg(feature = "grpc-transport")]
868    #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
869    impl QueryClient<tonic::transport::Channel> {
870        /// Attempt to create a new client by connecting to a given endpoint.
871        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
872        where
873            D: std::convert::TryInto<tonic::transport::Endpoint>,
874            D::Error: Into<StdError>,
875        {
876            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
877            Ok(Self::new(conn))
878        }
879    }
880    impl<T> QueryClient<T>
881    where
882        T: tonic::client::GrpcService<tonic::body::BoxBody>,
883        T::Error: Into<StdError>,
884        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
885        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
886    {
887        pub fn new(inner: T) -> Self {
888            let inner = tonic::client::Grpc::new(inner);
889            Self { inner }
890        }
891        pub fn with_origin(inner: T, origin: Uri) -> Self {
892            let inner = tonic::client::Grpc::with_origin(inner, origin);
893            Self { inner }
894        }
895        pub fn with_interceptor<F>(
896            inner: T,
897            interceptor: F,
898        ) -> QueryClient<InterceptedService<T, F>>
899        where
900            F: tonic::service::Interceptor,
901            T::ResponseBody: Default,
902            T: tonic::codegen::Service<
903                http::Request<tonic::body::BoxBody>,
904                Response = http::Response<
905                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
906                >,
907            >,
908            <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
909                Into<StdError> + Send + Sync,
910        {
911            QueryClient::new(InterceptedService::new(inner, interceptor))
912        }
913        /// Compress requests with the given encoding.
914        ///
915        /// This requires the server to support it otherwise it might respond with an
916        /// error.
917        #[must_use]
918        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
919            self.inner = self.inner.send_compressed(encoding);
920            self
921        }
922        /// Enable decompressing responses.
923        #[must_use]
924        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
925            self.inner = self.inner.accept_compressed(encoding);
926            self
927        }
928        /// ContractInfo gets the contract meta data
929        pub async fn contract_info(
930            &mut self,
931            request: impl tonic::IntoRequest<super::QueryContractInfoRequest>,
932        ) -> Result<tonic::Response<super::QueryContractInfoResponse>, tonic::Status> {
933            self.inner.ready().await.map_err(|e| {
934                tonic::Status::new(
935                    tonic::Code::Unknown,
936                    format!("Service was not ready: {}", e.into()),
937                )
938            })?;
939            let codec = tonic::codec::ProstCodec::default();
940            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractInfo");
941            self.inner.unary(request.into_request(), path, codec).await
942        }
943        /// ContractHistory gets the contract code history
944        pub async fn contract_history(
945            &mut self,
946            request: impl tonic::IntoRequest<super::QueryContractHistoryRequest>,
947        ) -> Result<tonic::Response<super::QueryContractHistoryResponse>, tonic::Status> {
948            self.inner.ready().await.map_err(|e| {
949                tonic::Status::new(
950                    tonic::Code::Unknown,
951                    format!("Service was not ready: {}", e.into()),
952                )
953            })?;
954            let codec = tonic::codec::ProstCodec::default();
955            let path =
956                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractHistory");
957            self.inner.unary(request.into_request(), path, codec).await
958        }
959        /// ContractsByCode lists all smart contracts for a code id
960        pub async fn contracts_by_code(
961            &mut self,
962            request: impl tonic::IntoRequest<super::QueryContractsByCodeRequest>,
963        ) -> Result<tonic::Response<super::QueryContractsByCodeResponse>, tonic::Status> {
964            self.inner.ready().await.map_err(|e| {
965                tonic::Status::new(
966                    tonic::Code::Unknown,
967                    format!("Service was not ready: {}", e.into()),
968                )
969            })?;
970            let codec = tonic::codec::ProstCodec::default();
971            let path =
972                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCode");
973            self.inner.unary(request.into_request(), path, codec).await
974        }
975        /// AllContractState gets all raw store data for a single contract
976        pub async fn all_contract_state(
977            &mut self,
978            request: impl tonic::IntoRequest<super::QueryAllContractStateRequest>,
979        ) -> Result<tonic::Response<super::QueryAllContractStateResponse>, tonic::Status> {
980            self.inner.ready().await.map_err(|e| {
981                tonic::Status::new(
982                    tonic::Code::Unknown,
983                    format!("Service was not ready: {}", e.into()),
984                )
985            })?;
986            let codec = tonic::codec::ProstCodec::default();
987            let path =
988                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/AllContractState");
989            self.inner.unary(request.into_request(), path, codec).await
990        }
991        /// RawContractState gets single key from the raw store data of a contract
992        pub async fn raw_contract_state(
993            &mut self,
994            request: impl tonic::IntoRequest<super::QueryRawContractStateRequest>,
995        ) -> Result<tonic::Response<super::QueryRawContractStateResponse>, tonic::Status> {
996            self.inner.ready().await.map_err(|e| {
997                tonic::Status::new(
998                    tonic::Code::Unknown,
999                    format!("Service was not ready: {}", e.into()),
1000                )
1001            })?;
1002            let codec = tonic::codec::ProstCodec::default();
1003            let path =
1004                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/RawContractState");
1005            self.inner.unary(request.into_request(), path, codec).await
1006        }
1007        /// SmartContractState get smart query result from the contract
1008        pub async fn smart_contract_state(
1009            &mut self,
1010            request: impl tonic::IntoRequest<super::QuerySmartContractStateRequest>,
1011        ) -> Result<tonic::Response<super::QuerySmartContractStateResponse>, tonic::Status>
1012        {
1013            self.inner.ready().await.map_err(|e| {
1014                tonic::Status::new(
1015                    tonic::Code::Unknown,
1016                    format!("Service was not ready: {}", e.into()),
1017                )
1018            })?;
1019            let codec = tonic::codec::ProstCodec::default();
1020            let path =
1021                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/SmartContractState");
1022            self.inner.unary(request.into_request(), path, codec).await
1023        }
1024        /// Code gets the binary code and metadata for a singe wasm code
1025        pub async fn code(
1026            &mut self,
1027            request: impl tonic::IntoRequest<super::QueryCodeRequest>,
1028        ) -> Result<tonic::Response<super::QueryCodeResponse>, tonic::Status> {
1029            self.inner.ready().await.map_err(|e| {
1030                tonic::Status::new(
1031                    tonic::Code::Unknown,
1032                    format!("Service was not ready: {}", e.into()),
1033                )
1034            })?;
1035            let codec = tonic::codec::ProstCodec::default();
1036            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Code");
1037            self.inner.unary(request.into_request(), path, codec).await
1038        }
1039        /// Codes gets the metadata for all stored wasm codes
1040        pub async fn codes(
1041            &mut self,
1042            request: impl tonic::IntoRequest<super::QueryCodesRequest>,
1043        ) -> Result<tonic::Response<super::QueryCodesResponse>, tonic::Status> {
1044            self.inner.ready().await.map_err(|e| {
1045                tonic::Status::new(
1046                    tonic::Code::Unknown,
1047                    format!("Service was not ready: {}", e.into()),
1048                )
1049            })?;
1050            let codec = tonic::codec::ProstCodec::default();
1051            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Codes");
1052            self.inner.unary(request.into_request(), path, codec).await
1053        }
1054        /// PinnedCodes gets the pinned code ids
1055        pub async fn pinned_codes(
1056            &mut self,
1057            request: impl tonic::IntoRequest<super::QueryPinnedCodesRequest>,
1058        ) -> Result<tonic::Response<super::QueryPinnedCodesResponse>, tonic::Status> {
1059            self.inner.ready().await.map_err(|e| {
1060                tonic::Status::new(
1061                    tonic::Code::Unknown,
1062                    format!("Service was not ready: {}", e.into()),
1063                )
1064            })?;
1065            let codec = tonic::codec::ProstCodec::default();
1066            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/PinnedCodes");
1067            self.inner.unary(request.into_request(), path, codec).await
1068        }
1069        /// Params gets the module params
1070        pub async fn params(
1071            &mut self,
1072            request: impl tonic::IntoRequest<super::QueryParamsRequest>,
1073        ) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status> {
1074            self.inner.ready().await.map_err(|e| {
1075                tonic::Status::new(
1076                    tonic::Code::Unknown,
1077                    format!("Service was not ready: {}", e.into()),
1078                )
1079            })?;
1080            let codec = tonic::codec::ProstCodec::default();
1081            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/Params");
1082            self.inner.unary(request.into_request(), path, codec).await
1083        }
1084        /// ContractsByCreator gets the contracts by creator
1085        pub async fn contracts_by_creator(
1086            &mut self,
1087            request: impl tonic::IntoRequest<super::QueryContractsByCreatorRequest>,
1088        ) -> Result<tonic::Response<super::QueryContractsByCreatorResponse>, tonic::Status>
1089        {
1090            self.inner.ready().await.map_err(|e| {
1091                tonic::Status::new(
1092                    tonic::Code::Unknown,
1093                    format!("Service was not ready: {}", e.into()),
1094                )
1095            })?;
1096            let codec = tonic::codec::ProstCodec::default();
1097            let path =
1098                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Query/ContractsByCreator");
1099            self.inner.unary(request.into_request(), path, codec).await
1100        }
1101    }
1102}
1103/// Generated server implementations.
1104#[cfg(feature = "grpc")]
1105#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
1106pub mod query_server {
1107    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1108    use tonic::codegen::*;
1109    /// Generated trait containing gRPC methods that should be implemented for use with QueryServer.
1110    #[async_trait]
1111    pub trait Query: Send + Sync + 'static {
1112        /// ContractInfo gets the contract meta data
1113        async fn contract_info(
1114            &self,
1115            request: tonic::Request<super::QueryContractInfoRequest>,
1116        ) -> Result<tonic::Response<super::QueryContractInfoResponse>, tonic::Status>;
1117        /// ContractHistory gets the contract code history
1118        async fn contract_history(
1119            &self,
1120            request: tonic::Request<super::QueryContractHistoryRequest>,
1121        ) -> Result<tonic::Response<super::QueryContractHistoryResponse>, tonic::Status>;
1122        /// ContractsByCode lists all smart contracts for a code id
1123        async fn contracts_by_code(
1124            &self,
1125            request: tonic::Request<super::QueryContractsByCodeRequest>,
1126        ) -> Result<tonic::Response<super::QueryContractsByCodeResponse>, tonic::Status>;
1127        /// AllContractState gets all raw store data for a single contract
1128        async fn all_contract_state(
1129            &self,
1130            request: tonic::Request<super::QueryAllContractStateRequest>,
1131        ) -> Result<tonic::Response<super::QueryAllContractStateResponse>, tonic::Status>;
1132        /// RawContractState gets single key from the raw store data of a contract
1133        async fn raw_contract_state(
1134            &self,
1135            request: tonic::Request<super::QueryRawContractStateRequest>,
1136        ) -> Result<tonic::Response<super::QueryRawContractStateResponse>, tonic::Status>;
1137        /// SmartContractState get smart query result from the contract
1138        async fn smart_contract_state(
1139            &self,
1140            request: tonic::Request<super::QuerySmartContractStateRequest>,
1141        ) -> Result<tonic::Response<super::QuerySmartContractStateResponse>, tonic::Status>;
1142        /// Code gets the binary code and metadata for a singe wasm code
1143        async fn code(
1144            &self,
1145            request: tonic::Request<super::QueryCodeRequest>,
1146        ) -> Result<tonic::Response<super::QueryCodeResponse>, tonic::Status>;
1147        /// Codes gets the metadata for all stored wasm codes
1148        async fn codes(
1149            &self,
1150            request: tonic::Request<super::QueryCodesRequest>,
1151        ) -> Result<tonic::Response<super::QueryCodesResponse>, tonic::Status>;
1152        /// PinnedCodes gets the pinned code ids
1153        async fn pinned_codes(
1154            &self,
1155            request: tonic::Request<super::QueryPinnedCodesRequest>,
1156        ) -> Result<tonic::Response<super::QueryPinnedCodesResponse>, tonic::Status>;
1157        /// Params gets the module params
1158        async fn params(
1159            &self,
1160            request: tonic::Request<super::QueryParamsRequest>,
1161        ) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status>;
1162        /// ContractsByCreator gets the contracts by creator
1163        async fn contracts_by_creator(
1164            &self,
1165            request: tonic::Request<super::QueryContractsByCreatorRequest>,
1166        ) -> Result<tonic::Response<super::QueryContractsByCreatorResponse>, tonic::Status>;
1167    }
1168    /// Query provides defines the gRPC querier service
1169    #[derive(Debug)]
1170    pub struct QueryServer<T: Query> {
1171        inner: _Inner<T>,
1172        accept_compression_encodings: EnabledCompressionEncodings,
1173        send_compression_encodings: EnabledCompressionEncodings,
1174    }
1175    struct _Inner<T>(Arc<T>);
1176    impl<T: Query> QueryServer<T> {
1177        pub fn new(inner: T) -> Self {
1178            Self::from_arc(Arc::new(inner))
1179        }
1180        pub fn from_arc(inner: Arc<T>) -> Self {
1181            let inner = _Inner(inner);
1182            Self {
1183                inner,
1184                accept_compression_encodings: Default::default(),
1185                send_compression_encodings: Default::default(),
1186            }
1187        }
1188        pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
1189        where
1190            F: tonic::service::Interceptor,
1191        {
1192            InterceptedService::new(Self::new(inner), interceptor)
1193        }
1194        /// Enable decompressing requests with the given encoding.
1195        #[must_use]
1196        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1197            self.accept_compression_encodings.enable(encoding);
1198            self
1199        }
1200        /// Compress responses with the given encoding, if the client supports it.
1201        #[must_use]
1202        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1203            self.send_compression_encodings.enable(encoding);
1204            self
1205        }
1206    }
1207    impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
1208    where
1209        T: Query,
1210        B: Body + Send + 'static,
1211        B::Error: Into<StdError> + Send + 'static,
1212    {
1213        type Response = http::Response<tonic::body::BoxBody>;
1214        type Error = std::convert::Infallible;
1215        type Future = BoxFuture<Self::Response, Self::Error>;
1216        fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
1217            Poll::Ready(Ok(()))
1218        }
1219        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1220            let inner = self.inner.clone();
1221            match req.uri().path() {
1222                "/cosmwasm.wasm.v1.Query/ContractInfo" => {
1223                    #[allow(non_camel_case_types)]
1224                    struct ContractInfoSvc<T: Query>(pub Arc<T>);
1225                    impl<T: Query> tonic::server::UnaryService<super::QueryContractInfoRequest> for ContractInfoSvc<T> {
1226                        type Response = super::QueryContractInfoResponse;
1227                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1228                        fn call(
1229                            &mut self,
1230                            request: tonic::Request<super::QueryContractInfoRequest>,
1231                        ) -> Self::Future {
1232                            let inner = self.0.clone();
1233                            let fut = async move { (*inner).contract_info(request).await };
1234                            Box::pin(fut)
1235                        }
1236                    }
1237                    let accept_compression_encodings = self.accept_compression_encodings;
1238                    let send_compression_encodings = self.send_compression_encodings;
1239                    let inner = self.inner.clone();
1240                    let fut = async move {
1241                        let inner = inner.0;
1242                        let method = ContractInfoSvc(inner);
1243                        let codec = tonic::codec::ProstCodec::default();
1244                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1245                            accept_compression_encodings,
1246                            send_compression_encodings,
1247                        );
1248                        let res = grpc.unary(method, req).await;
1249                        Ok(res)
1250                    };
1251                    Box::pin(fut)
1252                }
1253                "/cosmwasm.wasm.v1.Query/ContractHistory" => {
1254                    #[allow(non_camel_case_types)]
1255                    struct ContractHistorySvc<T: Query>(pub Arc<T>);
1256                    impl<T: Query> tonic::server::UnaryService<super::QueryContractHistoryRequest>
1257                        for ContractHistorySvc<T>
1258                    {
1259                        type Response = super::QueryContractHistoryResponse;
1260                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1261                        fn call(
1262                            &mut self,
1263                            request: tonic::Request<super::QueryContractHistoryRequest>,
1264                        ) -> Self::Future {
1265                            let inner = self.0.clone();
1266                            let fut = async move { (*inner).contract_history(request).await };
1267                            Box::pin(fut)
1268                        }
1269                    }
1270                    let accept_compression_encodings = self.accept_compression_encodings;
1271                    let send_compression_encodings = self.send_compression_encodings;
1272                    let inner = self.inner.clone();
1273                    let fut = async move {
1274                        let inner = inner.0;
1275                        let method = ContractHistorySvc(inner);
1276                        let codec = tonic::codec::ProstCodec::default();
1277                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1278                            accept_compression_encodings,
1279                            send_compression_encodings,
1280                        );
1281                        let res = grpc.unary(method, req).await;
1282                        Ok(res)
1283                    };
1284                    Box::pin(fut)
1285                }
1286                "/cosmwasm.wasm.v1.Query/ContractsByCode" => {
1287                    #[allow(non_camel_case_types)]
1288                    struct ContractsByCodeSvc<T: Query>(pub Arc<T>);
1289                    impl<T: Query> tonic::server::UnaryService<super::QueryContractsByCodeRequest>
1290                        for ContractsByCodeSvc<T>
1291                    {
1292                        type Response = super::QueryContractsByCodeResponse;
1293                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1294                        fn call(
1295                            &mut self,
1296                            request: tonic::Request<super::QueryContractsByCodeRequest>,
1297                        ) -> Self::Future {
1298                            let inner = self.0.clone();
1299                            let fut = async move { (*inner).contracts_by_code(request).await };
1300                            Box::pin(fut)
1301                        }
1302                    }
1303                    let accept_compression_encodings = self.accept_compression_encodings;
1304                    let send_compression_encodings = self.send_compression_encodings;
1305                    let inner = self.inner.clone();
1306                    let fut = async move {
1307                        let inner = inner.0;
1308                        let method = ContractsByCodeSvc(inner);
1309                        let codec = tonic::codec::ProstCodec::default();
1310                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1311                            accept_compression_encodings,
1312                            send_compression_encodings,
1313                        );
1314                        let res = grpc.unary(method, req).await;
1315                        Ok(res)
1316                    };
1317                    Box::pin(fut)
1318                }
1319                "/cosmwasm.wasm.v1.Query/AllContractState" => {
1320                    #[allow(non_camel_case_types)]
1321                    struct AllContractStateSvc<T: Query>(pub Arc<T>);
1322                    impl<T: Query> tonic::server::UnaryService<super::QueryAllContractStateRequest>
1323                        for AllContractStateSvc<T>
1324                    {
1325                        type Response = super::QueryAllContractStateResponse;
1326                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1327                        fn call(
1328                            &mut self,
1329                            request: tonic::Request<super::QueryAllContractStateRequest>,
1330                        ) -> Self::Future {
1331                            let inner = self.0.clone();
1332                            let fut = async move { (*inner).all_contract_state(request).await };
1333                            Box::pin(fut)
1334                        }
1335                    }
1336                    let accept_compression_encodings = self.accept_compression_encodings;
1337                    let send_compression_encodings = self.send_compression_encodings;
1338                    let inner = self.inner.clone();
1339                    let fut = async move {
1340                        let inner = inner.0;
1341                        let method = AllContractStateSvc(inner);
1342                        let codec = tonic::codec::ProstCodec::default();
1343                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1344                            accept_compression_encodings,
1345                            send_compression_encodings,
1346                        );
1347                        let res = grpc.unary(method, req).await;
1348                        Ok(res)
1349                    };
1350                    Box::pin(fut)
1351                }
1352                "/cosmwasm.wasm.v1.Query/RawContractState" => {
1353                    #[allow(non_camel_case_types)]
1354                    struct RawContractStateSvc<T: Query>(pub Arc<T>);
1355                    impl<T: Query> tonic::server::UnaryService<super::QueryRawContractStateRequest>
1356                        for RawContractStateSvc<T>
1357                    {
1358                        type Response = super::QueryRawContractStateResponse;
1359                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1360                        fn call(
1361                            &mut self,
1362                            request: tonic::Request<super::QueryRawContractStateRequest>,
1363                        ) -> Self::Future {
1364                            let inner = self.0.clone();
1365                            let fut = async move { (*inner).raw_contract_state(request).await };
1366                            Box::pin(fut)
1367                        }
1368                    }
1369                    let accept_compression_encodings = self.accept_compression_encodings;
1370                    let send_compression_encodings = self.send_compression_encodings;
1371                    let inner = self.inner.clone();
1372                    let fut = async move {
1373                        let inner = inner.0;
1374                        let method = RawContractStateSvc(inner);
1375                        let codec = tonic::codec::ProstCodec::default();
1376                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1377                            accept_compression_encodings,
1378                            send_compression_encodings,
1379                        );
1380                        let res = grpc.unary(method, req).await;
1381                        Ok(res)
1382                    };
1383                    Box::pin(fut)
1384                }
1385                "/cosmwasm.wasm.v1.Query/SmartContractState" => {
1386                    #[allow(non_camel_case_types)]
1387                    struct SmartContractStateSvc<T: Query>(pub Arc<T>);
1388                    impl<T: Query>
1389                        tonic::server::UnaryService<super::QuerySmartContractStateRequest>
1390                        for SmartContractStateSvc<T>
1391                    {
1392                        type Response = super::QuerySmartContractStateResponse;
1393                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1394                        fn call(
1395                            &mut self,
1396                            request: tonic::Request<super::QuerySmartContractStateRequest>,
1397                        ) -> Self::Future {
1398                            let inner = self.0.clone();
1399                            let fut = async move { (*inner).smart_contract_state(request).await };
1400                            Box::pin(fut)
1401                        }
1402                    }
1403                    let accept_compression_encodings = self.accept_compression_encodings;
1404                    let send_compression_encodings = self.send_compression_encodings;
1405                    let inner = self.inner.clone();
1406                    let fut = async move {
1407                        let inner = inner.0;
1408                        let method = SmartContractStateSvc(inner);
1409                        let codec = tonic::codec::ProstCodec::default();
1410                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1411                            accept_compression_encodings,
1412                            send_compression_encodings,
1413                        );
1414                        let res = grpc.unary(method, req).await;
1415                        Ok(res)
1416                    };
1417                    Box::pin(fut)
1418                }
1419                "/cosmwasm.wasm.v1.Query/Code" => {
1420                    #[allow(non_camel_case_types)]
1421                    struct CodeSvc<T: Query>(pub Arc<T>);
1422                    impl<T: Query> tonic::server::UnaryService<super::QueryCodeRequest> for CodeSvc<T> {
1423                        type Response = super::QueryCodeResponse;
1424                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1425                        fn call(
1426                            &mut self,
1427                            request: tonic::Request<super::QueryCodeRequest>,
1428                        ) -> Self::Future {
1429                            let inner = self.0.clone();
1430                            let fut = async move { (*inner).code(request).await };
1431                            Box::pin(fut)
1432                        }
1433                    }
1434                    let accept_compression_encodings = self.accept_compression_encodings;
1435                    let send_compression_encodings = self.send_compression_encodings;
1436                    let inner = self.inner.clone();
1437                    let fut = async move {
1438                        let inner = inner.0;
1439                        let method = CodeSvc(inner);
1440                        let codec = tonic::codec::ProstCodec::default();
1441                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1442                            accept_compression_encodings,
1443                            send_compression_encodings,
1444                        );
1445                        let res = grpc.unary(method, req).await;
1446                        Ok(res)
1447                    };
1448                    Box::pin(fut)
1449                }
1450                "/cosmwasm.wasm.v1.Query/Codes" => {
1451                    #[allow(non_camel_case_types)]
1452                    struct CodesSvc<T: Query>(pub Arc<T>);
1453                    impl<T: Query> tonic::server::UnaryService<super::QueryCodesRequest> for CodesSvc<T> {
1454                        type Response = super::QueryCodesResponse;
1455                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1456                        fn call(
1457                            &mut self,
1458                            request: tonic::Request<super::QueryCodesRequest>,
1459                        ) -> Self::Future {
1460                            let inner = self.0.clone();
1461                            let fut = async move { (*inner).codes(request).await };
1462                            Box::pin(fut)
1463                        }
1464                    }
1465                    let accept_compression_encodings = self.accept_compression_encodings;
1466                    let send_compression_encodings = self.send_compression_encodings;
1467                    let inner = self.inner.clone();
1468                    let fut = async move {
1469                        let inner = inner.0;
1470                        let method = CodesSvc(inner);
1471                        let codec = tonic::codec::ProstCodec::default();
1472                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1473                            accept_compression_encodings,
1474                            send_compression_encodings,
1475                        );
1476                        let res = grpc.unary(method, req).await;
1477                        Ok(res)
1478                    };
1479                    Box::pin(fut)
1480                }
1481                "/cosmwasm.wasm.v1.Query/PinnedCodes" => {
1482                    #[allow(non_camel_case_types)]
1483                    struct PinnedCodesSvc<T: Query>(pub Arc<T>);
1484                    impl<T: Query> tonic::server::UnaryService<super::QueryPinnedCodesRequest> for PinnedCodesSvc<T> {
1485                        type Response = super::QueryPinnedCodesResponse;
1486                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1487                        fn call(
1488                            &mut self,
1489                            request: tonic::Request<super::QueryPinnedCodesRequest>,
1490                        ) -> Self::Future {
1491                            let inner = self.0.clone();
1492                            let fut = async move { (*inner).pinned_codes(request).await };
1493                            Box::pin(fut)
1494                        }
1495                    }
1496                    let accept_compression_encodings = self.accept_compression_encodings;
1497                    let send_compression_encodings = self.send_compression_encodings;
1498                    let inner = self.inner.clone();
1499                    let fut = async move {
1500                        let inner = inner.0;
1501                        let method = PinnedCodesSvc(inner);
1502                        let codec = tonic::codec::ProstCodec::default();
1503                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1504                            accept_compression_encodings,
1505                            send_compression_encodings,
1506                        );
1507                        let res = grpc.unary(method, req).await;
1508                        Ok(res)
1509                    };
1510                    Box::pin(fut)
1511                }
1512                "/cosmwasm.wasm.v1.Query/Params" => {
1513                    #[allow(non_camel_case_types)]
1514                    struct ParamsSvc<T: Query>(pub Arc<T>);
1515                    impl<T: Query> tonic::server::UnaryService<super::QueryParamsRequest> for ParamsSvc<T> {
1516                        type Response = super::QueryParamsResponse;
1517                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1518                        fn call(
1519                            &mut self,
1520                            request: tonic::Request<super::QueryParamsRequest>,
1521                        ) -> Self::Future {
1522                            let inner = self.0.clone();
1523                            let fut = async move { (*inner).params(request).await };
1524                            Box::pin(fut)
1525                        }
1526                    }
1527                    let accept_compression_encodings = self.accept_compression_encodings;
1528                    let send_compression_encodings = self.send_compression_encodings;
1529                    let inner = self.inner.clone();
1530                    let fut = async move {
1531                        let inner = inner.0;
1532                        let method = ParamsSvc(inner);
1533                        let codec = tonic::codec::ProstCodec::default();
1534                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1535                            accept_compression_encodings,
1536                            send_compression_encodings,
1537                        );
1538                        let res = grpc.unary(method, req).await;
1539                        Ok(res)
1540                    };
1541                    Box::pin(fut)
1542                }
1543                "/cosmwasm.wasm.v1.Query/ContractsByCreator" => {
1544                    #[allow(non_camel_case_types)]
1545                    struct ContractsByCreatorSvc<T: Query>(pub Arc<T>);
1546                    impl<T: Query>
1547                        tonic::server::UnaryService<super::QueryContractsByCreatorRequest>
1548                        for ContractsByCreatorSvc<T>
1549                    {
1550                        type Response = super::QueryContractsByCreatorResponse;
1551                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
1552                        fn call(
1553                            &mut self,
1554                            request: tonic::Request<super::QueryContractsByCreatorRequest>,
1555                        ) -> Self::Future {
1556                            let inner = self.0.clone();
1557                            let fut = async move { (*inner).contracts_by_creator(request).await };
1558                            Box::pin(fut)
1559                        }
1560                    }
1561                    let accept_compression_encodings = self.accept_compression_encodings;
1562                    let send_compression_encodings = self.send_compression_encodings;
1563                    let inner = self.inner.clone();
1564                    let fut = async move {
1565                        let inner = inner.0;
1566                        let method = ContractsByCreatorSvc(inner);
1567                        let codec = tonic::codec::ProstCodec::default();
1568                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
1569                            accept_compression_encodings,
1570                            send_compression_encodings,
1571                        );
1572                        let res = grpc.unary(method, req).await;
1573                        Ok(res)
1574                    };
1575                    Box::pin(fut)
1576                }
1577                _ => Box::pin(async move {
1578                    Ok(http::Response::builder()
1579                        .status(200)
1580                        .header("grpc-status", "12")
1581                        .header("content-type", "application/grpc")
1582                        .body(empty_body())
1583                        .unwrap())
1584                }),
1585            }
1586        }
1587    }
1588    impl<T: Query> Clone for QueryServer<T> {
1589        fn clone(&self) -> Self {
1590            let inner = self.inner.clone();
1591            Self {
1592                inner,
1593                accept_compression_encodings: self.accept_compression_encodings,
1594                send_compression_encodings: self.send_compression_encodings,
1595            }
1596        }
1597    }
1598    impl<T: Query> Clone for _Inner<T> {
1599        fn clone(&self) -> Self {
1600            Self(self.0.clone())
1601        }
1602    }
1603    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
1604        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1605            write!(f, "{:?}", self.0)
1606        }
1607    }
1608    impl<T: Query> tonic::server::NamedService for QueryServer<T> {
1609        const NAME: &'static str = "cosmwasm.wasm.v1.Query";
1610    }
1611}
1612/// MsgStoreCode submit Wasm code to the system
1613#[allow(clippy::derive_partial_eq_without_eq)]
1614#[derive(Clone, PartialEq, ::prost::Message)]
1615pub struct MsgStoreCode {
1616    /// Sender is the actor that signed the messages
1617    #[prost(string, tag = "1")]
1618    pub sender: ::prost::alloc::string::String,
1619    /// WASMByteCode can be raw or gzip compressed
1620    #[prost(bytes = "vec", tag = "2")]
1621    pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
1622    /// InstantiatePermission access control to apply on contract creation,
1623    /// optional
1624    #[prost(message, optional, tag = "5")]
1625    pub instantiate_permission: ::core::option::Option<AccessConfig>,
1626}
1627/// MsgStoreCodeResponse returns store result data.
1628#[allow(clippy::derive_partial_eq_without_eq)]
1629#[derive(Clone, PartialEq, ::prost::Message)]
1630pub struct MsgStoreCodeResponse {
1631    /// CodeID is the reference to the stored WASM code
1632    #[prost(uint64, tag = "1")]
1633    pub code_id: u64,
1634    /// Checksum is the sha256 hash of the stored code
1635    #[prost(bytes = "vec", tag = "2")]
1636    pub checksum: ::prost::alloc::vec::Vec<u8>,
1637}
1638/// MsgInstantiateContract create a new smart contract instance for the given
1639/// code id.
1640#[allow(clippy::derive_partial_eq_without_eq)]
1641#[derive(Clone, PartialEq, ::prost::Message)]
1642pub struct MsgInstantiateContract {
1643    /// Sender is the that actor that signed the messages
1644    #[prost(string, tag = "1")]
1645    pub sender: ::prost::alloc::string::String,
1646    /// Admin is an optional address that can execute migrations
1647    #[prost(string, tag = "2")]
1648    pub admin: ::prost::alloc::string::String,
1649    /// CodeID is the reference to the stored WASM code
1650    #[prost(uint64, tag = "3")]
1651    pub code_id: u64,
1652    /// Label is optional metadata to be stored with a contract instance.
1653    #[prost(string, tag = "4")]
1654    pub label: ::prost::alloc::string::String,
1655    /// Msg json encoded message to be passed to the contract on instantiation
1656    #[prost(bytes = "vec", tag = "5")]
1657    pub msg: ::prost::alloc::vec::Vec<u8>,
1658    /// Funds coins that are transferred to the contract on instantiation
1659    #[prost(message, repeated, tag = "6")]
1660    pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
1661}
1662/// MsgInstantiateContractResponse return instantiation result data
1663#[allow(clippy::derive_partial_eq_without_eq)]
1664#[derive(Clone, PartialEq, ::prost::Message)]
1665pub struct MsgInstantiateContractResponse {
1666    /// Address is the bech32 address of the new contract instance.
1667    #[prost(string, tag = "1")]
1668    pub address: ::prost::alloc::string::String,
1669    /// Data contains bytes to returned from the contract
1670    #[prost(bytes = "vec", tag = "2")]
1671    pub data: ::prost::alloc::vec::Vec<u8>,
1672}
1673/// MsgInstantiateContract2 create a new smart contract instance for the given
1674/// code id with a predicable address.
1675#[allow(clippy::derive_partial_eq_without_eq)]
1676#[derive(Clone, PartialEq, ::prost::Message)]
1677pub struct MsgInstantiateContract2 {
1678    /// Sender is the that actor that signed the messages
1679    #[prost(string, tag = "1")]
1680    pub sender: ::prost::alloc::string::String,
1681    /// Admin is an optional address that can execute migrations
1682    #[prost(string, tag = "2")]
1683    pub admin: ::prost::alloc::string::String,
1684    /// CodeID is the reference to the stored WASM code
1685    #[prost(uint64, tag = "3")]
1686    pub code_id: u64,
1687    /// Label is optional metadata to be stored with a contract instance.
1688    #[prost(string, tag = "4")]
1689    pub label: ::prost::alloc::string::String,
1690    /// Msg json encoded message to be passed to the contract on instantiation
1691    #[prost(bytes = "vec", tag = "5")]
1692    pub msg: ::prost::alloc::vec::Vec<u8>,
1693    /// Funds coins that are transferred to the contract on instantiation
1694    #[prost(message, repeated, tag = "6")]
1695    pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
1696    /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64.
1697    #[prost(bytes = "vec", tag = "7")]
1698    pub salt: ::prost::alloc::vec::Vec<u8>,
1699    /// FixMsg include the msg value into the hash for the predictable address.
1700    /// Default is false
1701    #[prost(bool, tag = "8")]
1702    pub fix_msg: bool,
1703}
1704/// MsgInstantiateContract2Response return instantiation result data
1705#[allow(clippy::derive_partial_eq_without_eq)]
1706#[derive(Clone, PartialEq, ::prost::Message)]
1707pub struct MsgInstantiateContract2Response {
1708    /// Address is the bech32 address of the new contract instance.
1709    #[prost(string, tag = "1")]
1710    pub address: ::prost::alloc::string::String,
1711    /// Data contains bytes to returned from the contract
1712    #[prost(bytes = "vec", tag = "2")]
1713    pub data: ::prost::alloc::vec::Vec<u8>,
1714}
1715/// MsgExecuteContract submits the given message data to a smart contract
1716#[allow(clippy::derive_partial_eq_without_eq)]
1717#[derive(Clone, PartialEq, ::prost::Message)]
1718pub struct MsgExecuteContract {
1719    /// Sender is the that actor that signed the messages
1720    #[prost(string, tag = "1")]
1721    pub sender: ::prost::alloc::string::String,
1722    /// Contract is the address of the smart contract
1723    #[prost(string, tag = "2")]
1724    pub contract: ::prost::alloc::string::String,
1725    /// Msg json encoded message to be passed to the contract
1726    #[prost(bytes = "vec", tag = "3")]
1727    pub msg: ::prost::alloc::vec::Vec<u8>,
1728    /// Funds coins that are transferred to the contract on execution
1729    #[prost(message, repeated, tag = "5")]
1730    pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
1731}
1732/// MsgExecuteContractResponse returns execution result data.
1733#[allow(clippy::derive_partial_eq_without_eq)]
1734#[derive(Clone, PartialEq, ::prost::Message)]
1735pub struct MsgExecuteContractResponse {
1736    /// Data contains bytes to returned from the contract
1737    #[prost(bytes = "vec", tag = "1")]
1738    pub data: ::prost::alloc::vec::Vec<u8>,
1739}
1740/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract
1741#[allow(clippy::derive_partial_eq_without_eq)]
1742#[derive(Clone, PartialEq, ::prost::Message)]
1743pub struct MsgMigrateContract {
1744    /// Sender is the that actor that signed the messages
1745    #[prost(string, tag = "1")]
1746    pub sender: ::prost::alloc::string::String,
1747    /// Contract is the address of the smart contract
1748    #[prost(string, tag = "2")]
1749    pub contract: ::prost::alloc::string::String,
1750    /// CodeID references the new WASM code
1751    #[prost(uint64, tag = "3")]
1752    pub code_id: u64,
1753    /// Msg json encoded message to be passed to the contract on migration
1754    #[prost(bytes = "vec", tag = "4")]
1755    pub msg: ::prost::alloc::vec::Vec<u8>,
1756}
1757/// MsgMigrateContractResponse returns contract migration result data.
1758#[allow(clippy::derive_partial_eq_without_eq)]
1759#[derive(Clone, PartialEq, ::prost::Message)]
1760pub struct MsgMigrateContractResponse {
1761    /// Data contains same raw bytes returned as data from the wasm contract.
1762    /// (May be empty)
1763    #[prost(bytes = "vec", tag = "1")]
1764    pub data: ::prost::alloc::vec::Vec<u8>,
1765}
1766/// MsgUpdateAdmin sets a new admin for a smart contract
1767#[allow(clippy::derive_partial_eq_without_eq)]
1768#[derive(Clone, PartialEq, ::prost::Message)]
1769pub struct MsgUpdateAdmin {
1770    /// Sender is the that actor that signed the messages
1771    #[prost(string, tag = "1")]
1772    pub sender: ::prost::alloc::string::String,
1773    /// NewAdmin address to be set
1774    #[prost(string, tag = "2")]
1775    pub new_admin: ::prost::alloc::string::String,
1776    /// Contract is the address of the smart contract
1777    #[prost(string, tag = "3")]
1778    pub contract: ::prost::alloc::string::String,
1779}
1780/// MsgUpdateAdminResponse returns empty data
1781#[allow(clippy::derive_partial_eq_without_eq)]
1782#[derive(Clone, PartialEq, ::prost::Message)]
1783pub struct MsgUpdateAdminResponse {}
1784/// MsgClearAdmin removes any admin stored for a smart contract
1785#[allow(clippy::derive_partial_eq_without_eq)]
1786#[derive(Clone, PartialEq, ::prost::Message)]
1787pub struct MsgClearAdmin {
1788    /// Sender is the actor that signed the messages
1789    #[prost(string, tag = "1")]
1790    pub sender: ::prost::alloc::string::String,
1791    /// Contract is the address of the smart contract
1792    #[prost(string, tag = "3")]
1793    pub contract: ::prost::alloc::string::String,
1794}
1795/// MsgClearAdminResponse returns empty data
1796#[allow(clippy::derive_partial_eq_without_eq)]
1797#[derive(Clone, PartialEq, ::prost::Message)]
1798pub struct MsgClearAdminResponse {}
1799/// MsgUpdateInstantiateConfig updates instantiate config for a smart contract
1800#[allow(clippy::derive_partial_eq_without_eq)]
1801#[derive(Clone, PartialEq, ::prost::Message)]
1802pub struct MsgUpdateInstantiateConfig {
1803    /// Sender is the that actor that signed the messages
1804    #[prost(string, tag = "1")]
1805    pub sender: ::prost::alloc::string::String,
1806    /// CodeID references the stored WASM code
1807    #[prost(uint64, tag = "2")]
1808    pub code_id: u64,
1809    /// NewInstantiatePermission is the new access control
1810    #[prost(message, optional, tag = "3")]
1811    pub new_instantiate_permission: ::core::option::Option<AccessConfig>,
1812}
1813/// MsgUpdateInstantiateConfigResponse returns empty data
1814#[allow(clippy::derive_partial_eq_without_eq)]
1815#[derive(Clone, PartialEq, ::prost::Message)]
1816pub struct MsgUpdateInstantiateConfigResponse {}
1817/// MsgUpdateParams is the MsgUpdateParams request type.
1818///
1819/// Since: 0.40
1820#[allow(clippy::derive_partial_eq_without_eq)]
1821#[derive(Clone, PartialEq, ::prost::Message)]
1822pub struct MsgUpdateParams {
1823    /// Authority is the address of the governance account.
1824    #[prost(string, tag = "1")]
1825    pub authority: ::prost::alloc::string::String,
1826    /// params defines the x/wasm parameters to update.
1827    ///
1828    /// NOTE: All parameters must be supplied.
1829    #[prost(message, optional, tag = "2")]
1830    pub params: ::core::option::Option<Params>,
1831}
1832/// MsgUpdateParamsResponse defines the response structure for executing a
1833/// MsgUpdateParams message.
1834///
1835/// Since: 0.40
1836#[allow(clippy::derive_partial_eq_without_eq)]
1837#[derive(Clone, PartialEq, ::prost::Message)]
1838pub struct MsgUpdateParamsResponse {}
1839/// MsgSudoContract is the MsgSudoContract request type.
1840///
1841/// Since: 0.40
1842#[allow(clippy::derive_partial_eq_without_eq)]
1843#[derive(Clone, PartialEq, ::prost::Message)]
1844pub struct MsgSudoContract {
1845    /// Authority is the address of the governance account.
1846    #[prost(string, tag = "1")]
1847    pub authority: ::prost::alloc::string::String,
1848    /// Contract is the address of the smart contract
1849    #[prost(string, tag = "2")]
1850    pub contract: ::prost::alloc::string::String,
1851    /// Msg json encoded message to be passed to the contract as sudo
1852    #[prost(bytes = "vec", tag = "3")]
1853    pub msg: ::prost::alloc::vec::Vec<u8>,
1854}
1855/// MsgSudoContractResponse defines the response structure for executing a
1856/// MsgSudoContract message.
1857///
1858/// Since: 0.40
1859#[allow(clippy::derive_partial_eq_without_eq)]
1860#[derive(Clone, PartialEq, ::prost::Message)]
1861pub struct MsgSudoContractResponse {
1862    /// Data contains bytes to returned from the contract
1863    #[prost(bytes = "vec", tag = "1")]
1864    pub data: ::prost::alloc::vec::Vec<u8>,
1865}
1866/// MsgPinCodes is the MsgPinCodes request type.
1867///
1868/// Since: 0.40
1869#[allow(clippy::derive_partial_eq_without_eq)]
1870#[derive(Clone, PartialEq, ::prost::Message)]
1871pub struct MsgPinCodes {
1872    /// Authority is the address of the governance account.
1873    #[prost(string, tag = "1")]
1874    pub authority: ::prost::alloc::string::String,
1875    /// CodeIDs references the new WASM codes
1876    #[prost(uint64, repeated, packed = "false", tag = "2")]
1877    pub code_ids: ::prost::alloc::vec::Vec<u64>,
1878}
1879/// MsgPinCodesResponse defines the response structure for executing a
1880/// MsgPinCodes message.
1881///
1882/// Since: 0.40
1883#[allow(clippy::derive_partial_eq_without_eq)]
1884#[derive(Clone, PartialEq, ::prost::Message)]
1885pub struct MsgPinCodesResponse {}
1886/// MsgUnpinCodes is the MsgUnpinCodes request type.
1887///
1888/// Since: 0.40
1889#[allow(clippy::derive_partial_eq_without_eq)]
1890#[derive(Clone, PartialEq, ::prost::Message)]
1891pub struct MsgUnpinCodes {
1892    /// Authority is the address of the governance account.
1893    #[prost(string, tag = "1")]
1894    pub authority: ::prost::alloc::string::String,
1895    /// CodeIDs references the WASM codes
1896    #[prost(uint64, repeated, packed = "false", tag = "2")]
1897    pub code_ids: ::prost::alloc::vec::Vec<u64>,
1898}
1899/// MsgUnpinCodesResponse defines the response structure for executing a
1900/// MsgUnpinCodes message.
1901///
1902/// Since: 0.40
1903#[allow(clippy::derive_partial_eq_without_eq)]
1904#[derive(Clone, PartialEq, ::prost::Message)]
1905pub struct MsgUnpinCodesResponse {}
1906/// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract
1907/// request type.
1908///
1909/// Since: 0.40
1910#[allow(clippy::derive_partial_eq_without_eq)]
1911#[derive(Clone, PartialEq, ::prost::Message)]
1912pub struct MsgStoreAndInstantiateContract {
1913    /// Authority is the address of the governance account.
1914    #[prost(string, tag = "1")]
1915    pub authority: ::prost::alloc::string::String,
1916    /// WASMByteCode can be raw or gzip compressed
1917    #[prost(bytes = "vec", tag = "3")]
1918    pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
1919    /// InstantiatePermission to apply on contract creation, optional
1920    #[prost(message, optional, tag = "4")]
1921    pub instantiate_permission: ::core::option::Option<AccessConfig>,
1922    /// UnpinCode code on upload, optional. As default the uploaded contract is
1923    /// pinned to cache.
1924    #[prost(bool, tag = "5")]
1925    pub unpin_code: bool,
1926    /// Admin is an optional address that can execute migrations
1927    #[prost(string, tag = "6")]
1928    pub admin: ::prost::alloc::string::String,
1929    /// Label is optional metadata to be stored with a constract instance.
1930    #[prost(string, tag = "7")]
1931    pub label: ::prost::alloc::string::String,
1932    /// Msg json encoded message to be passed to the contract on instantiation
1933    #[prost(bytes = "vec", tag = "8")]
1934    pub msg: ::prost::alloc::vec::Vec<u8>,
1935    /// Funds coins that are transferred from the authority account to the contract
1936    /// on instantiation
1937    #[prost(message, repeated, tag = "9")]
1938    pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
1939    /// Source is the URL where the code is hosted
1940    #[prost(string, tag = "10")]
1941    pub source: ::prost::alloc::string::String,
1942    /// Builder is the docker image used to build the code deterministically, used
1943    /// for smart contract verification
1944    #[prost(string, tag = "11")]
1945    pub builder: ::prost::alloc::string::String,
1946    /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart
1947    /// contract verification
1948    #[prost(bytes = "vec", tag = "12")]
1949    pub code_hash: ::prost::alloc::vec::Vec<u8>,
1950}
1951/// MsgStoreAndInstantiateContractResponse defines the response structure
1952/// for executing a MsgStoreAndInstantiateContract message.
1953///
1954/// Since: 0.40
1955#[allow(clippy::derive_partial_eq_without_eq)]
1956#[derive(Clone, PartialEq, ::prost::Message)]
1957pub struct MsgStoreAndInstantiateContractResponse {
1958    /// Address is the bech32 address of the new contract instance.
1959    #[prost(string, tag = "1")]
1960    pub address: ::prost::alloc::string::String,
1961    /// Data contains bytes to returned from the contract
1962    #[prost(bytes = "vec", tag = "2")]
1963    pub data: ::prost::alloc::vec::Vec<u8>,
1964}
1965/// Generated client implementations.
1966#[cfg(feature = "grpc")]
1967#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
1968pub mod msg_client {
1969    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1970    use tonic::codegen::http::Uri;
1971    use tonic::codegen::*;
1972    /// Msg defines the wasm Msg service.
1973    #[derive(Debug, Clone)]
1974    pub struct MsgClient<T> {
1975        inner: tonic::client::Grpc<T>,
1976    }
1977    #[cfg(feature = "grpc-transport")]
1978    #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
1979    impl MsgClient<tonic::transport::Channel> {
1980        /// Attempt to create a new client by connecting to a given endpoint.
1981        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1982        where
1983            D: std::convert::TryInto<tonic::transport::Endpoint>,
1984            D::Error: Into<StdError>,
1985        {
1986            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1987            Ok(Self::new(conn))
1988        }
1989    }
1990    impl<T> MsgClient<T>
1991    where
1992        T: tonic::client::GrpcService<tonic::body::BoxBody>,
1993        T::Error: Into<StdError>,
1994        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1995        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1996    {
1997        pub fn new(inner: T) -> Self {
1998            let inner = tonic::client::Grpc::new(inner);
1999            Self { inner }
2000        }
2001        pub fn with_origin(inner: T, origin: Uri) -> Self {
2002            let inner = tonic::client::Grpc::with_origin(inner, origin);
2003            Self { inner }
2004        }
2005        pub fn with_interceptor<F>(inner: T, interceptor: F) -> MsgClient<InterceptedService<T, F>>
2006        where
2007            F: tonic::service::Interceptor,
2008            T::ResponseBody: Default,
2009            T: tonic::codegen::Service<
2010                http::Request<tonic::body::BoxBody>,
2011                Response = http::Response<
2012                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2013                >,
2014            >,
2015            <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
2016                Into<StdError> + Send + Sync,
2017        {
2018            MsgClient::new(InterceptedService::new(inner, interceptor))
2019        }
2020        /// Compress requests with the given encoding.
2021        ///
2022        /// This requires the server to support it otherwise it might respond with an
2023        /// error.
2024        #[must_use]
2025        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2026            self.inner = self.inner.send_compressed(encoding);
2027            self
2028        }
2029        /// Enable decompressing responses.
2030        #[must_use]
2031        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2032            self.inner = self.inner.accept_compressed(encoding);
2033            self
2034        }
2035        /// StoreCode to submit Wasm code to the system
2036        pub async fn store_code(
2037            &mut self,
2038            request: impl tonic::IntoRequest<super::MsgStoreCode>,
2039        ) -> Result<tonic::Response<super::MsgStoreCodeResponse>, tonic::Status> {
2040            self.inner.ready().await.map_err(|e| {
2041                tonic::Status::new(
2042                    tonic::Code::Unknown,
2043                    format!("Service was not ready: {}", e.into()),
2044                )
2045            })?;
2046            let codec = tonic::codec::ProstCodec::default();
2047            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/StoreCode");
2048            self.inner.unary(request.into_request(), path, codec).await
2049        }
2050        ///  InstantiateContract creates a new smart contract instance for the given
2051        ///  code id.
2052        pub async fn instantiate_contract(
2053            &mut self,
2054            request: impl tonic::IntoRequest<super::MsgInstantiateContract>,
2055        ) -> Result<tonic::Response<super::MsgInstantiateContractResponse>, tonic::Status> {
2056            self.inner.ready().await.map_err(|e| {
2057                tonic::Status::new(
2058                    tonic::Code::Unknown,
2059                    format!("Service was not ready: {}", e.into()),
2060                )
2061            })?;
2062            let codec = tonic::codec::ProstCodec::default();
2063            let path =
2064                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract");
2065            self.inner.unary(request.into_request(), path, codec).await
2066        }
2067        ///  InstantiateContract2 creates a new smart contract instance for the given
2068        ///  code id with a predictable address
2069        pub async fn instantiate_contract2(
2070            &mut self,
2071            request: impl tonic::IntoRequest<super::MsgInstantiateContract2>,
2072        ) -> Result<tonic::Response<super::MsgInstantiateContract2Response>, tonic::Status>
2073        {
2074            self.inner.ready().await.map_err(|e| {
2075                tonic::Status::new(
2076                    tonic::Code::Unknown,
2077                    format!("Service was not ready: {}", e.into()),
2078                )
2079            })?;
2080            let codec = tonic::codec::ProstCodec::default();
2081            let path =
2082                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/InstantiateContract2");
2083            self.inner.unary(request.into_request(), path, codec).await
2084        }
2085        /// Execute submits the given message data to a smart contract
2086        pub async fn execute_contract(
2087            &mut self,
2088            request: impl tonic::IntoRequest<super::MsgExecuteContract>,
2089        ) -> Result<tonic::Response<super::MsgExecuteContractResponse>, tonic::Status> {
2090            self.inner.ready().await.map_err(|e| {
2091                tonic::Status::new(
2092                    tonic::Code::Unknown,
2093                    format!("Service was not ready: {}", e.into()),
2094                )
2095            })?;
2096            let codec = tonic::codec::ProstCodec::default();
2097            let path =
2098                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ExecuteContract");
2099            self.inner.unary(request.into_request(), path, codec).await
2100        }
2101        /// Migrate runs a code upgrade/ downgrade for a smart contract
2102        pub async fn migrate_contract(
2103            &mut self,
2104            request: impl tonic::IntoRequest<super::MsgMigrateContract>,
2105        ) -> Result<tonic::Response<super::MsgMigrateContractResponse>, tonic::Status> {
2106            self.inner.ready().await.map_err(|e| {
2107                tonic::Status::new(
2108                    tonic::Code::Unknown,
2109                    format!("Service was not ready: {}", e.into()),
2110                )
2111            })?;
2112            let codec = tonic::codec::ProstCodec::default();
2113            let path =
2114                http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/MigrateContract");
2115            self.inner.unary(request.into_request(), path, codec).await
2116        }
2117        /// UpdateAdmin sets a new   admin for a smart contract
2118        pub async fn update_admin(
2119            &mut self,
2120            request: impl tonic::IntoRequest<super::MsgUpdateAdmin>,
2121        ) -> Result<tonic::Response<super::MsgUpdateAdminResponse>, tonic::Status> {
2122            self.inner.ready().await.map_err(|e| {
2123                tonic::Status::new(
2124                    tonic::Code::Unknown,
2125                    format!("Service was not ready: {}", e.into()),
2126                )
2127            })?;
2128            let codec = tonic::codec::ProstCodec::default();
2129            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateAdmin");
2130            self.inner.unary(request.into_request(), path, codec).await
2131        }
2132        /// ClearAdmin removes any admin stored for a smart contract
2133        pub async fn clear_admin(
2134            &mut self,
2135            request: impl tonic::IntoRequest<super::MsgClearAdmin>,
2136        ) -> Result<tonic::Response<super::MsgClearAdminResponse>, tonic::Status> {
2137            self.inner.ready().await.map_err(|e| {
2138                tonic::Status::new(
2139                    tonic::Code::Unknown,
2140                    format!("Service was not ready: {}", e.into()),
2141                )
2142            })?;
2143            let codec = tonic::codec::ProstCodec::default();
2144            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/ClearAdmin");
2145            self.inner.unary(request.into_request(), path, codec).await
2146        }
2147        /// UpdateInstantiateConfig updates instantiate config for a smart contract
2148        pub async fn update_instantiate_config(
2149            &mut self,
2150            request: impl tonic::IntoRequest<super::MsgUpdateInstantiateConfig>,
2151        ) -> Result<tonic::Response<super::MsgUpdateInstantiateConfigResponse>, tonic::Status>
2152        {
2153            self.inner.ready().await.map_err(|e| {
2154                tonic::Status::new(
2155                    tonic::Code::Unknown,
2156                    format!("Service was not ready: {}", e.into()),
2157                )
2158            })?;
2159            let codec = tonic::codec::ProstCodec::default();
2160            let path = http::uri::PathAndQuery::from_static(
2161                "/cosmwasm.wasm.v1.Msg/UpdateInstantiateConfig",
2162            );
2163            self.inner.unary(request.into_request(), path, codec).await
2164        }
2165        /// UpdateParams defines a governance operation for updating the x/wasm
2166        /// module parameters. The authority is defined in the keeper.
2167        ///
2168        /// Since: 0.40
2169        pub async fn update_params(
2170            &mut self,
2171            request: impl tonic::IntoRequest<super::MsgUpdateParams>,
2172        ) -> Result<tonic::Response<super::MsgUpdateParamsResponse>, tonic::Status> {
2173            self.inner.ready().await.map_err(|e| {
2174                tonic::Status::new(
2175                    tonic::Code::Unknown,
2176                    format!("Service was not ready: {}", e.into()),
2177                )
2178            })?;
2179            let codec = tonic::codec::ProstCodec::default();
2180            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UpdateParams");
2181            self.inner.unary(request.into_request(), path, codec).await
2182        }
2183        /// SudoContract defines a governance operation for calling sudo
2184        /// on a contract. The authority is defined in the keeper.
2185        ///
2186        /// Since: 0.40
2187        pub async fn sudo_contract(
2188            &mut self,
2189            request: impl tonic::IntoRequest<super::MsgSudoContract>,
2190        ) -> Result<tonic::Response<super::MsgSudoContractResponse>, tonic::Status> {
2191            self.inner.ready().await.map_err(|e| {
2192                tonic::Status::new(
2193                    tonic::Code::Unknown,
2194                    format!("Service was not ready: {}", e.into()),
2195                )
2196            })?;
2197            let codec = tonic::codec::ProstCodec::default();
2198            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/SudoContract");
2199            self.inner.unary(request.into_request(), path, codec).await
2200        }
2201        /// PinCodes defines a governance operation for pinning a set of
2202        /// code ids in the wasmvm cache. The authority is defined in the keeper.
2203        ///
2204        /// Since: 0.40
2205        pub async fn pin_codes(
2206            &mut self,
2207            request: impl tonic::IntoRequest<super::MsgPinCodes>,
2208        ) -> Result<tonic::Response<super::MsgPinCodesResponse>, tonic::Status> {
2209            self.inner.ready().await.map_err(|e| {
2210                tonic::Status::new(
2211                    tonic::Code::Unknown,
2212                    format!("Service was not ready: {}", e.into()),
2213                )
2214            })?;
2215            let codec = tonic::codec::ProstCodec::default();
2216            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/PinCodes");
2217            self.inner.unary(request.into_request(), path, codec).await
2218        }
2219        /// UnpinCodes defines a governance operation for unpinning a set of
2220        /// code ids in the wasmvm cache. The authority is defined in the keeper.
2221        ///
2222        /// Since: 0.40
2223        pub async fn unpin_codes(
2224            &mut self,
2225            request: impl tonic::IntoRequest<super::MsgUnpinCodes>,
2226        ) -> Result<tonic::Response<super::MsgUnpinCodesResponse>, tonic::Status> {
2227            self.inner.ready().await.map_err(|e| {
2228                tonic::Status::new(
2229                    tonic::Code::Unknown,
2230                    format!("Service was not ready: {}", e.into()),
2231                )
2232            })?;
2233            let codec = tonic::codec::ProstCodec::default();
2234            let path = http::uri::PathAndQuery::from_static("/cosmwasm.wasm.v1.Msg/UnpinCodes");
2235            self.inner.unary(request.into_request(), path, codec).await
2236        }
2237        /// StoreAndInstantiateContract defines a governance operation for storing
2238        /// and instantiating the contract. The authority is defined in the keeper.
2239        ///
2240        /// Since: 0.40
2241        pub async fn store_and_instantiate_contract(
2242            &mut self,
2243            request: impl tonic::IntoRequest<super::MsgStoreAndInstantiateContract>,
2244        ) -> Result<tonic::Response<super::MsgStoreAndInstantiateContractResponse>, tonic::Status>
2245        {
2246            self.inner.ready().await.map_err(|e| {
2247                tonic::Status::new(
2248                    tonic::Code::Unknown,
2249                    format!("Service was not ready: {}", e.into()),
2250                )
2251            })?;
2252            let codec = tonic::codec::ProstCodec::default();
2253            let path = http::uri::PathAndQuery::from_static(
2254                "/cosmwasm.wasm.v1.Msg/StoreAndInstantiateContract",
2255            );
2256            self.inner.unary(request.into_request(), path, codec).await
2257        }
2258    }
2259}
2260/// Generated server implementations.
2261#[cfg(feature = "grpc")]
2262#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
2263pub mod msg_server {
2264    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
2265    use tonic::codegen::*;
2266    /// Generated trait containing gRPC methods that should be implemented for use with MsgServer.
2267    #[async_trait]
2268    pub trait Msg: Send + Sync + 'static {
2269        /// StoreCode to submit Wasm code to the system
2270        async fn store_code(
2271            &self,
2272            request: tonic::Request<super::MsgStoreCode>,
2273        ) -> Result<tonic::Response<super::MsgStoreCodeResponse>, tonic::Status>;
2274        ///  InstantiateContract creates a new smart contract instance for the given
2275        ///  code id.
2276        async fn instantiate_contract(
2277            &self,
2278            request: tonic::Request<super::MsgInstantiateContract>,
2279        ) -> Result<tonic::Response<super::MsgInstantiateContractResponse>, tonic::Status>;
2280        ///  InstantiateContract2 creates a new smart contract instance for the given
2281        ///  code id with a predictable address
2282        async fn instantiate_contract2(
2283            &self,
2284            request: tonic::Request<super::MsgInstantiateContract2>,
2285        ) -> Result<tonic::Response<super::MsgInstantiateContract2Response>, tonic::Status>;
2286        /// Execute submits the given message data to a smart contract
2287        async fn execute_contract(
2288            &self,
2289            request: tonic::Request<super::MsgExecuteContract>,
2290        ) -> Result<tonic::Response<super::MsgExecuteContractResponse>, tonic::Status>;
2291        /// Migrate runs a code upgrade/ downgrade for a smart contract
2292        async fn migrate_contract(
2293            &self,
2294            request: tonic::Request<super::MsgMigrateContract>,
2295        ) -> Result<tonic::Response<super::MsgMigrateContractResponse>, tonic::Status>;
2296        /// UpdateAdmin sets a new   admin for a smart contract
2297        async fn update_admin(
2298            &self,
2299            request: tonic::Request<super::MsgUpdateAdmin>,
2300        ) -> Result<tonic::Response<super::MsgUpdateAdminResponse>, tonic::Status>;
2301        /// ClearAdmin removes any admin stored for a smart contract
2302        async fn clear_admin(
2303            &self,
2304            request: tonic::Request<super::MsgClearAdmin>,
2305        ) -> Result<tonic::Response<super::MsgClearAdminResponse>, tonic::Status>;
2306        /// UpdateInstantiateConfig updates instantiate config for a smart contract
2307        async fn update_instantiate_config(
2308            &self,
2309            request: tonic::Request<super::MsgUpdateInstantiateConfig>,
2310        ) -> Result<tonic::Response<super::MsgUpdateInstantiateConfigResponse>, tonic::Status>;
2311        /// UpdateParams defines a governance operation for updating the x/wasm
2312        /// module parameters. The authority is defined in the keeper.
2313        ///
2314        /// Since: 0.40
2315        async fn update_params(
2316            &self,
2317            request: tonic::Request<super::MsgUpdateParams>,
2318        ) -> Result<tonic::Response<super::MsgUpdateParamsResponse>, tonic::Status>;
2319        /// SudoContract defines a governance operation for calling sudo
2320        /// on a contract. The authority is defined in the keeper.
2321        ///
2322        /// Since: 0.40
2323        async fn sudo_contract(
2324            &self,
2325            request: tonic::Request<super::MsgSudoContract>,
2326        ) -> Result<tonic::Response<super::MsgSudoContractResponse>, tonic::Status>;
2327        /// PinCodes defines a governance operation for pinning a set of
2328        /// code ids in the wasmvm cache. The authority is defined in the keeper.
2329        ///
2330        /// Since: 0.40
2331        async fn pin_codes(
2332            &self,
2333            request: tonic::Request<super::MsgPinCodes>,
2334        ) -> Result<tonic::Response<super::MsgPinCodesResponse>, tonic::Status>;
2335        /// UnpinCodes defines a governance operation for unpinning a set of
2336        /// code ids in the wasmvm cache. The authority is defined in the keeper.
2337        ///
2338        /// Since: 0.40
2339        async fn unpin_codes(
2340            &self,
2341            request: tonic::Request<super::MsgUnpinCodes>,
2342        ) -> Result<tonic::Response<super::MsgUnpinCodesResponse>, tonic::Status>;
2343        /// StoreAndInstantiateContract defines a governance operation for storing
2344        /// and instantiating the contract. The authority is defined in the keeper.
2345        ///
2346        /// Since: 0.40
2347        async fn store_and_instantiate_contract(
2348            &self,
2349            request: tonic::Request<super::MsgStoreAndInstantiateContract>,
2350        ) -> Result<tonic::Response<super::MsgStoreAndInstantiateContractResponse>, tonic::Status>;
2351    }
2352    /// Msg defines the wasm Msg service.
2353    #[derive(Debug)]
2354    pub struct MsgServer<T: Msg> {
2355        inner: _Inner<T>,
2356        accept_compression_encodings: EnabledCompressionEncodings,
2357        send_compression_encodings: EnabledCompressionEncodings,
2358    }
2359    struct _Inner<T>(Arc<T>);
2360    impl<T: Msg> MsgServer<T> {
2361        pub fn new(inner: T) -> Self {
2362            Self::from_arc(Arc::new(inner))
2363        }
2364        pub fn from_arc(inner: Arc<T>) -> Self {
2365            let inner = _Inner(inner);
2366            Self {
2367                inner,
2368                accept_compression_encodings: Default::default(),
2369                send_compression_encodings: Default::default(),
2370            }
2371        }
2372        pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
2373        where
2374            F: tonic::service::Interceptor,
2375        {
2376            InterceptedService::new(Self::new(inner), interceptor)
2377        }
2378        /// Enable decompressing requests with the given encoding.
2379        #[must_use]
2380        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2381            self.accept_compression_encodings.enable(encoding);
2382            self
2383        }
2384        /// Compress responses with the given encoding, if the client supports it.
2385        #[must_use]
2386        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2387            self.send_compression_encodings.enable(encoding);
2388            self
2389        }
2390    }
2391    impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
2392    where
2393        T: Msg,
2394        B: Body + Send + 'static,
2395        B::Error: Into<StdError> + Send + 'static,
2396    {
2397        type Response = http::Response<tonic::body::BoxBody>;
2398        type Error = std::convert::Infallible;
2399        type Future = BoxFuture<Self::Response, Self::Error>;
2400        fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
2401            Poll::Ready(Ok(()))
2402        }
2403        fn call(&mut self, req: http::Request<B>) -> Self::Future {
2404            let inner = self.inner.clone();
2405            match req.uri().path() {
2406                "/cosmwasm.wasm.v1.Msg/StoreCode" => {
2407                    #[allow(non_camel_case_types)]
2408                    struct StoreCodeSvc<T: Msg>(pub Arc<T>);
2409                    impl<T: Msg> tonic::server::UnaryService<super::MsgStoreCode> for StoreCodeSvc<T> {
2410                        type Response = super::MsgStoreCodeResponse;
2411                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2412                        fn call(
2413                            &mut self,
2414                            request: tonic::Request<super::MsgStoreCode>,
2415                        ) -> Self::Future {
2416                            let inner = self.0.clone();
2417                            let fut = async move { (*inner).store_code(request).await };
2418                            Box::pin(fut)
2419                        }
2420                    }
2421                    let accept_compression_encodings = self.accept_compression_encodings;
2422                    let send_compression_encodings = self.send_compression_encodings;
2423                    let inner = self.inner.clone();
2424                    let fut = async move {
2425                        let inner = inner.0;
2426                        let method = StoreCodeSvc(inner);
2427                        let codec = tonic::codec::ProstCodec::default();
2428                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2429                            accept_compression_encodings,
2430                            send_compression_encodings,
2431                        );
2432                        let res = grpc.unary(method, req).await;
2433                        Ok(res)
2434                    };
2435                    Box::pin(fut)
2436                }
2437                "/cosmwasm.wasm.v1.Msg/InstantiateContract" => {
2438                    #[allow(non_camel_case_types)]
2439                    struct InstantiateContractSvc<T: Msg>(pub Arc<T>);
2440                    impl<T: Msg> tonic::server::UnaryService<super::MsgInstantiateContract>
2441                        for InstantiateContractSvc<T>
2442                    {
2443                        type Response = super::MsgInstantiateContractResponse;
2444                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2445                        fn call(
2446                            &mut self,
2447                            request: tonic::Request<super::MsgInstantiateContract>,
2448                        ) -> Self::Future {
2449                            let inner = self.0.clone();
2450                            let fut = async move { (*inner).instantiate_contract(request).await };
2451                            Box::pin(fut)
2452                        }
2453                    }
2454                    let accept_compression_encodings = self.accept_compression_encodings;
2455                    let send_compression_encodings = self.send_compression_encodings;
2456                    let inner = self.inner.clone();
2457                    let fut = async move {
2458                        let inner = inner.0;
2459                        let method = InstantiateContractSvc(inner);
2460                        let codec = tonic::codec::ProstCodec::default();
2461                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2462                            accept_compression_encodings,
2463                            send_compression_encodings,
2464                        );
2465                        let res = grpc.unary(method, req).await;
2466                        Ok(res)
2467                    };
2468                    Box::pin(fut)
2469                }
2470                "/cosmwasm.wasm.v1.Msg/InstantiateContract2" => {
2471                    #[allow(non_camel_case_types)]
2472                    struct InstantiateContract2Svc<T: Msg>(pub Arc<T>);
2473                    impl<T: Msg> tonic::server::UnaryService<super::MsgInstantiateContract2>
2474                        for InstantiateContract2Svc<T>
2475                    {
2476                        type Response = super::MsgInstantiateContract2Response;
2477                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2478                        fn call(
2479                            &mut self,
2480                            request: tonic::Request<super::MsgInstantiateContract2>,
2481                        ) -> Self::Future {
2482                            let inner = self.0.clone();
2483                            let fut = async move { (*inner).instantiate_contract2(request).await };
2484                            Box::pin(fut)
2485                        }
2486                    }
2487                    let accept_compression_encodings = self.accept_compression_encodings;
2488                    let send_compression_encodings = self.send_compression_encodings;
2489                    let inner = self.inner.clone();
2490                    let fut = async move {
2491                        let inner = inner.0;
2492                        let method = InstantiateContract2Svc(inner);
2493                        let codec = tonic::codec::ProstCodec::default();
2494                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2495                            accept_compression_encodings,
2496                            send_compression_encodings,
2497                        );
2498                        let res = grpc.unary(method, req).await;
2499                        Ok(res)
2500                    };
2501                    Box::pin(fut)
2502                }
2503                "/cosmwasm.wasm.v1.Msg/ExecuteContract" => {
2504                    #[allow(non_camel_case_types)]
2505                    struct ExecuteContractSvc<T: Msg>(pub Arc<T>);
2506                    impl<T: Msg> tonic::server::UnaryService<super::MsgExecuteContract> for ExecuteContractSvc<T> {
2507                        type Response = super::MsgExecuteContractResponse;
2508                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2509                        fn call(
2510                            &mut self,
2511                            request: tonic::Request<super::MsgExecuteContract>,
2512                        ) -> Self::Future {
2513                            let inner = self.0.clone();
2514                            let fut = async move { (*inner).execute_contract(request).await };
2515                            Box::pin(fut)
2516                        }
2517                    }
2518                    let accept_compression_encodings = self.accept_compression_encodings;
2519                    let send_compression_encodings = self.send_compression_encodings;
2520                    let inner = self.inner.clone();
2521                    let fut = async move {
2522                        let inner = inner.0;
2523                        let method = ExecuteContractSvc(inner);
2524                        let codec = tonic::codec::ProstCodec::default();
2525                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2526                            accept_compression_encodings,
2527                            send_compression_encodings,
2528                        );
2529                        let res = grpc.unary(method, req).await;
2530                        Ok(res)
2531                    };
2532                    Box::pin(fut)
2533                }
2534                "/cosmwasm.wasm.v1.Msg/MigrateContract" => {
2535                    #[allow(non_camel_case_types)]
2536                    struct MigrateContractSvc<T: Msg>(pub Arc<T>);
2537                    impl<T: Msg> tonic::server::UnaryService<super::MsgMigrateContract> for MigrateContractSvc<T> {
2538                        type Response = super::MsgMigrateContractResponse;
2539                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2540                        fn call(
2541                            &mut self,
2542                            request: tonic::Request<super::MsgMigrateContract>,
2543                        ) -> Self::Future {
2544                            let inner = self.0.clone();
2545                            let fut = async move { (*inner).migrate_contract(request).await };
2546                            Box::pin(fut)
2547                        }
2548                    }
2549                    let accept_compression_encodings = self.accept_compression_encodings;
2550                    let send_compression_encodings = self.send_compression_encodings;
2551                    let inner = self.inner.clone();
2552                    let fut = async move {
2553                        let inner = inner.0;
2554                        let method = MigrateContractSvc(inner);
2555                        let codec = tonic::codec::ProstCodec::default();
2556                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2557                            accept_compression_encodings,
2558                            send_compression_encodings,
2559                        );
2560                        let res = grpc.unary(method, req).await;
2561                        Ok(res)
2562                    };
2563                    Box::pin(fut)
2564                }
2565                "/cosmwasm.wasm.v1.Msg/UpdateAdmin" => {
2566                    #[allow(non_camel_case_types)]
2567                    struct UpdateAdminSvc<T: Msg>(pub Arc<T>);
2568                    impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateAdmin> for UpdateAdminSvc<T> {
2569                        type Response = super::MsgUpdateAdminResponse;
2570                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2571                        fn call(
2572                            &mut self,
2573                            request: tonic::Request<super::MsgUpdateAdmin>,
2574                        ) -> Self::Future {
2575                            let inner = self.0.clone();
2576                            let fut = async move { (*inner).update_admin(request).await };
2577                            Box::pin(fut)
2578                        }
2579                    }
2580                    let accept_compression_encodings = self.accept_compression_encodings;
2581                    let send_compression_encodings = self.send_compression_encodings;
2582                    let inner = self.inner.clone();
2583                    let fut = async move {
2584                        let inner = inner.0;
2585                        let method = UpdateAdminSvc(inner);
2586                        let codec = tonic::codec::ProstCodec::default();
2587                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2588                            accept_compression_encodings,
2589                            send_compression_encodings,
2590                        );
2591                        let res = grpc.unary(method, req).await;
2592                        Ok(res)
2593                    };
2594                    Box::pin(fut)
2595                }
2596                "/cosmwasm.wasm.v1.Msg/ClearAdmin" => {
2597                    #[allow(non_camel_case_types)]
2598                    struct ClearAdminSvc<T: Msg>(pub Arc<T>);
2599                    impl<T: Msg> tonic::server::UnaryService<super::MsgClearAdmin> for ClearAdminSvc<T> {
2600                        type Response = super::MsgClearAdminResponse;
2601                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2602                        fn call(
2603                            &mut self,
2604                            request: tonic::Request<super::MsgClearAdmin>,
2605                        ) -> Self::Future {
2606                            let inner = self.0.clone();
2607                            let fut = async move { (*inner).clear_admin(request).await };
2608                            Box::pin(fut)
2609                        }
2610                    }
2611                    let accept_compression_encodings = self.accept_compression_encodings;
2612                    let send_compression_encodings = self.send_compression_encodings;
2613                    let inner = self.inner.clone();
2614                    let fut = async move {
2615                        let inner = inner.0;
2616                        let method = ClearAdminSvc(inner);
2617                        let codec = tonic::codec::ProstCodec::default();
2618                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2619                            accept_compression_encodings,
2620                            send_compression_encodings,
2621                        );
2622                        let res = grpc.unary(method, req).await;
2623                        Ok(res)
2624                    };
2625                    Box::pin(fut)
2626                }
2627                "/cosmwasm.wasm.v1.Msg/UpdateInstantiateConfig" => {
2628                    #[allow(non_camel_case_types)]
2629                    struct UpdateInstantiateConfigSvc<T: Msg>(pub Arc<T>);
2630                    impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateInstantiateConfig>
2631                        for UpdateInstantiateConfigSvc<T>
2632                    {
2633                        type Response = super::MsgUpdateInstantiateConfigResponse;
2634                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2635                        fn call(
2636                            &mut self,
2637                            request: tonic::Request<super::MsgUpdateInstantiateConfig>,
2638                        ) -> Self::Future {
2639                            let inner = self.0.clone();
2640                            let fut =
2641                                async move { (*inner).update_instantiate_config(request).await };
2642                            Box::pin(fut)
2643                        }
2644                    }
2645                    let accept_compression_encodings = self.accept_compression_encodings;
2646                    let send_compression_encodings = self.send_compression_encodings;
2647                    let inner = self.inner.clone();
2648                    let fut = async move {
2649                        let inner = inner.0;
2650                        let method = UpdateInstantiateConfigSvc(inner);
2651                        let codec = tonic::codec::ProstCodec::default();
2652                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2653                            accept_compression_encodings,
2654                            send_compression_encodings,
2655                        );
2656                        let res = grpc.unary(method, req).await;
2657                        Ok(res)
2658                    };
2659                    Box::pin(fut)
2660                }
2661                "/cosmwasm.wasm.v1.Msg/UpdateParams" => {
2662                    #[allow(non_camel_case_types)]
2663                    struct UpdateParamsSvc<T: Msg>(pub Arc<T>);
2664                    impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateParams> for UpdateParamsSvc<T> {
2665                        type Response = super::MsgUpdateParamsResponse;
2666                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2667                        fn call(
2668                            &mut self,
2669                            request: tonic::Request<super::MsgUpdateParams>,
2670                        ) -> Self::Future {
2671                            let inner = self.0.clone();
2672                            let fut = async move { (*inner).update_params(request).await };
2673                            Box::pin(fut)
2674                        }
2675                    }
2676                    let accept_compression_encodings = self.accept_compression_encodings;
2677                    let send_compression_encodings = self.send_compression_encodings;
2678                    let inner = self.inner.clone();
2679                    let fut = async move {
2680                        let inner = inner.0;
2681                        let method = UpdateParamsSvc(inner);
2682                        let codec = tonic::codec::ProstCodec::default();
2683                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2684                            accept_compression_encodings,
2685                            send_compression_encodings,
2686                        );
2687                        let res = grpc.unary(method, req).await;
2688                        Ok(res)
2689                    };
2690                    Box::pin(fut)
2691                }
2692                "/cosmwasm.wasm.v1.Msg/SudoContract" => {
2693                    #[allow(non_camel_case_types)]
2694                    struct SudoContractSvc<T: Msg>(pub Arc<T>);
2695                    impl<T: Msg> tonic::server::UnaryService<super::MsgSudoContract> for SudoContractSvc<T> {
2696                        type Response = super::MsgSudoContractResponse;
2697                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2698                        fn call(
2699                            &mut self,
2700                            request: tonic::Request<super::MsgSudoContract>,
2701                        ) -> Self::Future {
2702                            let inner = self.0.clone();
2703                            let fut = async move { (*inner).sudo_contract(request).await };
2704                            Box::pin(fut)
2705                        }
2706                    }
2707                    let accept_compression_encodings = self.accept_compression_encodings;
2708                    let send_compression_encodings = self.send_compression_encodings;
2709                    let inner = self.inner.clone();
2710                    let fut = async move {
2711                        let inner = inner.0;
2712                        let method = SudoContractSvc(inner);
2713                        let codec = tonic::codec::ProstCodec::default();
2714                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2715                            accept_compression_encodings,
2716                            send_compression_encodings,
2717                        );
2718                        let res = grpc.unary(method, req).await;
2719                        Ok(res)
2720                    };
2721                    Box::pin(fut)
2722                }
2723                "/cosmwasm.wasm.v1.Msg/PinCodes" => {
2724                    #[allow(non_camel_case_types)]
2725                    struct PinCodesSvc<T: Msg>(pub Arc<T>);
2726                    impl<T: Msg> tonic::server::UnaryService<super::MsgPinCodes> for PinCodesSvc<T> {
2727                        type Response = super::MsgPinCodesResponse;
2728                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2729                        fn call(
2730                            &mut self,
2731                            request: tonic::Request<super::MsgPinCodes>,
2732                        ) -> Self::Future {
2733                            let inner = self.0.clone();
2734                            let fut = async move { (*inner).pin_codes(request).await };
2735                            Box::pin(fut)
2736                        }
2737                    }
2738                    let accept_compression_encodings = self.accept_compression_encodings;
2739                    let send_compression_encodings = self.send_compression_encodings;
2740                    let inner = self.inner.clone();
2741                    let fut = async move {
2742                        let inner = inner.0;
2743                        let method = PinCodesSvc(inner);
2744                        let codec = tonic::codec::ProstCodec::default();
2745                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2746                            accept_compression_encodings,
2747                            send_compression_encodings,
2748                        );
2749                        let res = grpc.unary(method, req).await;
2750                        Ok(res)
2751                    };
2752                    Box::pin(fut)
2753                }
2754                "/cosmwasm.wasm.v1.Msg/UnpinCodes" => {
2755                    #[allow(non_camel_case_types)]
2756                    struct UnpinCodesSvc<T: Msg>(pub Arc<T>);
2757                    impl<T: Msg> tonic::server::UnaryService<super::MsgUnpinCodes> for UnpinCodesSvc<T> {
2758                        type Response = super::MsgUnpinCodesResponse;
2759                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2760                        fn call(
2761                            &mut self,
2762                            request: tonic::Request<super::MsgUnpinCodes>,
2763                        ) -> Self::Future {
2764                            let inner = self.0.clone();
2765                            let fut = async move { (*inner).unpin_codes(request).await };
2766                            Box::pin(fut)
2767                        }
2768                    }
2769                    let accept_compression_encodings = self.accept_compression_encodings;
2770                    let send_compression_encodings = self.send_compression_encodings;
2771                    let inner = self.inner.clone();
2772                    let fut = async move {
2773                        let inner = inner.0;
2774                        let method = UnpinCodesSvc(inner);
2775                        let codec = tonic::codec::ProstCodec::default();
2776                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2777                            accept_compression_encodings,
2778                            send_compression_encodings,
2779                        );
2780                        let res = grpc.unary(method, req).await;
2781                        Ok(res)
2782                    };
2783                    Box::pin(fut)
2784                }
2785                "/cosmwasm.wasm.v1.Msg/StoreAndInstantiateContract" => {
2786                    #[allow(non_camel_case_types)]
2787                    struct StoreAndInstantiateContractSvc<T: Msg>(pub Arc<T>);
2788                    impl<T: Msg> tonic::server::UnaryService<super::MsgStoreAndInstantiateContract>
2789                        for StoreAndInstantiateContractSvc<T>
2790                    {
2791                        type Response = super::MsgStoreAndInstantiateContractResponse;
2792                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2793                        fn call(
2794                            &mut self,
2795                            request: tonic::Request<super::MsgStoreAndInstantiateContract>,
2796                        ) -> Self::Future {
2797                            let inner = self.0.clone();
2798                            let fut = async move {
2799                                (*inner).store_and_instantiate_contract(request).await
2800                            };
2801                            Box::pin(fut)
2802                        }
2803                    }
2804                    let accept_compression_encodings = self.accept_compression_encodings;
2805                    let send_compression_encodings = self.send_compression_encodings;
2806                    let inner = self.inner.clone();
2807                    let fut = async move {
2808                        let inner = inner.0;
2809                        let method = StoreAndInstantiateContractSvc(inner);
2810                        let codec = tonic::codec::ProstCodec::default();
2811                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
2812                            accept_compression_encodings,
2813                            send_compression_encodings,
2814                        );
2815                        let res = grpc.unary(method, req).await;
2816                        Ok(res)
2817                    };
2818                    Box::pin(fut)
2819                }
2820                _ => Box::pin(async move {
2821                    Ok(http::Response::builder()
2822                        .status(200)
2823                        .header("grpc-status", "12")
2824                        .header("content-type", "application/grpc")
2825                        .body(empty_body())
2826                        .unwrap())
2827                }),
2828            }
2829        }
2830    }
2831    impl<T: Msg> Clone for MsgServer<T> {
2832        fn clone(&self) -> Self {
2833            let inner = self.inner.clone();
2834            Self {
2835                inner,
2836                accept_compression_encodings: self.accept_compression_encodings,
2837                send_compression_encodings: self.send_compression_encodings,
2838            }
2839        }
2840    }
2841    impl<T: Msg> Clone for _Inner<T> {
2842        fn clone(&self) -> Self {
2843            Self(self.0.clone())
2844        }
2845    }
2846    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
2847        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2848            write!(f, "{:?}", self.0)
2849        }
2850    }
2851    impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
2852        const NAME: &'static str = "cosmwasm.wasm.v1.Msg";
2853    }
2854}
2855/// ContractExecutionAuthorization defines authorization for wasm execute.
2856/// Since: wasmd 0.30
2857#[allow(clippy::derive_partial_eq_without_eq)]
2858#[derive(Clone, PartialEq, ::prost::Message)]
2859pub struct ContractExecutionAuthorization {
2860    /// Grants for contract executions
2861    #[prost(message, repeated, tag = "1")]
2862    pub grants: ::prost::alloc::vec::Vec<ContractGrant>,
2863}
2864/// ContractMigrationAuthorization defines authorization for wasm contract
2865/// migration. Since: wasmd 0.30
2866#[allow(clippy::derive_partial_eq_without_eq)]
2867#[derive(Clone, PartialEq, ::prost::Message)]
2868pub struct ContractMigrationAuthorization {
2869    /// Grants for contract migrations
2870    #[prost(message, repeated, tag = "1")]
2871    pub grants: ::prost::alloc::vec::Vec<ContractGrant>,
2872}
2873/// ContractGrant a granted permission for a single contract
2874/// Since: wasmd 0.30
2875#[allow(clippy::derive_partial_eq_without_eq)]
2876#[derive(Clone, PartialEq, ::prost::Message)]
2877pub struct ContractGrant {
2878    /// Contract is the bech32 address of the smart contract
2879    #[prost(string, tag = "1")]
2880    pub contract: ::prost::alloc::string::String,
2881    /// Limit defines execution limits that are enforced and updated when the grant
2882    /// is applied. When the limit lapsed the grant is removed.
2883    #[prost(message, optional, tag = "2")]
2884    pub limit: ::core::option::Option<::prost_types::Any>,
2885    /// Filter define more fine-grained control on the message payload passed
2886    /// to the contract in the operation. When no filter applies on execution, the
2887    /// operation is prohibited.
2888    #[prost(message, optional, tag = "3")]
2889    pub filter: ::core::option::Option<::prost_types::Any>,
2890}
2891/// MaxCallsLimit limited number of calls to the contract. No funds transferable.
2892/// Since: wasmd 0.30
2893#[allow(clippy::derive_partial_eq_without_eq)]
2894#[derive(Clone, PartialEq, ::prost::Message)]
2895pub struct MaxCallsLimit {
2896    /// Remaining number that is decremented on each execution
2897    #[prost(uint64, tag = "1")]
2898    pub remaining: u64,
2899}
2900/// MaxFundsLimit defines the maximal amounts that can be sent to the contract.
2901/// Since: wasmd 0.30
2902#[allow(clippy::derive_partial_eq_without_eq)]
2903#[derive(Clone, PartialEq, ::prost::Message)]
2904pub struct MaxFundsLimit {
2905    /// Amounts is the maximal amount of tokens transferable to the contract.
2906    #[prost(message, repeated, tag = "1")]
2907    pub amounts: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
2908}
2909/// CombinedLimit defines the maximal amounts that can be sent to a contract and
2910/// the maximal number of calls executable. Both need to remain >0 to be valid.
2911/// Since: wasmd 0.30
2912#[allow(clippy::derive_partial_eq_without_eq)]
2913#[derive(Clone, PartialEq, ::prost::Message)]
2914pub struct CombinedLimit {
2915    /// Remaining number that is decremented on each execution
2916    #[prost(uint64, tag = "1")]
2917    pub calls_remaining: u64,
2918    /// Amounts is the maximal amount of tokens transferable to the contract.
2919    #[prost(message, repeated, tag = "2")]
2920    pub amounts: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
2921}
2922/// AllowAllMessagesFilter is a wildcard to allow any type of contract payload
2923/// message.
2924/// Since: wasmd 0.30
2925#[allow(clippy::derive_partial_eq_without_eq)]
2926#[derive(Clone, PartialEq, ::prost::Message)]
2927pub struct AllowAllMessagesFilter {}
2928/// AcceptedMessageKeysFilter accept only the specific contract message keys in
2929/// the json object to be executed.
2930/// Since: wasmd 0.30
2931#[allow(clippy::derive_partial_eq_without_eq)]
2932#[derive(Clone, PartialEq, ::prost::Message)]
2933pub struct AcceptedMessageKeysFilter {
2934    /// Messages is the list of unique keys
2935    #[prost(string, repeated, tag = "1")]
2936    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2937}
2938/// AcceptedMessagesFilter accept only the specific raw contract messages to be
2939/// executed.
2940/// Since: wasmd 0.30
2941#[allow(clippy::derive_partial_eq_without_eq)]
2942#[derive(Clone, PartialEq, ::prost::Message)]
2943pub struct AcceptedMessagesFilter {
2944    /// Messages is the list of raw contract messages
2945    #[prost(bytes = "vec", repeated, tag = "1")]
2946    pub messages: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
2947}