elys_std/types/elys/
burner.rs

1use elys_std_deriv::CosmwasmExt;
2/// Params defines the parameters for the module.
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(
5    Clone,
6    PartialEq,
7    Eq,
8    ::prost::Message,
9    ::serde::Serialize,
10    ::serde::Deserialize,
11    ::schemars::JsonSchema,
12    CosmwasmExt,
13)]
14#[proto_message(type_url = "/elys.burner.Params")]
15pub struct Params {
16    #[prost(string, tag = "1")]
17    #[serde(alias = "epochIDentifier")]
18    pub epoch_identifier: ::prost::alloc::string::String,
19}
20#[allow(clippy::derive_partial_eq_without_eq)]
21#[derive(
22    Clone,
23    PartialEq,
24    Eq,
25    ::prost::Message,
26    ::serde::Serialize,
27    ::serde::Deserialize,
28    ::schemars::JsonSchema,
29    CosmwasmExt,
30)]
31#[proto_message(type_url = "/elys.burner.History")]
32pub struct History {
33    #[prost(string, tag = "1")]
34    pub timestamp: ::prost::alloc::string::String,
35    #[prost(string, tag = "2")]
36    pub denom: ::prost::alloc::string::String,
37    #[prost(string, tag = "3")]
38    pub amount: ::prost::alloc::string::String,
39}
40/// GenesisState defines the burner module's genesis state.
41#[allow(clippy::derive_partial_eq_without_eq)]
42#[derive(
43    Clone,
44    PartialEq,
45    Eq,
46    ::prost::Message,
47    ::serde::Serialize,
48    ::serde::Deserialize,
49    ::schemars::JsonSchema,
50    CosmwasmExt,
51)]
52#[proto_message(type_url = "/elys.burner.GenesisState")]
53pub struct GenesisState {
54    #[prost(message, optional, tag = "1")]
55    pub params: ::core::option::Option<Params>,
56    #[prost(message, repeated, tag = "2")]
57    pub history_list: ::prost::alloc::vec::Vec<History>,
58}
59/// QueryParamsRequest is request type for the Query/Params RPC method.
60#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(
62    Clone,
63    PartialEq,
64    Eq,
65    ::prost::Message,
66    ::serde::Serialize,
67    ::serde::Deserialize,
68    ::schemars::JsonSchema,
69    CosmwasmExt,
70)]
71#[proto_message(type_url = "/elys.burner.QueryParamsRequest")]
72#[proto_query(path = "/elys.burner.Query/Params", response_type = QueryParamsResponse)]
73pub struct QueryParamsRequest {}
74/// QueryParamsResponse is response type for the Query/Params RPC method.
75#[allow(clippy::derive_partial_eq_without_eq)]
76#[derive(
77    Clone,
78    PartialEq,
79    Eq,
80    ::prost::Message,
81    ::serde::Serialize,
82    ::serde::Deserialize,
83    ::schemars::JsonSchema,
84    CosmwasmExt,
85)]
86#[proto_message(type_url = "/elys.burner.QueryParamsResponse")]
87pub struct QueryParamsResponse {
88    /// params holds all the parameters of this module.
89    #[prost(message, optional, tag = "1")]
90    pub params: ::core::option::Option<Params>,
91}
92#[allow(clippy::derive_partial_eq_without_eq)]
93#[derive(
94    Clone,
95    PartialEq,
96    Eq,
97    ::prost::Message,
98    ::serde::Serialize,
99    ::serde::Deserialize,
100    ::schemars::JsonSchema,
101    CosmwasmExt,
102)]
103#[proto_message(type_url = "/elys.burner.QueryGetHistoryRequest")]
104#[proto_query(
105    path = "/elys.burner.Query/History",
106    response_type = QueryGetHistoryResponse
107)]
108pub struct QueryGetHistoryRequest {
109    #[prost(string, tag = "1")]
110    pub timestamp: ::prost::alloc::string::String,
111    #[prost(string, tag = "2")]
112    pub denom: ::prost::alloc::string::String,
113}
114#[allow(clippy::derive_partial_eq_without_eq)]
115#[derive(
116    Clone,
117    PartialEq,
118    Eq,
119    ::prost::Message,
120    ::serde::Serialize,
121    ::serde::Deserialize,
122    ::schemars::JsonSchema,
123    CosmwasmExt,
124)]
125#[proto_message(type_url = "/elys.burner.QueryGetHistoryResponse")]
126pub struct QueryGetHistoryResponse {
127    #[prost(message, optional, tag = "1")]
128    pub history: ::core::option::Option<History>,
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.burner.QueryAllHistoryRequest")]
142#[proto_query(
143    path = "/elys.burner.Query/HistoryAll",
144    response_type = QueryAllHistoryResponse
145)]
146pub struct QueryAllHistoryRequest {
147    #[prost(message, optional, tag = "1")]
148    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
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.burner.QueryAllHistoryResponse")]
162pub struct QueryAllHistoryResponse {
163    #[prost(message, repeated, tag = "1")]
164    pub history: ::prost::alloc::vec::Vec<History>,
165    #[prost(message, optional, tag = "2")]
166    pub pagination:
167        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
168}
169#[allow(clippy::derive_partial_eq_without_eq)]
170#[derive(
171    Clone,
172    PartialEq,
173    Eq,
174    ::prost::Message,
175    ::serde::Serialize,
176    ::serde::Deserialize,
177    ::schemars::JsonSchema,
178    CosmwasmExt,
179)]
180#[proto_message(type_url = "/elys.burner.MsgUpdateParams")]
181pub struct MsgUpdateParams {
182    #[prost(string, tag = "1")]
183    pub authority: ::prost::alloc::string::String,
184    #[prost(message, optional, tag = "2")]
185    pub params: ::core::option::Option<Params>,
186}
187#[allow(clippy::derive_partial_eq_without_eq)]
188#[derive(
189    Clone,
190    PartialEq,
191    Eq,
192    ::prost::Message,
193    ::serde::Serialize,
194    ::serde::Deserialize,
195    ::schemars::JsonSchema,
196    CosmwasmExt,
197)]
198#[proto_message(type_url = "/elys.burner.MsgUpdateParamsResponse")]
199pub struct MsgUpdateParamsResponse {}
200pub struct BurnerQuerier<'a, Q: cosmwasm_std::CustomQuery> {
201    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
202}
203impl<'a, Q: cosmwasm_std::CustomQuery> BurnerQuerier<'a, Q> {
204    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
205        Self { querier }
206    }
207    pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
208        QueryParamsRequest {}.query(self.querier)
209    }
210    pub fn history(
211        &self,
212        timestamp: ::prost::alloc::string::String,
213        denom: ::prost::alloc::string::String,
214    ) -> Result<QueryGetHistoryResponse, cosmwasm_std::StdError> {
215        QueryGetHistoryRequest { timestamp, denom }.query(self.querier)
216    }
217    pub fn history_all(
218        &self,
219        pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
220    ) -> Result<QueryAllHistoryResponse, cosmwasm_std::StdError> {
221        QueryAllHistoryRequest { pagination }.query(self.querier)
222    }
223}