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}
69#[allow(clippy::derive_partial_eq_without_eq)]
71#[derive(
72 Clone,
73 PartialEq,
74 Eq,
75 ::prost::Message,
76 ::serde::Serialize,
77 ::serde::Deserialize,
78 ::schemars::JsonSchema,
79 CosmwasmExt,
80)]
81#[proto_message(type_url = "/elys.parameter.GenesisState")]
82pub struct GenesisState {
83 #[prost(message, optional, tag = "1")]
84 pub params: ::core::option::Option<Params>,
85}
86#[allow(clippy::derive_partial_eq_without_eq)]
88#[derive(
89 Clone,
90 PartialEq,
91 Eq,
92 ::prost::Message,
93 ::serde::Serialize,
94 ::serde::Deserialize,
95 ::schemars::JsonSchema,
96 CosmwasmExt,
97)]
98#[proto_message(type_url = "/elys.parameter.QueryParamsRequest")]
99#[proto_query(
100 path = "/elys.parameter.Query/Params",
101 response_type = QueryParamsResponse
102)]
103pub struct QueryParamsRequest {}
104#[allow(clippy::derive_partial_eq_without_eq)]
106#[derive(
107 Clone,
108 PartialEq,
109 Eq,
110 ::prost::Message,
111 ::serde::Serialize,
112 ::serde::Deserialize,
113 ::schemars::JsonSchema,
114 CosmwasmExt,
115)]
116#[proto_message(type_url = "/elys.parameter.QueryParamsResponse")]
117pub struct QueryParamsResponse {
118 #[prost(message, optional, tag = "1")]
120 pub params: ::core::option::Option<Params>,
121}
122#[allow(clippy::derive_partial_eq_without_eq)]
123#[derive(
124 Clone,
125 PartialEq,
126 Eq,
127 ::prost::Message,
128 ::serde::Serialize,
129 ::serde::Deserialize,
130 ::schemars::JsonSchema,
131 CosmwasmExt,
132)]
133#[proto_message(type_url = "/elys.parameter.MsgUpdateMinCommission")]
134pub struct MsgUpdateMinCommission {
135 #[prost(string, tag = "1")]
136 pub creator: ::prost::alloc::string::String,
137 #[prost(string, tag = "2")]
138 pub min_commission: ::prost::alloc::string::String,
139}
140#[allow(clippy::derive_partial_eq_without_eq)]
141#[derive(
142 Clone,
143 PartialEq,
144 Eq,
145 ::prost::Message,
146 ::serde::Serialize,
147 ::serde::Deserialize,
148 ::schemars::JsonSchema,
149 CosmwasmExt,
150)]
151#[proto_message(type_url = "/elys.parameter.MsgUpdateMinCommissionResponse")]
152pub struct MsgUpdateMinCommissionResponse {}
153#[allow(clippy::derive_partial_eq_without_eq)]
154#[derive(
155 Clone,
156 PartialEq,
157 Eq,
158 ::prost::Message,
159 ::serde::Serialize,
160 ::serde::Deserialize,
161 ::schemars::JsonSchema,
162 CosmwasmExt,
163)]
164#[proto_message(type_url = "/elys.parameter.MsgUpdateMaxVotingPower")]
165pub struct MsgUpdateMaxVotingPower {
166 #[prost(string, tag = "1")]
167 pub creator: ::prost::alloc::string::String,
168 #[prost(string, tag = "2")]
169 pub max_voting_power: ::prost::alloc::string::String,
170}
171#[allow(clippy::derive_partial_eq_without_eq)]
172#[derive(
173 Clone,
174 PartialEq,
175 Eq,
176 ::prost::Message,
177 ::serde::Serialize,
178 ::serde::Deserialize,
179 ::schemars::JsonSchema,
180 CosmwasmExt,
181)]
182#[proto_message(type_url = "/elys.parameter.MsgUpdateMaxVotingPowerResponse")]
183pub struct MsgUpdateMaxVotingPowerResponse {}
184#[allow(clippy::derive_partial_eq_without_eq)]
185#[derive(
186 Clone,
187 PartialEq,
188 Eq,
189 ::prost::Message,
190 ::serde::Serialize,
191 ::serde::Deserialize,
192 ::schemars::JsonSchema,
193 CosmwasmExt,
194)]
195#[proto_message(type_url = "/elys.parameter.MsgUpdateMinSelfDelegation")]
196pub struct MsgUpdateMinSelfDelegation {
197 #[prost(string, tag = "1")]
198 pub creator: ::prost::alloc::string::String,
199 #[prost(string, tag = "2")]
200 pub min_self_delegation: ::prost::alloc::string::String,
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.parameter.MsgUpdateMinSelfDelegationResponse")]
214pub struct MsgUpdateMinSelfDelegationResponse {}
215#[allow(clippy::derive_partial_eq_without_eq)]
216#[derive(
217 Clone,
218 PartialEq,
219 Eq,
220 ::prost::Message,
221 ::serde::Serialize,
222 ::serde::Deserialize,
223 ::schemars::JsonSchema,
224 CosmwasmExt,
225)]
226#[proto_message(type_url = "/elys.parameter.MsgUpdateTotalBlocksPerYear")]
227pub struct MsgUpdateTotalBlocksPerYear {
228 #[prost(string, tag = "1")]
229 pub creator: ::prost::alloc::string::String,
230 #[prost(uint64, tag = "2")]
231 #[serde(
232 serialize_with = "crate::serde::as_str::serialize",
233 deserialize_with = "crate::serde::as_str::deserialize"
234 )]
235 pub total_blocks_per_year: u64,
236}
237#[allow(clippy::derive_partial_eq_without_eq)]
238#[derive(
239 Clone,
240 PartialEq,
241 Eq,
242 ::prost::Message,
243 ::serde::Serialize,
244 ::serde::Deserialize,
245 ::schemars::JsonSchema,
246 CosmwasmExt,
247)]
248#[proto_message(type_url = "/elys.parameter.MsgUpdateTotalBlocksPerYearResponse")]
249pub struct MsgUpdateTotalBlocksPerYearResponse {}
250#[allow(clippy::derive_partial_eq_without_eq)]
251#[derive(
252 Clone,
253 PartialEq,
254 Eq,
255 ::prost::Message,
256 ::serde::Serialize,
257 ::serde::Deserialize,
258 ::schemars::JsonSchema,
259 CosmwasmExt,
260)]
261#[proto_message(type_url = "/elys.parameter.MsgUpdateRewardsDataLifetime")]
262pub struct MsgUpdateRewardsDataLifetime {
263 #[prost(string, tag = "1")]
264 pub creator: ::prost::alloc::string::String,
265 #[prost(uint64, tag = "2")]
266 #[serde(
267 serialize_with = "crate::serde::as_str::serialize",
268 deserialize_with = "crate::serde::as_str::deserialize"
269 )]
270 pub rewards_data_lifetime: u64,
271}
272#[allow(clippy::derive_partial_eq_without_eq)]
273#[derive(
274 Clone,
275 PartialEq,
276 Eq,
277 ::prost::Message,
278 ::serde::Serialize,
279 ::serde::Deserialize,
280 ::schemars::JsonSchema,
281 CosmwasmExt,
282)]
283#[proto_message(type_url = "/elys.parameter.MsgUpdateRewardsDataLifetimeResponse")]
284pub struct MsgUpdateRewardsDataLifetimeResponse {}
285pub struct ParameterQuerier<'a, Q: cosmwasm_std::CustomQuery> {
286 querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
287}
288impl<'a, Q: cosmwasm_std::CustomQuery> ParameterQuerier<'a, Q> {
289 pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
290 Self { querier }
291 }
292 pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
293 QueryParamsRequest {}.query(self.querier)
294 }
295}