1#[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#[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 #[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct CodeInfo {
34 #[prost(bytes = "vec", tag = "1")]
36 pub code_hash: ::prost::alloc::vec::Vec<u8>,
37 #[prost(string, tag = "2")]
39 pub creator: ::prost::alloc::string::String,
40 #[prost(message, optional, tag = "5")]
42 pub instantiate_config: ::core::option::Option<AccessConfig>,
43}
44#[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct ContractInfo {
48 #[prost(uint64, tag = "1")]
50 pub code_id: u64,
51 #[prost(string, tag = "2")]
53 pub creator: ::prost::alloc::string::String,
54 #[prost(string, tag = "3")]
56 pub admin: ::prost::alloc::string::String,
57 #[prost(string, tag = "4")]
59 pub label: ::prost::alloc::string::String,
60 #[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 #[prost(message, optional, tag = "7")]
68 pub extension: ::core::option::Option<::prost_types::Any>,
69}
70#[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 #[prost(uint64, tag = "2")]
78 pub code_id: u64,
79 #[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#[allow(clippy::derive_partial_eq_without_eq)]
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct AbsoluteTxPosition {
90 #[prost(uint64, tag = "1")]
92 pub block_height: u64,
93 #[prost(uint64, tag = "2")]
96 pub tx_index: u64,
97}
98#[allow(clippy::derive_partial_eq_without_eq)]
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct Model {
102 #[prost(bytes = "vec", tag = "1")]
104 pub key: ::prost::alloc::vec::Vec<u8>,
105 #[prost(bytes = "vec", tag = "2")]
107 pub value: ::prost::alloc::vec::Vec<u8>,
108}
109#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
111#[repr(i32)]
112pub enum AccessType {
113 Unspecified = 0,
115 Nobody = 1,
117 OnlyAddress = 2,
120 Everybody = 3,
122 AnyOfAddresses = 4,
124}
125impl AccessType {
126 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
153#[repr(i32)]
154pub enum ContractCodeHistoryOperationType {
155 Unspecified = 0,
157 Init = 1,
159 Migrate = 2,
161 Genesis = 3,
163}
164impl ContractCodeHistoryOperationType {
165 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 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#[allow(clippy::derive_partial_eq_without_eq)]
199#[derive(Clone, PartialEq, ::prost::Message)]
200pub struct StoreCodeProposal {
201 #[prost(string, tag = "1")]
203 pub title: ::prost::alloc::string::String,
204 #[prost(string, tag = "2")]
206 pub description: ::prost::alloc::string::String,
207 #[prost(string, tag = "3")]
209 pub run_as: ::prost::alloc::string::String,
210 #[prost(bytes = "vec", tag = "4")]
212 pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
213 #[prost(message, optional, tag = "7")]
215 pub instantiate_permission: ::core::option::Option<AccessConfig>,
216 #[prost(bool, tag = "8")]
218 pub unpin_code: bool,
219 #[prost(string, tag = "9")]
221 pub source: ::prost::alloc::string::String,
222 #[prost(string, tag = "10")]
225 pub builder: ::prost::alloc::string::String,
226 #[prost(bytes = "vec", tag = "11")]
229 pub code_hash: ::prost::alloc::vec::Vec<u8>,
230}
231#[allow(clippy::derive_partial_eq_without_eq)]
236#[derive(Clone, PartialEq, ::prost::Message)]
237pub struct InstantiateContractProposal {
238 #[prost(string, tag = "1")]
240 pub title: ::prost::alloc::string::String,
241 #[prost(string, tag = "2")]
243 pub description: ::prost::alloc::string::String,
244 #[prost(string, tag = "3")]
246 pub run_as: ::prost::alloc::string::String,
247 #[prost(string, tag = "4")]
249 pub admin: ::prost::alloc::string::String,
250 #[prost(uint64, tag = "5")]
252 pub code_id: u64,
253 #[prost(string, tag = "6")]
255 pub label: ::prost::alloc::string::String,
256 #[prost(bytes = "vec", tag = "7")]
258 pub msg: ::prost::alloc::vec::Vec<u8>,
259 #[prost(message, repeated, tag = "8")]
261 pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
262}
263#[allow(clippy::derive_partial_eq_without_eq)]
268#[derive(Clone, PartialEq, ::prost::Message)]
269pub struct InstantiateContract2Proposal {
270 #[prost(string, tag = "1")]
272 pub title: ::prost::alloc::string::String,
273 #[prost(string, tag = "2")]
275 pub description: ::prost::alloc::string::String,
276 #[prost(string, tag = "3")]
278 pub run_as: ::prost::alloc::string::String,
279 #[prost(string, tag = "4")]
281 pub admin: ::prost::alloc::string::String,
282 #[prost(uint64, tag = "5")]
284 pub code_id: u64,
285 #[prost(string, tag = "6")]
287 pub label: ::prost::alloc::string::String,
288 #[prost(bytes = "vec", tag = "7")]
290 pub msg: ::prost::alloc::vec::Vec<u8>,
291 #[prost(message, repeated, tag = "8")]
293 pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
294 #[prost(bytes = "vec", tag = "9")]
296 pub salt: ::prost::alloc::vec::Vec<u8>,
297 #[prost(bool, tag = "10")]
300 pub fix_msg: bool,
301}
302#[allow(clippy::derive_partial_eq_without_eq)]
307#[derive(Clone, PartialEq, ::prost::Message)]
308pub struct MigrateContractProposal {
309 #[prost(string, tag = "1")]
311 pub title: ::prost::alloc::string::String,
312 #[prost(string, tag = "2")]
316 pub description: ::prost::alloc::string::String,
317 #[prost(string, tag = "4")]
319 pub contract: ::prost::alloc::string::String,
320 #[prost(uint64, tag = "5")]
322 pub code_id: u64,
323 #[prost(bytes = "vec", tag = "6")]
325 pub msg: ::prost::alloc::vec::Vec<u8>,
326}
327#[allow(clippy::derive_partial_eq_without_eq)]
332#[derive(Clone, PartialEq, ::prost::Message)]
333pub struct SudoContractProposal {
334 #[prost(string, tag = "1")]
336 pub title: ::prost::alloc::string::String,
337 #[prost(string, tag = "2")]
339 pub description: ::prost::alloc::string::String,
340 #[prost(string, tag = "3")]
342 pub contract: ::prost::alloc::string::String,
343 #[prost(bytes = "vec", tag = "4")]
345 pub msg: ::prost::alloc::vec::Vec<u8>,
346}
347#[allow(clippy::derive_partial_eq_without_eq)]
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct ExecuteContractProposal {
354 #[prost(string, tag = "1")]
356 pub title: ::prost::alloc::string::String,
357 #[prost(string, tag = "2")]
359 pub description: ::prost::alloc::string::String,
360 #[prost(string, tag = "3")]
362 pub run_as: ::prost::alloc::string::String,
363 #[prost(string, tag = "4")]
365 pub contract: ::prost::alloc::string::String,
366 #[prost(bytes = "vec", tag = "5")]
368 pub msg: ::prost::alloc::vec::Vec<u8>,
369 #[prost(message, repeated, tag = "6")]
371 pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
372}
373#[allow(clippy::derive_partial_eq_without_eq)]
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct UpdateAdminProposal {
380 #[prost(string, tag = "1")]
382 pub title: ::prost::alloc::string::String,
383 #[prost(string, tag = "2")]
385 pub description: ::prost::alloc::string::String,
386 #[prost(string, tag = "3")]
388 pub new_admin: ::prost::alloc::string::String,
389 #[prost(string, tag = "4")]
391 pub contract: ::prost::alloc::string::String,
392}
393#[allow(clippy::derive_partial_eq_without_eq)]
398#[derive(Clone, PartialEq, ::prost::Message)]
399pub struct ClearAdminProposal {
400 #[prost(string, tag = "1")]
402 pub title: ::prost::alloc::string::String,
403 #[prost(string, tag = "2")]
405 pub description: ::prost::alloc::string::String,
406 #[prost(string, tag = "3")]
408 pub contract: ::prost::alloc::string::String,
409}
410#[allow(clippy::derive_partial_eq_without_eq)]
415#[derive(Clone, PartialEq, ::prost::Message)]
416pub struct PinCodesProposal {
417 #[prost(string, tag = "1")]
419 pub title: ::prost::alloc::string::String,
420 #[prost(string, tag = "2")]
422 pub description: ::prost::alloc::string::String,
423 #[prost(uint64, repeated, packed = "false", tag = "3")]
425 pub code_ids: ::prost::alloc::vec::Vec<u64>,
426}
427#[allow(clippy::derive_partial_eq_without_eq)]
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct UnpinCodesProposal {
434 #[prost(string, tag = "1")]
436 pub title: ::prost::alloc::string::String,
437 #[prost(string, tag = "2")]
439 pub description: ::prost::alloc::string::String,
440 #[prost(uint64, repeated, packed = "false", tag = "3")]
442 pub code_ids: ::prost::alloc::vec::Vec<u64>,
443}
444#[allow(clippy::derive_partial_eq_without_eq)]
447#[derive(Clone, PartialEq, ::prost::Message)]
448pub struct AccessConfigUpdate {
449 #[prost(uint64, tag = "1")]
451 pub code_id: u64,
452 #[prost(message, optional, tag = "2")]
454 pub instantiate_permission: ::core::option::Option<AccessConfig>,
455}
456#[allow(clippy::derive_partial_eq_without_eq)]
461#[derive(Clone, PartialEq, ::prost::Message)]
462pub struct UpdateInstantiateConfigProposal {
463 #[prost(string, tag = "1")]
465 pub title: ::prost::alloc::string::String,
466 #[prost(string, tag = "2")]
468 pub description: ::prost::alloc::string::String,
469 #[prost(message, repeated, tag = "3")]
472 pub access_config_updates: ::prost::alloc::vec::Vec<AccessConfigUpdate>,
473}
474#[allow(clippy::derive_partial_eq_without_eq)]
479#[derive(Clone, PartialEq, ::prost::Message)]
480pub struct StoreAndInstantiateContractProposal {
481 #[prost(string, tag = "1")]
483 pub title: ::prost::alloc::string::String,
484 #[prost(string, tag = "2")]
486 pub description: ::prost::alloc::string::String,
487 #[prost(string, tag = "3")]
489 pub run_as: ::prost::alloc::string::String,
490 #[prost(bytes = "vec", tag = "4")]
492 pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
493 #[prost(message, optional, tag = "5")]
495 pub instantiate_permission: ::core::option::Option<AccessConfig>,
496 #[prost(bool, tag = "6")]
498 pub unpin_code: bool,
499 #[prost(string, tag = "7")]
501 pub admin: ::prost::alloc::string::String,
502 #[prost(string, tag = "8")]
504 pub label: ::prost::alloc::string::String,
505 #[prost(bytes = "vec", tag = "9")]
507 pub msg: ::prost::alloc::vec::Vec<u8>,
508 #[prost(message, repeated, tag = "10")]
510 pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
511 #[prost(string, tag = "11")]
513 pub source: ::prost::alloc::string::String,
514 #[prost(string, tag = "12")]
517 pub builder: ::prost::alloc::string::String,
518 #[prost(bytes = "vec", tag = "13")]
521 pub code_hash: ::prost::alloc::vec::Vec<u8>,
522}
523#[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#[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 #[prost(bool, tag = "4")]
548 pub pinned: bool,
549}
550#[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
574#[derive(Clone, PartialEq, ::prost::Message)]
575pub struct MsgIbcSend {
576 #[prost(string, tag = "2")]
578 pub channel: ::prost::alloc::string::String,
579 #[prost(uint64, tag = "4")]
582 pub timeout_height: u64,
583 #[prost(uint64, tag = "5")]
586 pub timeout_timestamp: u64,
587 #[prost(bytes = "vec", tag = "6")]
590 pub data: ::prost::alloc::vec::Vec<u8>,
591}
592#[allow(clippy::derive_partial_eq_without_eq)]
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct MsgIbcSendResponse {
596 #[prost(uint64, tag = "1")]
598 pub sequence: u64,
599}
600#[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#[allow(clippy::derive_partial_eq_without_eq)]
610#[derive(Clone, PartialEq, ::prost::Message)]
611pub struct QueryContractInfoRequest {
612 #[prost(string, tag = "1")]
614 pub address: ::prost::alloc::string::String,
615}
616#[allow(clippy::derive_partial_eq_without_eq)]
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct QueryContractInfoResponse {
621 #[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#[allow(clippy::derive_partial_eq_without_eq)]
630#[derive(Clone, PartialEq, ::prost::Message)]
631pub struct QueryContractHistoryRequest {
632 #[prost(string, tag = "1")]
634 pub address: ::prost::alloc::string::String,
635 #[prost(message, optional, tag = "2")]
637 pub pagination:
638 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
639}
640#[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 #[prost(message, optional, tag = "2")]
649 pub pagination:
650 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
651}
652#[allow(clippy::derive_partial_eq_without_eq)]
655#[derive(Clone, PartialEq, ::prost::Message)]
656pub struct QueryContractsByCodeRequest {
657 #[prost(uint64, tag = "1")]
659 pub code_id: u64,
660 #[prost(message, optional, tag = "2")]
662 pub pagination:
663 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
664}
665#[allow(clippy::derive_partial_eq_without_eq)]
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct QueryContractsByCodeResponse {
670 #[prost(string, repeated, tag = "1")]
672 pub contracts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
673 #[prost(message, optional, tag = "2")]
675 pub pagination:
676 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
677}
678#[allow(clippy::derive_partial_eq_without_eq)]
681#[derive(Clone, PartialEq, ::prost::Message)]
682pub struct QueryAllContractStateRequest {
683 #[prost(string, tag = "1")]
685 pub address: ::prost::alloc::string::String,
686 #[prost(message, optional, tag = "2")]
688 pub pagination:
689 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
690}
691#[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 #[prost(message, optional, tag = "2")]
700 pub pagination:
701 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
702}
703#[allow(clippy::derive_partial_eq_without_eq)]
706#[derive(Clone, PartialEq, ::prost::Message)]
707pub struct QueryRawContractStateRequest {
708 #[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#[allow(clippy::derive_partial_eq_without_eq)]
717#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct QueryRawContractStateResponse {
719 #[prost(bytes = "vec", tag = "1")]
721 pub data: ::prost::alloc::vec::Vec<u8>,
722}
723#[allow(clippy::derive_partial_eq_without_eq)]
726#[derive(Clone, PartialEq, ::prost::Message)]
727pub struct QuerySmartContractStateRequest {
728 #[prost(string, tag = "1")]
730 pub address: ::prost::alloc::string::String,
731 #[prost(bytes = "vec", tag = "2")]
733 pub query_data: ::prost::alloc::vec::Vec<u8>,
734}
735#[allow(clippy::derive_partial_eq_without_eq)]
738#[derive(Clone, PartialEq, ::prost::Message)]
739pub struct QuerySmartContractStateResponse {
740 #[prost(bytes = "vec", tag = "1")]
742 pub data: ::prost::alloc::vec::Vec<u8>,
743}
744#[allow(clippy::derive_partial_eq_without_eq)]
746#[derive(Clone, PartialEq, ::prost::Message)]
747pub struct QueryCodeRequest {
748 #[prost(uint64, tag = "1")]
750 pub code_id: u64,
751}
752#[allow(clippy::derive_partial_eq_without_eq)]
754#[derive(Clone, PartialEq, ::prost::Message)]
755pub struct CodeInfoResponse {
756 #[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
777#[derive(Clone, PartialEq, ::prost::Message)]
778pub struct QueryCodesRequest {
779 #[prost(message, optional, tag = "1")]
781 pub pagination:
782 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
783}
784#[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 #[prost(message, optional, tag = "2")]
792 pub pagination:
793 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
794}
795#[allow(clippy::derive_partial_eq_without_eq)]
798#[derive(Clone, PartialEq, ::prost::Message)]
799pub struct QueryPinnedCodesRequest {
800 #[prost(message, optional, tag = "2")]
802 pub pagination:
803 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
804}
805#[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 #[prost(message, optional, tag = "2")]
814 pub pagination:
815 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
816}
817#[allow(clippy::derive_partial_eq_without_eq)]
819#[derive(Clone, PartialEq, ::prost::Message)]
820pub struct QueryParamsRequest {}
821#[allow(clippy::derive_partial_eq_without_eq)]
823#[derive(Clone, PartialEq, ::prost::Message)]
824pub struct QueryParamsResponse {
825 #[prost(message, optional, tag = "1")]
827 pub params: ::core::option::Option<Params>,
828}
829#[allow(clippy::derive_partial_eq_without_eq)]
832#[derive(Clone, PartialEq, ::prost::Message)]
833pub struct QueryContractsByCreatorRequest {
834 #[prost(string, tag = "1")]
836 pub creator_address: ::prost::alloc::string::String,
837 #[prost(message, optional, tag = "2")]
839 pub pagination:
840 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
841}
842#[allow(clippy::derive_partial_eq_without_eq)]
845#[derive(Clone, PartialEq, ::prost::Message)]
846pub struct QueryContractsByCreatorResponse {
847 #[prost(string, repeated, tag = "1")]
849 pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
850 #[prost(message, optional, tag = "2")]
852 pub pagination:
853 ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
854}
855#[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 #[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 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 #[must_use]
918 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
919 self.inner = self.inner.send_compressed(encoding);
920 self
921 }
922 #[must_use]
924 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
925 self.inner = self.inner.accept_compressed(encoding);
926 self
927 }
928 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 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 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 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 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 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 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 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 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 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 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#[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 #[async_trait]
1111 pub trait Query: Send + Sync + 'static {
1112 async fn contract_info(
1114 &self,
1115 request: tonic::Request<super::QueryContractInfoRequest>,
1116 ) -> Result<tonic::Response<super::QueryContractInfoResponse>, tonic::Status>;
1117 async fn contract_history(
1119 &self,
1120 request: tonic::Request<super::QueryContractHistoryRequest>,
1121 ) -> Result<tonic::Response<super::QueryContractHistoryResponse>, tonic::Status>;
1122 async fn contracts_by_code(
1124 &self,
1125 request: tonic::Request<super::QueryContractsByCodeRequest>,
1126 ) -> Result<tonic::Response<super::QueryContractsByCodeResponse>, tonic::Status>;
1127 async fn all_contract_state(
1129 &self,
1130 request: tonic::Request<super::QueryAllContractStateRequest>,
1131 ) -> Result<tonic::Response<super::QueryAllContractStateResponse>, tonic::Status>;
1132 async fn raw_contract_state(
1134 &self,
1135 request: tonic::Request<super::QueryRawContractStateRequest>,
1136 ) -> Result<tonic::Response<super::QueryRawContractStateResponse>, tonic::Status>;
1137 async fn smart_contract_state(
1139 &self,
1140 request: tonic::Request<super::QuerySmartContractStateRequest>,
1141 ) -> Result<tonic::Response<super::QuerySmartContractStateResponse>, tonic::Status>;
1142 async fn code(
1144 &self,
1145 request: tonic::Request<super::QueryCodeRequest>,
1146 ) -> Result<tonic::Response<super::QueryCodeResponse>, tonic::Status>;
1147 async fn codes(
1149 &self,
1150 request: tonic::Request<super::QueryCodesRequest>,
1151 ) -> Result<tonic::Response<super::QueryCodesResponse>, tonic::Status>;
1152 async fn pinned_codes(
1154 &self,
1155 request: tonic::Request<super::QueryPinnedCodesRequest>,
1156 ) -> Result<tonic::Response<super::QueryPinnedCodesResponse>, tonic::Status>;
1157 async fn params(
1159 &self,
1160 request: tonic::Request<super::QueryParamsRequest>,
1161 ) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status>;
1162 async fn contracts_by_creator(
1164 &self,
1165 request: tonic::Request<super::QueryContractsByCreatorRequest>,
1166 ) -> Result<tonic::Response<super::QueryContractsByCreatorResponse>, tonic::Status>;
1167 }
1168 #[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 #[must_use]
1196 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1197 self.accept_compression_encodings.enable(encoding);
1198 self
1199 }
1200 #[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#[allow(clippy::derive_partial_eq_without_eq)]
1614#[derive(Clone, PartialEq, ::prost::Message)]
1615pub struct MsgStoreCode {
1616 #[prost(string, tag = "1")]
1618 pub sender: ::prost::alloc::string::String,
1619 #[prost(bytes = "vec", tag = "2")]
1621 pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
1622 #[prost(message, optional, tag = "5")]
1625 pub instantiate_permission: ::core::option::Option<AccessConfig>,
1626}
1627#[allow(clippy::derive_partial_eq_without_eq)]
1629#[derive(Clone, PartialEq, ::prost::Message)]
1630pub struct MsgStoreCodeResponse {
1631 #[prost(uint64, tag = "1")]
1633 pub code_id: u64,
1634 #[prost(bytes = "vec", tag = "2")]
1636 pub checksum: ::prost::alloc::vec::Vec<u8>,
1637}
1638#[allow(clippy::derive_partial_eq_without_eq)]
1641#[derive(Clone, PartialEq, ::prost::Message)]
1642pub struct MsgInstantiateContract {
1643 #[prost(string, tag = "1")]
1645 pub sender: ::prost::alloc::string::String,
1646 #[prost(string, tag = "2")]
1648 pub admin: ::prost::alloc::string::String,
1649 #[prost(uint64, tag = "3")]
1651 pub code_id: u64,
1652 #[prost(string, tag = "4")]
1654 pub label: ::prost::alloc::string::String,
1655 #[prost(bytes = "vec", tag = "5")]
1657 pub msg: ::prost::alloc::vec::Vec<u8>,
1658 #[prost(message, repeated, tag = "6")]
1660 pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
1661}
1662#[allow(clippy::derive_partial_eq_without_eq)]
1664#[derive(Clone, PartialEq, ::prost::Message)]
1665pub struct MsgInstantiateContractResponse {
1666 #[prost(string, tag = "1")]
1668 pub address: ::prost::alloc::string::String,
1669 #[prost(bytes = "vec", tag = "2")]
1671 pub data: ::prost::alloc::vec::Vec<u8>,
1672}
1673#[allow(clippy::derive_partial_eq_without_eq)]
1676#[derive(Clone, PartialEq, ::prost::Message)]
1677pub struct MsgInstantiateContract2 {
1678 #[prost(string, tag = "1")]
1680 pub sender: ::prost::alloc::string::String,
1681 #[prost(string, tag = "2")]
1683 pub admin: ::prost::alloc::string::String,
1684 #[prost(uint64, tag = "3")]
1686 pub code_id: u64,
1687 #[prost(string, tag = "4")]
1689 pub label: ::prost::alloc::string::String,
1690 #[prost(bytes = "vec", tag = "5")]
1692 pub msg: ::prost::alloc::vec::Vec<u8>,
1693 #[prost(message, repeated, tag = "6")]
1695 pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
1696 #[prost(bytes = "vec", tag = "7")]
1698 pub salt: ::prost::alloc::vec::Vec<u8>,
1699 #[prost(bool, tag = "8")]
1702 pub fix_msg: bool,
1703}
1704#[allow(clippy::derive_partial_eq_without_eq)]
1706#[derive(Clone, PartialEq, ::prost::Message)]
1707pub struct MsgInstantiateContract2Response {
1708 #[prost(string, tag = "1")]
1710 pub address: ::prost::alloc::string::String,
1711 #[prost(bytes = "vec", tag = "2")]
1713 pub data: ::prost::alloc::vec::Vec<u8>,
1714}
1715#[allow(clippy::derive_partial_eq_without_eq)]
1717#[derive(Clone, PartialEq, ::prost::Message)]
1718pub struct MsgExecuteContract {
1719 #[prost(string, tag = "1")]
1721 pub sender: ::prost::alloc::string::String,
1722 #[prost(string, tag = "2")]
1724 pub contract: ::prost::alloc::string::String,
1725 #[prost(bytes = "vec", tag = "3")]
1727 pub msg: ::prost::alloc::vec::Vec<u8>,
1728 #[prost(message, repeated, tag = "5")]
1730 pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
1731}
1732#[allow(clippy::derive_partial_eq_without_eq)]
1734#[derive(Clone, PartialEq, ::prost::Message)]
1735pub struct MsgExecuteContractResponse {
1736 #[prost(bytes = "vec", tag = "1")]
1738 pub data: ::prost::alloc::vec::Vec<u8>,
1739}
1740#[allow(clippy::derive_partial_eq_without_eq)]
1742#[derive(Clone, PartialEq, ::prost::Message)]
1743pub struct MsgMigrateContract {
1744 #[prost(string, tag = "1")]
1746 pub sender: ::prost::alloc::string::String,
1747 #[prost(string, tag = "2")]
1749 pub contract: ::prost::alloc::string::String,
1750 #[prost(uint64, tag = "3")]
1752 pub code_id: u64,
1753 #[prost(bytes = "vec", tag = "4")]
1755 pub msg: ::prost::alloc::vec::Vec<u8>,
1756}
1757#[allow(clippy::derive_partial_eq_without_eq)]
1759#[derive(Clone, PartialEq, ::prost::Message)]
1760pub struct MsgMigrateContractResponse {
1761 #[prost(bytes = "vec", tag = "1")]
1764 pub data: ::prost::alloc::vec::Vec<u8>,
1765}
1766#[allow(clippy::derive_partial_eq_without_eq)]
1768#[derive(Clone, PartialEq, ::prost::Message)]
1769pub struct MsgUpdateAdmin {
1770 #[prost(string, tag = "1")]
1772 pub sender: ::prost::alloc::string::String,
1773 #[prost(string, tag = "2")]
1775 pub new_admin: ::prost::alloc::string::String,
1776 #[prost(string, tag = "3")]
1778 pub contract: ::prost::alloc::string::String,
1779}
1780#[allow(clippy::derive_partial_eq_without_eq)]
1782#[derive(Clone, PartialEq, ::prost::Message)]
1783pub struct MsgUpdateAdminResponse {}
1784#[allow(clippy::derive_partial_eq_without_eq)]
1786#[derive(Clone, PartialEq, ::prost::Message)]
1787pub struct MsgClearAdmin {
1788 #[prost(string, tag = "1")]
1790 pub sender: ::prost::alloc::string::String,
1791 #[prost(string, tag = "3")]
1793 pub contract: ::prost::alloc::string::String,
1794}
1795#[allow(clippy::derive_partial_eq_without_eq)]
1797#[derive(Clone, PartialEq, ::prost::Message)]
1798pub struct MsgClearAdminResponse {}
1799#[allow(clippy::derive_partial_eq_without_eq)]
1801#[derive(Clone, PartialEq, ::prost::Message)]
1802pub struct MsgUpdateInstantiateConfig {
1803 #[prost(string, tag = "1")]
1805 pub sender: ::prost::alloc::string::String,
1806 #[prost(uint64, tag = "2")]
1808 pub code_id: u64,
1809 #[prost(message, optional, tag = "3")]
1811 pub new_instantiate_permission: ::core::option::Option<AccessConfig>,
1812}
1813#[allow(clippy::derive_partial_eq_without_eq)]
1815#[derive(Clone, PartialEq, ::prost::Message)]
1816pub struct MsgUpdateInstantiateConfigResponse {}
1817#[allow(clippy::derive_partial_eq_without_eq)]
1821#[derive(Clone, PartialEq, ::prost::Message)]
1822pub struct MsgUpdateParams {
1823 #[prost(string, tag = "1")]
1825 pub authority: ::prost::alloc::string::String,
1826 #[prost(message, optional, tag = "2")]
1830 pub params: ::core::option::Option<Params>,
1831}
1832#[allow(clippy::derive_partial_eq_without_eq)]
1837#[derive(Clone, PartialEq, ::prost::Message)]
1838pub struct MsgUpdateParamsResponse {}
1839#[allow(clippy::derive_partial_eq_without_eq)]
1843#[derive(Clone, PartialEq, ::prost::Message)]
1844pub struct MsgSudoContract {
1845 #[prost(string, tag = "1")]
1847 pub authority: ::prost::alloc::string::String,
1848 #[prost(string, tag = "2")]
1850 pub contract: ::prost::alloc::string::String,
1851 #[prost(bytes = "vec", tag = "3")]
1853 pub msg: ::prost::alloc::vec::Vec<u8>,
1854}
1855#[allow(clippy::derive_partial_eq_without_eq)]
1860#[derive(Clone, PartialEq, ::prost::Message)]
1861pub struct MsgSudoContractResponse {
1862 #[prost(bytes = "vec", tag = "1")]
1864 pub data: ::prost::alloc::vec::Vec<u8>,
1865}
1866#[allow(clippy::derive_partial_eq_without_eq)]
1870#[derive(Clone, PartialEq, ::prost::Message)]
1871pub struct MsgPinCodes {
1872 #[prost(string, tag = "1")]
1874 pub authority: ::prost::alloc::string::String,
1875 #[prost(uint64, repeated, packed = "false", tag = "2")]
1877 pub code_ids: ::prost::alloc::vec::Vec<u64>,
1878}
1879#[allow(clippy::derive_partial_eq_without_eq)]
1884#[derive(Clone, PartialEq, ::prost::Message)]
1885pub struct MsgPinCodesResponse {}
1886#[allow(clippy::derive_partial_eq_without_eq)]
1890#[derive(Clone, PartialEq, ::prost::Message)]
1891pub struct MsgUnpinCodes {
1892 #[prost(string, tag = "1")]
1894 pub authority: ::prost::alloc::string::String,
1895 #[prost(uint64, repeated, packed = "false", tag = "2")]
1897 pub code_ids: ::prost::alloc::vec::Vec<u64>,
1898}
1899#[allow(clippy::derive_partial_eq_without_eq)]
1904#[derive(Clone, PartialEq, ::prost::Message)]
1905pub struct MsgUnpinCodesResponse {}
1906#[allow(clippy::derive_partial_eq_without_eq)]
1911#[derive(Clone, PartialEq, ::prost::Message)]
1912pub struct MsgStoreAndInstantiateContract {
1913 #[prost(string, tag = "1")]
1915 pub authority: ::prost::alloc::string::String,
1916 #[prost(bytes = "vec", tag = "3")]
1918 pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
1919 #[prost(message, optional, tag = "4")]
1921 pub instantiate_permission: ::core::option::Option<AccessConfig>,
1922 #[prost(bool, tag = "5")]
1925 pub unpin_code: bool,
1926 #[prost(string, tag = "6")]
1928 pub admin: ::prost::alloc::string::String,
1929 #[prost(string, tag = "7")]
1931 pub label: ::prost::alloc::string::String,
1932 #[prost(bytes = "vec", tag = "8")]
1934 pub msg: ::prost::alloc::vec::Vec<u8>,
1935 #[prost(message, repeated, tag = "9")]
1938 pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
1939 #[prost(string, tag = "10")]
1941 pub source: ::prost::alloc::string::String,
1942 #[prost(string, tag = "11")]
1945 pub builder: ::prost::alloc::string::String,
1946 #[prost(bytes = "vec", tag = "12")]
1949 pub code_hash: ::prost::alloc::vec::Vec<u8>,
1950}
1951#[allow(clippy::derive_partial_eq_without_eq)]
1956#[derive(Clone, PartialEq, ::prost::Message)]
1957pub struct MsgStoreAndInstantiateContractResponse {
1958 #[prost(string, tag = "1")]
1960 pub address: ::prost::alloc::string::String,
1961 #[prost(bytes = "vec", tag = "2")]
1963 pub data: ::prost::alloc::vec::Vec<u8>,
1964}
1965#[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 #[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 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 #[must_use]
2025 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2026 self.inner = self.inner.send_compressed(encoding);
2027 self
2028 }
2029 #[must_use]
2031 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2032 self.inner = self.inner.accept_compressed(encoding);
2033 self
2034 }
2035 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 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 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 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 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 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 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 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 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 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 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 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 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#[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 #[async_trait]
2268 pub trait Msg: Send + Sync + 'static {
2269 async fn store_code(
2271 &self,
2272 request: tonic::Request<super::MsgStoreCode>,
2273 ) -> Result<tonic::Response<super::MsgStoreCodeResponse>, tonic::Status>;
2274 async fn instantiate_contract(
2277 &self,
2278 request: tonic::Request<super::MsgInstantiateContract>,
2279 ) -> Result<tonic::Response<super::MsgInstantiateContractResponse>, tonic::Status>;
2280 async fn instantiate_contract2(
2283 &self,
2284 request: tonic::Request<super::MsgInstantiateContract2>,
2285 ) -> Result<tonic::Response<super::MsgInstantiateContract2Response>, tonic::Status>;
2286 async fn execute_contract(
2288 &self,
2289 request: tonic::Request<super::MsgExecuteContract>,
2290 ) -> Result<tonic::Response<super::MsgExecuteContractResponse>, tonic::Status>;
2291 async fn migrate_contract(
2293 &self,
2294 request: tonic::Request<super::MsgMigrateContract>,
2295 ) -> Result<tonic::Response<super::MsgMigrateContractResponse>, tonic::Status>;
2296 async fn update_admin(
2298 &self,
2299 request: tonic::Request<super::MsgUpdateAdmin>,
2300 ) -> Result<tonic::Response<super::MsgUpdateAdminResponse>, tonic::Status>;
2301 async fn clear_admin(
2303 &self,
2304 request: tonic::Request<super::MsgClearAdmin>,
2305 ) -> Result<tonic::Response<super::MsgClearAdminResponse>, tonic::Status>;
2306 async fn update_instantiate_config(
2308 &self,
2309 request: tonic::Request<super::MsgUpdateInstantiateConfig>,
2310 ) -> Result<tonic::Response<super::MsgUpdateInstantiateConfigResponse>, tonic::Status>;
2311 async fn update_params(
2316 &self,
2317 request: tonic::Request<super::MsgUpdateParams>,
2318 ) -> Result<tonic::Response<super::MsgUpdateParamsResponse>, tonic::Status>;
2319 async fn sudo_contract(
2324 &self,
2325 request: tonic::Request<super::MsgSudoContract>,
2326 ) -> Result<tonic::Response<super::MsgSudoContractResponse>, tonic::Status>;
2327 async fn pin_codes(
2332 &self,
2333 request: tonic::Request<super::MsgPinCodes>,
2334 ) -> Result<tonic::Response<super::MsgPinCodesResponse>, tonic::Status>;
2335 async fn unpin_codes(
2340 &self,
2341 request: tonic::Request<super::MsgUnpinCodes>,
2342 ) -> Result<tonic::Response<super::MsgUnpinCodesResponse>, tonic::Status>;
2343 async fn store_and_instantiate_contract(
2348 &self,
2349 request: tonic::Request<super::MsgStoreAndInstantiateContract>,
2350 ) -> Result<tonic::Response<super::MsgStoreAndInstantiateContractResponse>, tonic::Status>;
2351 }
2352 #[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 #[must_use]
2380 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2381 self.accept_compression_encodings.enable(encoding);
2382 self
2383 }
2384 #[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#[allow(clippy::derive_partial_eq_without_eq)]
2858#[derive(Clone, PartialEq, ::prost::Message)]
2859pub struct ContractExecutionAuthorization {
2860 #[prost(message, repeated, tag = "1")]
2862 pub grants: ::prost::alloc::vec::Vec<ContractGrant>,
2863}
2864#[allow(clippy::derive_partial_eq_without_eq)]
2867#[derive(Clone, PartialEq, ::prost::Message)]
2868pub struct ContractMigrationAuthorization {
2869 #[prost(message, repeated, tag = "1")]
2871 pub grants: ::prost::alloc::vec::Vec<ContractGrant>,
2872}
2873#[allow(clippy::derive_partial_eq_without_eq)]
2876#[derive(Clone, PartialEq, ::prost::Message)]
2877pub struct ContractGrant {
2878 #[prost(string, tag = "1")]
2880 pub contract: ::prost::alloc::string::String,
2881 #[prost(message, optional, tag = "2")]
2884 pub limit: ::core::option::Option<::prost_types::Any>,
2885 #[prost(message, optional, tag = "3")]
2889 pub filter: ::core::option::Option<::prost_types::Any>,
2890}
2891#[allow(clippy::derive_partial_eq_without_eq)]
2894#[derive(Clone, PartialEq, ::prost::Message)]
2895pub struct MaxCallsLimit {
2896 #[prost(uint64, tag = "1")]
2898 pub remaining: u64,
2899}
2900#[allow(clippy::derive_partial_eq_without_eq)]
2903#[derive(Clone, PartialEq, ::prost::Message)]
2904pub struct MaxFundsLimit {
2905 #[prost(message, repeated, tag = "1")]
2907 pub amounts: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
2908}
2909#[allow(clippy::derive_partial_eq_without_eq)]
2913#[derive(Clone, PartialEq, ::prost::Message)]
2914pub struct CombinedLimit {
2915 #[prost(uint64, tag = "1")]
2917 pub calls_remaining: u64,
2918 #[prost(message, repeated, tag = "2")]
2920 pub amounts: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
2921}
2922#[allow(clippy::derive_partial_eq_without_eq)]
2926#[derive(Clone, PartialEq, ::prost::Message)]
2927pub struct AllowAllMessagesFilter {}
2928#[allow(clippy::derive_partial_eq_without_eq)]
2932#[derive(Clone, PartialEq, ::prost::Message)]
2933pub struct AcceptedMessageKeysFilter {
2934 #[prost(string, repeated, tag = "1")]
2936 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2937}
2938#[allow(clippy::derive_partial_eq_without_eq)]
2942#[derive(Clone, PartialEq, ::prost::Message)]
2943pub struct AcceptedMessagesFilter {
2944 #[prost(bytes = "vec", repeated, tag = "1")]
2946 pub messages: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
2947}