desmos_bindings/proto/desmos/tokenfactory/
v1.rs

1/// Params defines the parameters for the tokenfactory module.
2///
3/// Since: Desmos 6.0.0
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(
6    Clone,
7    PartialEq,
8    ::prost::Message,
9    schemars::JsonSchema,
10    serde::Serialize,
11    serde::Deserialize,
12    desmos_std_derive::CosmwasmExt,
13)]
14#[proto_message(type_url = "/desmos.tokenfactory.v1.Params")]
15#[serde(rename_all = "snake_case")]
16pub struct Params {
17    /// DenomCreationFee defines the fee to be charged on the creation of a new
18    /// denom. The fee is drawn from the subspace treasury account, and
19    /// burned.
20    #[prost(message, repeated, tag = "1")]
21    pub denom_creation_fee:
22        ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
23}
24/// DenomAuthorityMetadata contains the metadata for a single token denom.
25#[allow(clippy::derive_partial_eq_without_eq)]
26#[derive(
27    Clone,
28    PartialEq,
29    ::prost::Message,
30    schemars::JsonSchema,
31    serde::Serialize,
32    serde::Deserialize,
33    desmos_std_derive::CosmwasmExt,
34)]
35#[proto_message(type_url = "/desmos.tokenfactory.v1.DenomAuthorityMetadata")]
36#[serde(rename_all = "snake_case")]
37pub struct DenomAuthorityMetadata {
38    /// Admin of the denomination.
39    /// Can be empty for no admin, or a valid Desmos address
40    #[prost(string, tag = "1")]
41    pub admin: ::prost::alloc::string::String,
42}
43/// GenesisState defines the tokenfactory module's genesis state.
44#[allow(clippy::derive_partial_eq_without_eq)]
45#[derive(
46    Clone,
47    PartialEq,
48    ::prost::Message,
49    schemars::JsonSchema,
50    serde::Serialize,
51    serde::Deserialize,
52    desmos_std_derive::CosmwasmExt,
53)]
54#[proto_message(type_url = "/desmos.tokenfactory.v1.GenesisState")]
55#[serde(rename_all = "snake_case")]
56pub struct GenesisState {
57    /// params defines the paramaters of the module.
58    #[prost(message, optional, tag = "1")]
59    pub params: ::core::option::Option<Params>,
60    #[prost(message, repeated, tag = "2")]
61    pub factory_denoms: ::prost::alloc::vec::Vec<GenesisDenom>,
62}
63/// GenesisDenom defines a tokenfactory denom that is defined within genesis
64/// state. The structure contains DenomAuthorityMetadata which defines the
65/// denom's admin.
66#[allow(clippy::derive_partial_eq_without_eq)]
67#[derive(
68    Clone,
69    PartialEq,
70    ::prost::Message,
71    schemars::JsonSchema,
72    serde::Serialize,
73    serde::Deserialize,
74    desmos_std_derive::CosmwasmExt,
75)]
76#[proto_message(type_url = "/desmos.tokenfactory.v1.GenesisDenom")]
77#[serde(rename_all = "snake_case")]
78pub struct GenesisDenom {
79    #[prost(string, tag = "1")]
80    pub denom: ::prost::alloc::string::String,
81    #[prost(message, optional, tag = "2")]
82    pub authority_metadata: ::core::option::Option<DenomAuthorityMetadata>,
83}
84/// MsgCreateDenom represents the message to be used to create a denom for
85/// subspace
86///
87/// Since: Desmos 6.0.0
88#[allow(clippy::derive_partial_eq_without_eq)]
89#[derive(
90    Clone,
91    PartialEq,
92    ::prost::Message,
93    schemars::JsonSchema,
94    serde::Serialize,
95    serde::Deserialize,
96    desmos_std_derive::CosmwasmExt,
97)]
98#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgCreateDenom")]
99#[serde(rename_all = "snake_case")]
100pub struct MsgCreateDenom {
101    /// Id of the subspace which manages the denom
102    #[prost(uint64, tag = "1")]
103    #[serde(
104        serialize_with = "crate::serde::as_str::serialize",
105        deserialize_with = "crate::serde::as_str::deserialize"
106    )]
107    pub subspace_id: u64,
108    /// Address of user having the permission to manage subspace denoms
109    #[prost(string, tag = "2")]
110    pub sender: ::prost::alloc::string::String,
111    /// Subdenom name of the creating denom
112    /// It can be up to 44 "alphanumeric" characters long
113    #[prost(string, tag = "3")]
114    pub subdenom: ::prost::alloc::string::String,
115}
116/// MsgCreateDenomResponse represents the Msg/CreateDenom response type
117/// It returns the full string of the newly created denom
118#[allow(clippy::derive_partial_eq_without_eq)]
119#[derive(
120    Clone,
121    PartialEq,
122    ::prost::Message,
123    schemars::JsonSchema,
124    serde::Serialize,
125    serde::Deserialize,
126    desmos_std_derive::CosmwasmExt,
127)]
128#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgCreateDenomResponse")]
129#[serde(rename_all = "snake_case")]
130pub struct MsgCreateDenomResponse {
131    /// Name of the newly created denom
132    #[prost(string, tag = "1")]
133    pub new_token_denom: ::prost::alloc::string::String,
134}
135/// MsgMint represents the message to be used to mint subspace tokens to treasury
136/// account
137///
138/// Since: Desmos 6.0.0
139#[allow(clippy::derive_partial_eq_without_eq)]
140#[derive(
141    Clone,
142    PartialEq,
143    ::prost::Message,
144    schemars::JsonSchema,
145    serde::Serialize,
146    serde::Deserialize,
147    desmos_std_derive::CosmwasmExt,
148)]
149#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgMint")]
150#[serde(rename_all = "snake_case")]
151pub struct MsgMint {
152    /// Id of the subspace which manages the denom
153    #[prost(uint64, tag = "1")]
154    #[serde(
155        serialize_with = "crate::serde::as_str::serialize",
156        deserialize_with = "crate::serde::as_str::deserialize"
157    )]
158    pub subspace_id: u64,
159    /// Address of user having the permission to manage subspace denoms
160    #[prost(string, tag = "2")]
161    pub sender: ::prost::alloc::string::String,
162    /// Amount of the minting subspace tokens
163    #[prost(message, optional, tag = "3")]
164    pub amount: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
165}
166/// MsgMintResponse represents the Msg/Mint response type
167///
168/// Since: Desmos 6.0.0
169#[allow(clippy::derive_partial_eq_without_eq)]
170#[derive(
171    Clone,
172    PartialEq,
173    ::prost::Message,
174    schemars::JsonSchema,
175    serde::Serialize,
176    serde::Deserialize,
177    desmos_std_derive::CosmwasmExt,
178)]
179#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgMintResponse")]
180#[serde(rename_all = "snake_case")]
181pub struct MsgMintResponse {}
182/// MsgBurn represents the message to be used to burn subspace tokens from
183/// treasury account
184///
185/// Since: Desmos 6.0.0
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(
188    Clone,
189    PartialEq,
190    ::prost::Message,
191    schemars::JsonSchema,
192    serde::Serialize,
193    serde::Deserialize,
194    desmos_std_derive::CosmwasmExt,
195)]
196#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgBurn")]
197#[serde(rename_all = "snake_case")]
198pub struct MsgBurn {
199    /// Id of the subspace which manages the denom
200    #[prost(uint64, tag = "1")]
201    #[serde(
202        serialize_with = "crate::serde::as_str::serialize",
203        deserialize_with = "crate::serde::as_str::deserialize"
204    )]
205    pub subspace_id: u64,
206    /// Address of user having the permission to manage subspace denoms
207    #[prost(string, tag = "2")]
208    pub sender: ::prost::alloc::string::String,
209    /// Amount of the burning subspace tokens
210    #[prost(message, optional, tag = "3")]
211    pub amount: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
212}
213/// MsgBurnResponse represents the Msg/Burn response type
214///
215/// Since: Desmos 6.0.0
216#[allow(clippy::derive_partial_eq_without_eq)]
217#[derive(
218    Clone,
219    PartialEq,
220    ::prost::Message,
221    schemars::JsonSchema,
222    serde::Serialize,
223    serde::Deserialize,
224    desmos_std_derive::CosmwasmExt,
225)]
226#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgBurnResponse")]
227#[serde(rename_all = "snake_case")]
228pub struct MsgBurnResponse {}
229/// MsgSetDenomMetadata represents the message to be used to set the subspace
230/// token's bank metadata
231///
232/// Since: Desmos 6.0.0
233#[allow(clippy::derive_partial_eq_without_eq)]
234#[derive(
235    Clone,
236    PartialEq,
237    ::prost::Message,
238    schemars::JsonSchema,
239    serde::Serialize,
240    serde::Deserialize,
241    desmos_std_derive::CosmwasmExt,
242)]
243#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgSetDenomMetadata")]
244#[serde(rename_all = "snake_case")]
245pub struct MsgSetDenomMetadata {
246    /// Id of the subspace which manages the denom
247    #[prost(uint64, tag = "1")]
248    #[serde(
249        serialize_with = "crate::serde::as_str::serialize",
250        deserialize_with = "crate::serde::as_str::deserialize"
251    )]
252    pub subspace_id: u64,
253    /// Address of user having the permission to manage subspace denoms
254    #[prost(string, tag = "2")]
255    pub sender: ::prost::alloc::string::String,
256    /// Metadata of the denom
257    #[prost(message, optional, tag = "3")]
258    pub metadata: ::core::option::Option<super::super::super::cosmos::bank::v1beta1::Metadata>,
259}
260/// MsgSetDenomMetadataResponse represents the Msg/SetDenomMetadata response type
261///
262/// Since: Desmos 6.0.0
263#[allow(clippy::derive_partial_eq_without_eq)]
264#[derive(
265    Clone,
266    PartialEq,
267    ::prost::Message,
268    schemars::JsonSchema,
269    serde::Serialize,
270    serde::Deserialize,
271    desmos_std_derive::CosmwasmExt,
272)]
273#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgSetDenomMetadataResponse")]
274#[serde(rename_all = "snake_case")]
275pub struct MsgSetDenomMetadataResponse {}
276/// MsgUpdateParams is the Msg/UpdateParams request type.
277///
278/// Since: Desmos 6.0.0
279#[allow(clippy::derive_partial_eq_without_eq)]
280#[derive(
281    Clone,
282    PartialEq,
283    ::prost::Message,
284    schemars::JsonSchema,
285    serde::Serialize,
286    serde::Deserialize,
287    desmos_std_derive::CosmwasmExt,
288)]
289#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgUpdateParams")]
290#[serde(rename_all = "snake_case")]
291pub struct MsgUpdateParams {
292    /// authority is the address that controls the module (defaults to x/gov unless
293    /// overwritten).
294    #[prost(string, tag = "1")]
295    pub authority: ::prost::alloc::string::String,
296    /// params defines the parameters to update.
297    ///
298    /// NOTE: All parameters must be supplied.
299    #[prost(message, optional, tag = "2")]
300    pub params: ::core::option::Option<Params>,
301}
302/// MsgUpdateParamsResponse represents the Msg/UpdateParams response type
303///
304/// Since: Desmos 6.0.0
305#[allow(clippy::derive_partial_eq_without_eq)]
306#[derive(
307    Clone,
308    PartialEq,
309    ::prost::Message,
310    schemars::JsonSchema,
311    serde::Serialize,
312    serde::Deserialize,
313    desmos_std_derive::CosmwasmExt,
314)]
315#[proto_message(type_url = "/desmos.tokenfactory.v1.MsgUpdateParamsResponse")]
316#[serde(rename_all = "snake_case")]
317pub struct MsgUpdateParamsResponse {}
318/// QueryParamsRequest is the request type for the Query/Params RPC method.
319#[allow(clippy::derive_partial_eq_without_eq)]
320#[derive(
321    Clone,
322    PartialEq,
323    ::prost::Message,
324    schemars::JsonSchema,
325    serde::Serialize,
326    serde::Deserialize,
327    desmos_std_derive::CosmwasmExt,
328)]
329#[proto_message(type_url = "/desmos.tokenfactory.v1.QueryParamsRequest")]
330#[serde(rename_all = "snake_case")]
331#[proto_query(
332    path = "/desmos.tokenfactory.v1.Query/Params",
333    response_type = QueryParamsResponse
334)]
335pub struct QueryParamsRequest {}
336/// QueryParamsResponse is the response type for the Query/Params RPC method.
337#[allow(clippy::derive_partial_eq_without_eq)]
338#[derive(
339    Clone,
340    PartialEq,
341    ::prost::Message,
342    schemars::JsonSchema,
343    serde::Serialize,
344    serde::Deserialize,
345    desmos_std_derive::CosmwasmExt,
346)]
347#[proto_message(type_url = "/desmos.tokenfactory.v1.QueryParamsResponse")]
348#[serde(rename_all = "snake_case")]
349pub struct QueryParamsResponse {
350    /// params defines the parameters of the module.
351    #[prost(message, optional, tag = "1")]
352    pub params: ::core::option::Option<Params>,
353}
354/// QuerySubspaceDenomsRequest defines the request structure for the
355/// SubspaceDenoms gRPC query.
356#[allow(clippy::derive_partial_eq_without_eq)]
357#[derive(
358    Clone,
359    PartialEq,
360    ::prost::Message,
361    schemars::JsonSchema,
362    serde::Serialize,
363    serde::Deserialize,
364    desmos_std_derive::CosmwasmExt,
365)]
366#[proto_message(type_url = "/desmos.tokenfactory.v1.QuerySubspaceDenomsRequest")]
367#[serde(rename_all = "snake_case")]
368#[proto_query(
369    path = "/desmos.tokenfactory.v1.Query/SubspaceDenoms",
370    response_type = QuerySubspaceDenomsResponse
371)]
372pub struct QuerySubspaceDenomsRequest {
373    #[prost(uint64, tag = "1")]
374    #[serde(
375        serialize_with = "crate::serde::as_str::serialize",
376        deserialize_with = "crate::serde::as_str::deserialize"
377    )]
378    pub subspace_id: u64,
379}
380/// QuerySubspaceDenomsResponse defines the response structure for the
381/// SubspaceDenoms gRPC query.
382#[allow(clippy::derive_partial_eq_without_eq)]
383#[derive(
384    Clone,
385    PartialEq,
386    ::prost::Message,
387    schemars::JsonSchema,
388    serde::Serialize,
389    serde::Deserialize,
390    desmos_std_derive::CosmwasmExt,
391)]
392#[proto_message(type_url = "/desmos.tokenfactory.v1.QuerySubspaceDenomsResponse")]
393#[serde(rename_all = "snake_case")]
394pub struct QuerySubspaceDenomsResponse {
395    #[prost(string, repeated, tag = "1")]
396    pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
397}
398pub struct TokenfactoryQuerier<'a, Q: cosmwasm_std::CustomQuery> {
399    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
400}
401impl<'a, Q: cosmwasm_std::CustomQuery> TokenfactoryQuerier<'a, Q> {
402    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
403        Self { querier }
404    }
405    pub fn params(&self) -> std::result::Result<QueryParamsResponse, cosmwasm_std::StdError> {
406        QueryParamsRequest {}.query(self.querier)
407    }
408    pub fn subspace_denoms(
409        &self,
410        subspace_id: u64,
411    ) -> std::result::Result<QuerySubspaceDenomsResponse, cosmwasm_std::StdError> {
412        QuerySubspaceDenomsRequest { subspace_id }.query(self.querier)
413    }
414}