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.parameter.LegacyParams")]
14pub struct LegacyParams {
15 #[prost(string, tag = "1")]
16 pub min_commission_rate: ::prost::alloc::string::String,
17 #[prost(string, tag = "2")]
18 pub max_voting_power: ::prost::alloc::string::String,
19 #[prost(string, tag = "3")]
20 pub min_self_delegation: ::prost::alloc::string::String,
21 #[prost(uint64, tag = "4")]
22 #[serde(
23 serialize_with = "crate::serde::as_str::serialize",
24 deserialize_with = "crate::serde::as_str::deserialize"
25 )]
26 pub total_blocks_per_year: u64,
27 #[prost(uint64, tag = "5")]
29 #[serde(
30 serialize_with = "crate::serde::as_str::serialize",
31 deserialize_with = "crate::serde::as_str::deserialize"
32 )]
33 pub rewards_data_lifetime: u64,
34}
35#[allow(clippy::derive_partial_eq_without_eq)]
37#[derive(
38 Clone,
39 PartialEq,
40 Eq,
41 ::prost::Message,
42 ::serde::Serialize,
43 ::serde::Deserialize,
44 ::schemars::JsonSchema,
45 CosmwasmExt,
46)]
47#[proto_message(type_url = "/elys.parameter.Params")]
48pub struct Params {
49 #[prost(string, tag = "1")]
50 pub min_commission_rate: ::prost::alloc::string::String,
51 #[prost(string, tag = "2")]
52 pub max_voting_power: ::prost::alloc::string::String,
53 #[prost(string, tag = "3")]
54 pub min_self_delegation: ::prost::alloc::string::String,
55 #[prost(uint64, tag = "4")]
56 #[serde(
57 serialize_with = "crate::serde::as_str::serialize",
58 deserialize_with = "crate::serde::as_str::deserialize"
59 )]
60 pub total_blocks_per_year: u64,
61 #[prost(uint64, tag = "5")]
63 #[serde(
64 serialize_with = "crate::serde::as_str::serialize",
65 deserialize_with = "crate::serde::as_str::deserialize"
66 )]
67 pub rewards_data_lifetime: u64,
68 #[prost(string, tag = "6")]
69 pub taker_fees: ::prost::alloc::string::String,
70 #[prost(string, tag = "7")]
71 pub taker_fee_collection_address: ::prost::alloc::string::String,
72}
73#[allow(clippy::derive_partial_eq_without_eq)]
75#[derive(
76 Clone,
77 PartialEq,
78 Eq,
79 ::prost::Message,
80 ::serde::Serialize,
81 ::serde::Deserialize,
82 ::schemars::JsonSchema,
83 CosmwasmExt,
84)]
85#[proto_message(type_url = "/elys.parameter.GenesisState")]
86pub struct GenesisState {
87 #[prost(message, optional, tag = "1")]
88 pub params: ::core::option::Option<Params>,
89}
90#[allow(clippy::derive_partial_eq_without_eq)]
92#[derive(
93 Clone,
94 PartialEq,
95 Eq,
96 ::prost::Message,
97 ::serde::Serialize,
98 ::serde::Deserialize,
99 ::schemars::JsonSchema,
100 CosmwasmExt,
101)]
102#[proto_message(type_url = "/elys.parameter.QueryParamsRequest")]
103#[proto_query(
104 path = "/elys.parameter.Query/Params",
105 response_type = QueryParamsResponse
106)]
107pub struct QueryParamsRequest {}
108#[allow(clippy::derive_partial_eq_without_eq)]
110#[derive(
111 Clone,
112 PartialEq,
113 Eq,
114 ::prost::Message,
115 ::serde::Serialize,
116 ::serde::Deserialize,
117 ::schemars::JsonSchema,
118 CosmwasmExt,
119)]
120#[proto_message(type_url = "/elys.parameter.QueryParamsResponse")]
121pub struct QueryParamsResponse {
122 #[prost(message, optional, tag = "1")]
124 pub params: ::core::option::Option<Params>,
125}
126#[allow(clippy::derive_partial_eq_without_eq)]
127#[derive(
128 Clone,
129 PartialEq,
130 Eq,
131 ::prost::Message,
132 ::serde::Serialize,
133 ::serde::Deserialize,
134 ::schemars::JsonSchema,
135 CosmwasmExt,
136)]
137#[proto_message(type_url = "/elys.parameter.MsgUpdateMinCommission")]
138pub struct MsgUpdateMinCommission {
139 #[prost(string, tag = "1")]
140 pub creator: ::prost::alloc::string::String,
141 #[prost(string, tag = "2")]
142 pub min_commission: ::prost::alloc::string::String,
143}
144#[allow(clippy::derive_partial_eq_without_eq)]
145#[derive(
146 Clone,
147 PartialEq,
148 Eq,
149 ::prost::Message,
150 ::serde::Serialize,
151 ::serde::Deserialize,
152 ::schemars::JsonSchema,
153 CosmwasmExt,
154)]
155#[proto_message(type_url = "/elys.parameter.MsgUpdateMinCommissionResponse")]
156pub struct MsgUpdateMinCommissionResponse {}
157#[allow(clippy::derive_partial_eq_without_eq)]
158#[derive(
159 Clone,
160 PartialEq,
161 Eq,
162 ::prost::Message,
163 ::serde::Serialize,
164 ::serde::Deserialize,
165 ::schemars::JsonSchema,
166 CosmwasmExt,
167)]
168#[proto_message(type_url = "/elys.parameter.MsgUpdateMaxVotingPower")]
169pub struct MsgUpdateMaxVotingPower {
170 #[prost(string, tag = "1")]
171 pub creator: ::prost::alloc::string::String,
172 #[prost(string, tag = "2")]
173 pub max_voting_power: ::prost::alloc::string::String,
174}
175#[allow(clippy::derive_partial_eq_without_eq)]
176#[derive(
177 Clone,
178 PartialEq,
179 Eq,
180 ::prost::Message,
181 ::serde::Serialize,
182 ::serde::Deserialize,
183 ::schemars::JsonSchema,
184 CosmwasmExt,
185)]
186#[proto_message(type_url = "/elys.parameter.MsgUpdateMaxVotingPowerResponse")]
187pub struct MsgUpdateMaxVotingPowerResponse {}
188#[allow(clippy::derive_partial_eq_without_eq)]
189#[derive(
190 Clone,
191 PartialEq,
192 Eq,
193 ::prost::Message,
194 ::serde::Serialize,
195 ::serde::Deserialize,
196 ::schemars::JsonSchema,
197 CosmwasmExt,
198)]
199#[proto_message(type_url = "/elys.parameter.MsgUpdateMinSelfDelegation")]
200pub struct MsgUpdateMinSelfDelegation {
201 #[prost(string, tag = "1")]
202 pub creator: ::prost::alloc::string::String,
203 #[prost(string, tag = "2")]
204 pub min_self_delegation: ::prost::alloc::string::String,
205}
206#[allow(clippy::derive_partial_eq_without_eq)]
207#[derive(
208 Clone,
209 PartialEq,
210 Eq,
211 ::prost::Message,
212 ::serde::Serialize,
213 ::serde::Deserialize,
214 ::schemars::JsonSchema,
215 CosmwasmExt,
216)]
217#[proto_message(type_url = "/elys.parameter.MsgUpdateMinSelfDelegationResponse")]
218pub struct MsgUpdateMinSelfDelegationResponse {}
219#[allow(clippy::derive_partial_eq_without_eq)]
220#[derive(
221 Clone,
222 PartialEq,
223 Eq,
224 ::prost::Message,
225 ::serde::Serialize,
226 ::serde::Deserialize,
227 ::schemars::JsonSchema,
228 CosmwasmExt,
229)]
230#[proto_message(type_url = "/elys.parameter.MsgUpdateTotalBlocksPerYear")]
231pub struct MsgUpdateTotalBlocksPerYear {
232 #[prost(string, tag = "1")]
233 pub creator: ::prost::alloc::string::String,
234 #[prost(uint64, tag = "2")]
235 #[serde(
236 serialize_with = "crate::serde::as_str::serialize",
237 deserialize_with = "crate::serde::as_str::deserialize"
238 )]
239 pub total_blocks_per_year: u64,
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.parameter.MsgUpdateTotalBlocksPerYearResponse")]
253pub struct MsgUpdateTotalBlocksPerYearResponse {}
254#[allow(clippy::derive_partial_eq_without_eq)]
255#[derive(
256 Clone,
257 PartialEq,
258 Eq,
259 ::prost::Message,
260 ::serde::Serialize,
261 ::serde::Deserialize,
262 ::schemars::JsonSchema,
263 CosmwasmExt,
264)]
265#[proto_message(type_url = "/elys.parameter.MsgUpdateRewardsDataLifetime")]
266pub struct MsgUpdateRewardsDataLifetime {
267 #[prost(string, tag = "1")]
268 pub creator: ::prost::alloc::string::String,
269 #[prost(uint64, tag = "2")]
270 #[serde(
271 serialize_with = "crate::serde::as_str::serialize",
272 deserialize_with = "crate::serde::as_str::deserialize"
273 )]
274 pub rewards_data_lifetime: u64,
275}
276#[allow(clippy::derive_partial_eq_without_eq)]
277#[derive(
278 Clone,
279 PartialEq,
280 Eq,
281 ::prost::Message,
282 ::serde::Serialize,
283 ::serde::Deserialize,
284 ::schemars::JsonSchema,
285 CosmwasmExt,
286)]
287#[proto_message(type_url = "/elys.parameter.MsgUpdateRewardsDataLifetimeResponse")]
288pub struct MsgUpdateRewardsDataLifetimeResponse {}
289pub struct ParameterQuerier<'a, Q: cosmwasm_std::CustomQuery> {
290 querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
291}
292impl<'a, Q: cosmwasm_std::CustomQuery> ParameterQuerier<'a, Q> {
293 pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
294 Self { querier }
295 }
296 pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
297 QueryParamsRequest {}.query(self.querier)
298 }
299}