elys_std/types/elys/
assetprofile.rs

1use elys_std_deriv::CosmwasmExt;
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(
4    Clone,
5    PartialEq,
6    Eq,
7    ::prost::Message,
8    ::serde::Serialize,
9    ::serde::Deserialize,
10    ::schemars::JsonSchema,
11    CosmwasmExt,
12)]
13#[proto_message(type_url = "/elys.assetprofile.Entry")]
14pub struct Entry {
15    #[prost(string, tag = "1")]
16    pub base_denom: ::prost::alloc::string::String,
17    #[prost(uint64, tag = "2")]
18    #[serde(
19        serialize_with = "crate::serde::as_str::serialize",
20        deserialize_with = "crate::serde::as_str::deserialize"
21    )]
22    pub decimals: u64,
23    #[prost(string, tag = "3")]
24    pub denom: ::prost::alloc::string::String,
25    #[prost(string, tag = "4")]
26    pub path: ::prost::alloc::string::String,
27    #[prost(string, tag = "5")]
28    #[serde(alias = "ibc_channelID")]
29    pub ibc_channel_id: ::prost::alloc::string::String,
30    #[prost(string, tag = "6")]
31    #[serde(alias = "ibc_counterparty_channelID")]
32    pub ibc_counterparty_channel_id: ::prost::alloc::string::String,
33    #[prost(string, tag = "7")]
34    pub display_name: ::prost::alloc::string::String,
35    #[prost(string, tag = "8")]
36    pub display_symbol: ::prost::alloc::string::String,
37    #[prost(string, tag = "9")]
38    pub network: ::prost::alloc::string::String,
39    #[prost(string, tag = "10")]
40    pub address: ::prost::alloc::string::String,
41    #[prost(string, tag = "11")]
42    pub external_symbol: ::prost::alloc::string::String,
43    #[prost(string, tag = "12")]
44    pub transfer_limit: ::prost::alloc::string::String,
45    #[prost(string, repeated, tag = "13")]
46    pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
47    #[prost(string, tag = "14")]
48    pub unit_denom: ::prost::alloc::string::String,
49    #[prost(string, tag = "15")]
50    pub ibc_counterparty_denom: ::prost::alloc::string::String,
51    #[prost(string, tag = "16")]
52    #[serde(alias = "ibc_counterparty_chainID")]
53    pub ibc_counterparty_chain_id: ::prost::alloc::string::String,
54    #[prost(string, tag = "17")]
55    pub authority: ::prost::alloc::string::String,
56    #[prost(bool, tag = "18")]
57    pub commit_enabled: bool,
58    #[prost(bool, tag = "19")]
59    pub withdraw_enabled: bool,
60}
61/// Params defines the parameters for the module.
62#[allow(clippy::derive_partial_eq_without_eq)]
63#[derive(
64    Clone,
65    PartialEq,
66    Eq,
67    ::prost::Message,
68    ::serde::Serialize,
69    ::serde::Deserialize,
70    ::schemars::JsonSchema,
71    CosmwasmExt,
72)]
73#[proto_message(type_url = "/elys.assetprofile.Params")]
74pub struct Params {}
75/// GenesisState defines the assetprofile module's genesis state.
76#[allow(clippy::derive_partial_eq_without_eq)]
77#[derive(
78    Clone,
79    PartialEq,
80    Eq,
81    ::prost::Message,
82    ::serde::Serialize,
83    ::serde::Deserialize,
84    ::schemars::JsonSchema,
85    CosmwasmExt,
86)]
87#[proto_message(type_url = "/elys.assetprofile.GenesisState")]
88pub struct GenesisState {
89    #[prost(message, optional, tag = "1")]
90    pub params: ::core::option::Option<Params>,
91    #[prost(message, repeated, tag = "2")]
92    pub entry_list: ::prost::alloc::vec::Vec<Entry>,
93}
94/// QueryParamsRequest is request type for the Query/Params RPC method.
95#[allow(clippy::derive_partial_eq_without_eq)]
96#[derive(
97    Clone,
98    PartialEq,
99    Eq,
100    ::prost::Message,
101    ::serde::Serialize,
102    ::serde::Deserialize,
103    ::schemars::JsonSchema,
104    CosmwasmExt,
105)]
106#[proto_message(type_url = "/elys.assetprofile.QueryParamsRequest")]
107#[proto_query(
108    path = "/elys.assetprofile.Query/Params",
109    response_type = QueryParamsResponse
110)]
111pub struct QueryParamsRequest {}
112/// QueryParamsResponse is response type for the Query/Params RPC method.
113#[allow(clippy::derive_partial_eq_without_eq)]
114#[derive(
115    Clone,
116    PartialEq,
117    Eq,
118    ::prost::Message,
119    ::serde::Serialize,
120    ::serde::Deserialize,
121    ::schemars::JsonSchema,
122    CosmwasmExt,
123)]
124#[proto_message(type_url = "/elys.assetprofile.QueryParamsResponse")]
125pub struct QueryParamsResponse {
126    /// params holds all the parameters of this module.
127    #[prost(message, optional, tag = "1")]
128    pub params: ::core::option::Option<Params>,
129}
130#[allow(clippy::derive_partial_eq_without_eq)]
131#[derive(
132    Clone,
133    PartialEq,
134    Eq,
135    ::prost::Message,
136    ::serde::Serialize,
137    ::serde::Deserialize,
138    ::schemars::JsonSchema,
139    CosmwasmExt,
140)]
141#[proto_message(type_url = "/elys.assetprofile.QueryEntryRequest")]
142#[proto_query(
143    path = "/elys.assetprofile.Query/Entry",
144    response_type = QueryEntryResponse
145)]
146pub struct QueryEntryRequest {
147    #[prost(string, tag = "1")]
148    pub base_denom: ::prost::alloc::string::String,
149}
150#[allow(clippy::derive_partial_eq_without_eq)]
151#[derive(
152    Clone,
153    PartialEq,
154    Eq,
155    ::prost::Message,
156    ::serde::Serialize,
157    ::serde::Deserialize,
158    ::schemars::JsonSchema,
159    CosmwasmExt,
160)]
161#[proto_message(type_url = "/elys.assetprofile.QueryEntryByDenomRequest")]
162#[proto_query(
163    path = "/elys.assetprofile.Query/EntryByDenom",
164    response_type = QueryEntryByDenomResponse
165)]
166pub struct QueryEntryByDenomRequest {
167    #[prost(string, tag = "1")]
168    pub denom: ::prost::alloc::string::String,
169}
170#[allow(clippy::derive_partial_eq_without_eq)]
171#[derive(
172    Clone,
173    PartialEq,
174    Eq,
175    ::prost::Message,
176    ::serde::Serialize,
177    ::serde::Deserialize,
178    ::schemars::JsonSchema,
179    CosmwasmExt,
180)]
181#[proto_message(type_url = "/elys.assetprofile.QueryEntryResponse")]
182pub struct QueryEntryResponse {
183    #[prost(message, optional, tag = "1")]
184    pub entry: ::core::option::Option<Entry>,
185}
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(
188    Clone,
189    PartialEq,
190    Eq,
191    ::prost::Message,
192    ::serde::Serialize,
193    ::serde::Deserialize,
194    ::schemars::JsonSchema,
195    CosmwasmExt,
196)]
197#[proto_message(type_url = "/elys.assetprofile.QueryEntryByDenomResponse")]
198pub struct QueryEntryByDenomResponse {
199    #[prost(message, optional, tag = "1")]
200    pub entry: ::core::option::Option<Entry>,
201}
202#[allow(clippy::derive_partial_eq_without_eq)]
203#[derive(
204    Clone,
205    PartialEq,
206    Eq,
207    ::prost::Message,
208    ::serde::Serialize,
209    ::serde::Deserialize,
210    ::schemars::JsonSchema,
211    CosmwasmExt,
212)]
213#[proto_message(type_url = "/elys.assetprofile.QueryAllEntryRequest")]
214#[proto_query(
215    path = "/elys.assetprofile.Query/EntryAll",
216    response_type = QueryAllEntryResponse
217)]
218pub struct QueryAllEntryRequest {
219    #[prost(message, optional, tag = "1")]
220    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
221}
222#[allow(clippy::derive_partial_eq_without_eq)]
223#[derive(
224    Clone,
225    PartialEq,
226    Eq,
227    ::prost::Message,
228    ::serde::Serialize,
229    ::serde::Deserialize,
230    ::schemars::JsonSchema,
231    CosmwasmExt,
232)]
233#[proto_message(type_url = "/elys.assetprofile.QueryAllEntryResponse")]
234pub struct QueryAllEntryResponse {
235    #[prost(message, repeated, tag = "1")]
236    pub entry: ::prost::alloc::vec::Vec<Entry>,
237    #[prost(message, optional, tag = "2")]
238    pub pagination:
239        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
240}
241#[allow(clippy::derive_partial_eq_without_eq)]
242#[derive(
243    Clone,
244    PartialEq,
245    Eq,
246    ::prost::Message,
247    ::serde::Serialize,
248    ::serde::Deserialize,
249    ::schemars::JsonSchema,
250    CosmwasmExt,
251)]
252#[proto_message(type_url = "/elys.assetprofile.MsgUpdateEntry")]
253pub struct MsgUpdateEntry {
254    #[prost(string, tag = "1")]
255    pub authority: ::prost::alloc::string::String,
256    #[prost(string, tag = "2")]
257    pub base_denom: ::prost::alloc::string::String,
258    #[prost(uint64, tag = "3")]
259    #[serde(
260        serialize_with = "crate::serde::as_str::serialize",
261        deserialize_with = "crate::serde::as_str::deserialize"
262    )]
263    pub decimals: u64,
264    #[prost(string, tag = "4")]
265    pub denom: ::prost::alloc::string::String,
266    #[prost(string, tag = "5")]
267    pub path: ::prost::alloc::string::String,
268    #[prost(string, tag = "6")]
269    #[serde(alias = "ibc_channelID")]
270    pub ibc_channel_id: ::prost::alloc::string::String,
271    #[prost(string, tag = "7")]
272    #[serde(alias = "ibc_counterparty_channelID")]
273    pub ibc_counterparty_channel_id: ::prost::alloc::string::String,
274    #[prost(string, tag = "8")]
275    pub display_name: ::prost::alloc::string::String,
276    #[prost(string, tag = "9")]
277    pub display_symbol: ::prost::alloc::string::String,
278    #[prost(string, tag = "10")]
279    pub network: ::prost::alloc::string::String,
280    #[prost(string, tag = "11")]
281    pub address: ::prost::alloc::string::String,
282    #[prost(string, tag = "12")]
283    pub external_symbol: ::prost::alloc::string::String,
284    #[prost(string, tag = "13")]
285    pub transfer_limit: ::prost::alloc::string::String,
286    #[prost(string, repeated, tag = "14")]
287    pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
288    #[prost(string, tag = "15")]
289    pub unit_denom: ::prost::alloc::string::String,
290    #[prost(string, tag = "16")]
291    pub ibc_counterparty_denom: ::prost::alloc::string::String,
292    #[prost(string, tag = "17")]
293    #[serde(alias = "ibc_counterparty_chainID")]
294    pub ibc_counterparty_chain_id: ::prost::alloc::string::String,
295    #[prost(bool, tag = "18")]
296    pub commit_enabled: bool,
297    #[prost(bool, tag = "19")]
298    pub withdraw_enabled: bool,
299}
300#[allow(clippy::derive_partial_eq_without_eq)]
301#[derive(
302    Clone,
303    PartialEq,
304    Eq,
305    ::prost::Message,
306    ::serde::Serialize,
307    ::serde::Deserialize,
308    ::schemars::JsonSchema,
309    CosmwasmExt,
310)]
311#[proto_message(type_url = "/elys.assetprofile.MsgUpdateEntryResponse")]
312pub struct MsgUpdateEntryResponse {}
313#[allow(clippy::derive_partial_eq_without_eq)]
314#[derive(
315    Clone,
316    PartialEq,
317    Eq,
318    ::prost::Message,
319    ::serde::Serialize,
320    ::serde::Deserialize,
321    ::schemars::JsonSchema,
322    CosmwasmExt,
323)]
324#[proto_message(type_url = "/elys.assetprofile.MsgDeleteEntry")]
325pub struct MsgDeleteEntry {
326    #[prost(string, tag = "1")]
327    pub authority: ::prost::alloc::string::String,
328    #[prost(string, tag = "2")]
329    pub base_denom: ::prost::alloc::string::String,
330}
331#[allow(clippy::derive_partial_eq_without_eq)]
332#[derive(
333    Clone,
334    PartialEq,
335    Eq,
336    ::prost::Message,
337    ::serde::Serialize,
338    ::serde::Deserialize,
339    ::schemars::JsonSchema,
340    CosmwasmExt,
341)]
342#[proto_message(type_url = "/elys.assetprofile.MsgDeleteEntryResponse")]
343pub struct MsgDeleteEntryResponse {}
344#[allow(clippy::derive_partial_eq_without_eq)]
345#[derive(
346    Clone,
347    PartialEq,
348    Eq,
349    ::prost::Message,
350    ::serde::Serialize,
351    ::serde::Deserialize,
352    ::schemars::JsonSchema,
353    CosmwasmExt,
354)]
355#[proto_message(type_url = "/elys.assetprofile.MsgAddEntry")]
356pub struct MsgAddEntry {
357    #[prost(string, tag = "1")]
358    pub creator: ::prost::alloc::string::String,
359    #[prost(string, tag = "2")]
360    pub base_denom: ::prost::alloc::string::String,
361    #[prost(uint64, tag = "3")]
362    #[serde(
363        serialize_with = "crate::serde::as_str::serialize",
364        deserialize_with = "crate::serde::as_str::deserialize"
365    )]
366    pub decimals: u64,
367    #[prost(string, tag = "4")]
368    pub denom: ::prost::alloc::string::String,
369    #[prost(string, tag = "5")]
370    pub path: ::prost::alloc::string::String,
371    #[prost(string, tag = "6")]
372    #[serde(alias = "ibc_channelID")]
373    pub ibc_channel_id: ::prost::alloc::string::String,
374    #[prost(string, tag = "7")]
375    #[serde(alias = "ibc_counterparty_channelID")]
376    pub ibc_counterparty_channel_id: ::prost::alloc::string::String,
377    #[prost(string, tag = "8")]
378    pub display_name: ::prost::alloc::string::String,
379    #[prost(string, tag = "9")]
380    pub display_symbol: ::prost::alloc::string::String,
381    #[prost(string, tag = "10")]
382    pub network: ::prost::alloc::string::String,
383    #[prost(string, tag = "11")]
384    pub address: ::prost::alloc::string::String,
385    #[prost(string, tag = "12")]
386    pub external_symbol: ::prost::alloc::string::String,
387    #[prost(string, tag = "13")]
388    pub transfer_limit: ::prost::alloc::string::String,
389    #[prost(string, repeated, tag = "14")]
390    pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
391    #[prost(string, tag = "15")]
392    pub unit_denom: ::prost::alloc::string::String,
393    #[prost(string, tag = "16")]
394    pub ibc_counterparty_denom: ::prost::alloc::string::String,
395    #[prost(string, tag = "17")]
396    #[serde(alias = "ibc_counterparty_chainID")]
397    pub ibc_counterparty_chain_id: ::prost::alloc::string::String,
398    #[prost(bool, tag = "18")]
399    pub commit_enabled: bool,
400    #[prost(bool, tag = "19")]
401    pub withdraw_enabled: bool,
402}
403#[allow(clippy::derive_partial_eq_without_eq)]
404#[derive(
405    Clone,
406    PartialEq,
407    Eq,
408    ::prost::Message,
409    ::serde::Serialize,
410    ::serde::Deserialize,
411    ::schemars::JsonSchema,
412    CosmwasmExt,
413)]
414#[proto_message(type_url = "/elys.assetprofile.MsgAddEntryResponse")]
415pub struct MsgAddEntryResponse {}
416pub struct AssetprofileQuerier<'a, Q: cosmwasm_std::CustomQuery> {
417    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
418}
419impl<'a, Q: cosmwasm_std::CustomQuery> AssetprofileQuerier<'a, Q> {
420    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
421        Self { querier }
422    }
423    pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
424        QueryParamsRequest {}.query(self.querier)
425    }
426    pub fn entry(
427        &self,
428        base_denom: ::prost::alloc::string::String,
429    ) -> Result<QueryEntryResponse, cosmwasm_std::StdError> {
430        QueryEntryRequest { base_denom }.query(self.querier)
431    }
432    pub fn entry_by_denom(
433        &self,
434        denom: ::prost::alloc::string::String,
435    ) -> Result<QueryEntryByDenomResponse, cosmwasm_std::StdError> {
436        QueryEntryByDenomRequest { denom }.query(self.querier)
437    }
438    pub fn entry_all(
439        &self,
440        pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
441    ) -> Result<QueryAllEntryResponse, cosmwasm_std::StdError> {
442        QueryAllEntryRequest { pagination }.query(self.querier)
443    }
444}