provwasm_std/types/cosmos/distribution/
v1beta1.rs

1use provwasm_proc_macro::CosmwasmExt;
2/// Params defines the set of params for the distribution module.
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
5#[proto_message(type_url = "/cosmos.distribution.v1beta1.Params")]
6pub struct Params {
7    #[prost(string, tag = "1")]
8    pub community_tax: ::prost::alloc::string::String,
9    /// Deprecated: The base_proposer_reward field is deprecated and is no longer used
10    /// in the x/distribution module's reward mechanism.
11    #[deprecated]
12    #[prost(string, tag = "2")]
13    pub base_proposer_reward: ::prost::alloc::string::String,
14    /// Deprecated: The bonus_proposer_reward field is deprecated and is no longer used
15    /// in the x/distribution module's reward mechanism.
16    #[deprecated]
17    #[prost(string, tag = "3")]
18    pub bonus_proposer_reward: ::prost::alloc::string::String,
19    #[prost(bool, tag = "4")]
20    pub withdraw_addr_enabled: bool,
21}
22/// ValidatorHistoricalRewards represents historical rewards for a validator.
23/// Height is implicit within the store key.
24/// Cumulative reward ratio is the sum from the zeroeth period
25/// until this period of rewards / tokens, per the spec.
26/// The reference count indicates the number of objects
27/// which might need to reference this historical entry at any point.
28/// ReferenceCount =
29///     number of outstanding delegations which ended the associated period (and
30///     might need to read that record)
31///   + number of slashes which ended the associated period (and might need to
32///   read that record)
33///   + one per validator for the zeroeth period, set on initialization
34#[allow(clippy::derive_partial_eq_without_eq)]
35#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
36#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards")]
37pub struct ValidatorHistoricalRewards {
38    #[prost(message, repeated, tag = "1")]
39    pub cumulative_reward_ratio: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
40    #[prost(uint32, tag = "2")]
41    pub reference_count: u32,
42}
43/// ValidatorCurrentRewards represents current rewards and current
44/// period for a validator kept as a running counter and incremented
45/// each block as long as the validator's tokens remain constant.
46#[allow(clippy::derive_partial_eq_without_eq)]
47#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
48#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorCurrentRewards")]
49pub struct ValidatorCurrentRewards {
50    #[prost(message, repeated, tag = "1")]
51    pub rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
52    #[prost(uint64, tag = "2")]
53    pub period: u64,
54}
55/// ValidatorAccumulatedCommission represents accumulated commission
56/// for a validator kept as a running counter, can be withdrawn at any time.
57#[allow(clippy::derive_partial_eq_without_eq)]
58#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
59#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")]
60pub struct ValidatorAccumulatedCommission {
61    #[prost(message, repeated, tag = "1")]
62    pub commission: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
63}
64/// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards
65/// for a validator inexpensive to track, allows simple sanity checks.
66#[allow(clippy::derive_partial_eq_without_eq)]
67#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
68#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards")]
69pub struct ValidatorOutstandingRewards {
70    #[prost(message, repeated, tag = "1")]
71    pub rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
72}
73/// ValidatorSlashEvent represents a validator slash event.
74/// Height is implicit within the store key.
75/// This is needed to calculate appropriate amount of staking tokens
76/// for delegations which are withdrawn after a slash has occurred.
77#[allow(clippy::derive_partial_eq_without_eq)]
78#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
79#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEvent")]
80pub struct ValidatorSlashEvent {
81    #[prost(uint64, tag = "1")]
82    pub validator_period: u64,
83    #[prost(string, tag = "2")]
84    pub fraction: ::prost::alloc::string::String,
85}
86/// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages.
87#[allow(clippy::derive_partial_eq_without_eq)]
88#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
89#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEvents")]
90pub struct ValidatorSlashEvents {
91    #[prost(message, repeated, tag = "1")]
92    pub validator_slash_events: ::prost::alloc::vec::Vec<ValidatorSlashEvent>,
93}
94/// FeePool is the global fee pool for distribution.
95#[allow(clippy::derive_partial_eq_without_eq)]
96#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
97#[proto_message(type_url = "/cosmos.distribution.v1beta1.FeePool")]
98pub struct FeePool {
99    #[prost(message, repeated, tag = "1")]
100    pub community_pool: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
101}
102/// CommunityPoolSpendProposal details a proposal for use of community funds,
103/// together with how many coins are proposed to be spent, and to which
104/// recipient account.
105///
106/// Deprecated: Do not use. As of the Cosmos SDK release v0.47.x, there is no
107/// longer a need for an explicit CommunityPoolSpendProposal. To spend community
108/// pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov
109/// module via a v1 governance proposal.
110#[allow(clippy::derive_partial_eq_without_eq)]
111#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
112#[proto_message(type_url = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal")]
113#[deprecated]
114pub struct CommunityPoolSpendProposal {
115    #[prost(string, tag = "1")]
116    pub title: ::prost::alloc::string::String,
117    #[prost(string, tag = "2")]
118    pub description: ::prost::alloc::string::String,
119    #[prost(string, tag = "3")]
120    pub recipient: ::prost::alloc::string::String,
121    #[prost(message, repeated, tag = "4")]
122    pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
123}
124/// DelegatorStartingInfo represents the starting info for a delegator reward
125/// period. It tracks the previous validator period, the delegation's amount of
126/// staking token, and the creation height (to check later on if any slashes have
127/// occurred). NOTE: Even though validators are slashed to whole staking tokens,
128/// the delegators within the validator may be left with less than a full token,
129/// thus sdk.Dec is used.
130#[allow(clippy::derive_partial_eq_without_eq)]
131#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
132#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorStartingInfo")]
133pub struct DelegatorStartingInfo {
134    #[prost(uint64, tag = "1")]
135    pub previous_period: u64,
136    #[prost(string, tag = "2")]
137    pub stake: ::prost::alloc::string::String,
138    #[prost(uint64, tag = "3")]
139    pub height: u64,
140}
141/// DelegationDelegatorReward represents the properties
142/// of a delegator's delegation reward.
143#[allow(clippy::derive_partial_eq_without_eq)]
144#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
145#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegationDelegatorReward")]
146pub struct DelegationDelegatorReward {
147    #[prost(string, tag = "1")]
148    pub validator_address: ::prost::alloc::string::String,
149    #[prost(message, repeated, tag = "2")]
150    pub reward: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
151}
152/// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal
153/// with a deposit
154#[allow(clippy::derive_partial_eq_without_eq)]
155#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
156#[proto_message(type_url = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")]
157pub struct CommunityPoolSpendProposalWithDeposit {
158    #[prost(string, tag = "1")]
159    pub title: ::prost::alloc::string::String,
160    #[prost(string, tag = "2")]
161    pub description: ::prost::alloc::string::String,
162    #[prost(string, tag = "3")]
163    pub recipient: ::prost::alloc::string::String,
164    #[prost(string, tag = "4")]
165    pub amount: ::prost::alloc::string::String,
166    #[prost(string, tag = "5")]
167    pub deposit: ::prost::alloc::string::String,
168}
169/// DelegatorWithdrawInfo is the address for where distributions rewards are
170/// withdrawn to by default this struct is only used at genesis to feed in
171/// default withdraw addresses.
172#[allow(clippy::derive_partial_eq_without_eq)]
173#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
174#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorWithdrawInfo")]
175pub struct DelegatorWithdrawInfo {
176    /// delegator_address is the address of the delegator.
177    #[prost(string, tag = "1")]
178    pub delegator_address: ::prost::alloc::string::String,
179    /// withdraw_address is the address to withdraw the delegation rewards to.
180    #[prost(string, tag = "2")]
181    pub withdraw_address: ::prost::alloc::string::String,
182}
183/// ValidatorOutstandingRewardsRecord is used for import/export via genesis json.
184#[allow(clippy::derive_partial_eq_without_eq)]
185#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
186#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")]
187pub struct ValidatorOutstandingRewardsRecord {
188    /// validator_address is the address of the validator.
189    #[prost(string, tag = "1")]
190    pub validator_address: ::prost::alloc::string::String,
191    /// outstanding_rewards represents the outstanding rewards of a validator.
192    #[prost(message, repeated, tag = "2")]
193    pub outstanding_rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
194}
195/// ValidatorAccumulatedCommissionRecord is used for import / export via genesis
196/// json.
197#[allow(clippy::derive_partial_eq_without_eq)]
198#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
199#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")]
200pub struct ValidatorAccumulatedCommissionRecord {
201    /// validator_address is the address of the validator.
202    #[prost(string, tag = "1")]
203    pub validator_address: ::prost::alloc::string::String,
204    /// accumulated is the accumulated commission of a validator.
205    #[prost(message, optional, tag = "2")]
206    pub accumulated: ::core::option::Option<ValidatorAccumulatedCommission>,
207}
208/// ValidatorHistoricalRewardsRecord is used for import / export via genesis
209/// json.
210#[allow(clippy::derive_partial_eq_without_eq)]
211#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
212#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")]
213pub struct ValidatorHistoricalRewardsRecord {
214    /// validator_address is the address of the validator.
215    #[prost(string, tag = "1")]
216    pub validator_address: ::prost::alloc::string::String,
217    /// period defines the period the historical rewards apply to.
218    #[prost(uint64, tag = "2")]
219    pub period: u64,
220    /// rewards defines the historical rewards of a validator.
221    #[prost(message, optional, tag = "3")]
222    pub rewards: ::core::option::Option<ValidatorHistoricalRewards>,
223}
224/// ValidatorCurrentRewardsRecord is used for import / export via genesis json.
225#[allow(clippy::derive_partial_eq_without_eq)]
226#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
227#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")]
228pub struct ValidatorCurrentRewardsRecord {
229    /// validator_address is the address of the validator.
230    #[prost(string, tag = "1")]
231    pub validator_address: ::prost::alloc::string::String,
232    /// rewards defines the current rewards of a validator.
233    #[prost(message, optional, tag = "2")]
234    pub rewards: ::core::option::Option<ValidatorCurrentRewards>,
235}
236/// DelegatorStartingInfoRecord used for import / export via genesis json.
237#[allow(clippy::derive_partial_eq_without_eq)]
238#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
239#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")]
240pub struct DelegatorStartingInfoRecord {
241    /// delegator_address is the address of the delegator.
242    #[prost(string, tag = "1")]
243    pub delegator_address: ::prost::alloc::string::String,
244    /// validator_address is the address of the validator.
245    #[prost(string, tag = "2")]
246    pub validator_address: ::prost::alloc::string::String,
247    /// starting_info defines the starting info of a delegator.
248    #[prost(message, optional, tag = "3")]
249    pub starting_info: ::core::option::Option<DelegatorStartingInfo>,
250}
251/// ValidatorSlashEventRecord is used for import / export via genesis json.
252#[allow(clippy::derive_partial_eq_without_eq)]
253#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
254#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEventRecord")]
255pub struct ValidatorSlashEventRecord {
256    /// validator_address is the address of the validator.
257    #[prost(string, tag = "1")]
258    pub validator_address: ::prost::alloc::string::String,
259    /// height defines the block height at which the slash event occurred.
260    #[prost(uint64, tag = "2")]
261    pub height: u64,
262    /// period is the period of the slash event.
263    #[prost(uint64, tag = "3")]
264    pub period: u64,
265    /// validator_slash_event describes the slash event.
266    #[prost(message, optional, tag = "4")]
267    pub validator_slash_event: ::core::option::Option<ValidatorSlashEvent>,
268}
269/// GenesisState defines the distribution module's genesis state.
270#[allow(clippy::derive_partial_eq_without_eq)]
271#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
272#[proto_message(type_url = "/cosmos.distribution.v1beta1.GenesisState")]
273pub struct GenesisState {
274    /// params defines all the parameters of the module.
275    #[prost(message, optional, tag = "1")]
276    pub params: ::core::option::Option<Params>,
277    /// fee_pool defines the fee pool at genesis.
278    #[prost(message, optional, tag = "2")]
279    pub fee_pool: ::core::option::Option<FeePool>,
280    /// fee_pool defines the delegator withdraw infos at genesis.
281    #[prost(message, repeated, tag = "3")]
282    pub delegator_withdraw_infos: ::prost::alloc::vec::Vec<DelegatorWithdrawInfo>,
283    /// fee_pool defines the previous proposer at genesis.
284    #[prost(string, tag = "4")]
285    pub previous_proposer: ::prost::alloc::string::String,
286    /// fee_pool defines the outstanding rewards of all validators at genesis.
287    #[prost(message, repeated, tag = "5")]
288    pub outstanding_rewards: ::prost::alloc::vec::Vec<ValidatorOutstandingRewardsRecord>,
289    /// fee_pool defines the accumulated commissions of all validators at genesis.
290    #[prost(message, repeated, tag = "6")]
291    pub validator_accumulated_commissions:
292        ::prost::alloc::vec::Vec<ValidatorAccumulatedCommissionRecord>,
293    /// fee_pool defines the historical rewards of all validators at genesis.
294    #[prost(message, repeated, tag = "7")]
295    pub validator_historical_rewards: ::prost::alloc::vec::Vec<ValidatorHistoricalRewardsRecord>,
296    /// fee_pool defines the current rewards of all validators at genesis.
297    #[prost(message, repeated, tag = "8")]
298    pub validator_current_rewards: ::prost::alloc::vec::Vec<ValidatorCurrentRewardsRecord>,
299    /// fee_pool defines the delegator starting infos at genesis.
300    #[prost(message, repeated, tag = "9")]
301    pub delegator_starting_infos: ::prost::alloc::vec::Vec<DelegatorStartingInfoRecord>,
302    /// fee_pool defines the validator slash events at genesis.
303    #[prost(message, repeated, tag = "10")]
304    pub validator_slash_events: ::prost::alloc::vec::Vec<ValidatorSlashEventRecord>,
305}
306/// QueryParamsRequest is the request type for the Query/Params RPC method.
307#[allow(clippy::derive_partial_eq_without_eq)]
308#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
309#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryParamsRequest")]
310#[proto_query(
311    path = "/cosmos.distribution.v1beta1.Query/Params",
312    response_type = QueryParamsResponse
313)]
314pub struct QueryParamsRequest {}
315/// QueryParamsResponse is the response type for the Query/Params RPC method.
316#[allow(clippy::derive_partial_eq_without_eq)]
317#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
318#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryParamsResponse")]
319pub struct QueryParamsResponse {
320    /// params defines the parameters of the module.
321    #[prost(message, optional, tag = "1")]
322    pub params: ::core::option::Option<Params>,
323}
324/// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method.
325#[allow(clippy::derive_partial_eq_without_eq)]
326#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
327#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest")]
328#[proto_query(
329    path = "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo",
330    response_type = QueryValidatorDistributionInfoResponse
331)]
332pub struct QueryValidatorDistributionInfoRequest {
333    /// validator_address defines the validator address to query for.
334    #[prost(string, tag = "1")]
335    pub validator_address: ::prost::alloc::string::String,
336}
337/// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method.
338#[allow(clippy::derive_partial_eq_without_eq)]
339#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
340#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse")]
341pub struct QueryValidatorDistributionInfoResponse {
342    /// operator_address defines the validator operator address.
343    #[prost(string, tag = "1")]
344    pub operator_address: ::prost::alloc::string::String,
345    /// self_bond_rewards defines the self delegations rewards.
346    #[prost(message, repeated, tag = "2")]
347    pub self_bond_rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
348    /// commission defines the commission the validator received.
349    #[prost(message, repeated, tag = "3")]
350    pub commission: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
351}
352/// QueryValidatorOutstandingRewardsRequest is the request type for the
353/// Query/ValidatorOutstandingRewards RPC method.
354#[allow(clippy::derive_partial_eq_without_eq)]
355#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
356#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")]
357#[proto_query(
358    path = "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards",
359    response_type = QueryValidatorOutstandingRewardsResponse
360)]
361pub struct QueryValidatorOutstandingRewardsRequest {
362    /// validator_address defines the validator address to query for.
363    #[prost(string, tag = "1")]
364    pub validator_address: ::prost::alloc::string::String,
365}
366/// QueryValidatorOutstandingRewardsResponse is the response type for the
367/// Query/ValidatorOutstandingRewards RPC method.
368#[allow(clippy::derive_partial_eq_without_eq)]
369#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
370#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")]
371pub struct QueryValidatorOutstandingRewardsResponse {
372    #[prost(message, optional, tag = "1")]
373    pub rewards: ::core::option::Option<ValidatorOutstandingRewards>,
374}
375/// QueryValidatorCommissionRequest is the request type for the
376/// Query/ValidatorCommission RPC method
377#[allow(clippy::derive_partial_eq_without_eq)]
378#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
379#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")]
380#[proto_query(
381    path = "/cosmos.distribution.v1beta1.Query/ValidatorCommission",
382    response_type = QueryValidatorCommissionResponse
383)]
384pub struct QueryValidatorCommissionRequest {
385    /// validator_address defines the validator address to query for.
386    #[prost(string, tag = "1")]
387    pub validator_address: ::prost::alloc::string::String,
388}
389/// QueryValidatorCommissionResponse is the response type for the
390/// Query/ValidatorCommission RPC method
391#[allow(clippy::derive_partial_eq_without_eq)]
392#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
393#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")]
394pub struct QueryValidatorCommissionResponse {
395    /// commission defines the commission the validator received.
396    #[prost(message, optional, tag = "1")]
397    pub commission: ::core::option::Option<ValidatorAccumulatedCommission>,
398}
399/// QueryValidatorSlashesRequest is the request type for the
400/// Query/ValidatorSlashes RPC method
401#[allow(clippy::derive_partial_eq_without_eq)]
402#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
403#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")]
404#[proto_query(
405    path = "/cosmos.distribution.v1beta1.Query/ValidatorSlashes",
406    response_type = QueryValidatorSlashesResponse
407)]
408pub struct QueryValidatorSlashesRequest {
409    /// validator_address defines the validator address to query for.
410    #[prost(string, tag = "1")]
411    pub validator_address: ::prost::alloc::string::String,
412    /// starting_height defines the optional starting height to query the slashes.
413    #[prost(uint64, tag = "2")]
414    pub starting_height: u64,
415    /// starting_height defines the optional ending height to query the slashes.
416    #[prost(uint64, tag = "3")]
417    pub ending_height: u64,
418    /// pagination defines an optional pagination for the request.
419    #[prost(message, optional, tag = "4")]
420    pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
421}
422/// QueryValidatorSlashesResponse is the response type for the
423/// Query/ValidatorSlashes RPC method.
424#[allow(clippy::derive_partial_eq_without_eq)]
425#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
426#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")]
427pub struct QueryValidatorSlashesResponse {
428    /// slashes defines the slashes the validator received.
429    #[prost(message, repeated, tag = "1")]
430    pub slashes: ::prost::alloc::vec::Vec<ValidatorSlashEvent>,
431    /// pagination defines the pagination in the response.
432    #[prost(message, optional, tag = "2")]
433    pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
434}
435/// QueryDelegationRewardsRequest is the request type for the
436/// Query/DelegationRewards RPC method.
437#[allow(clippy::derive_partial_eq_without_eq)]
438#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
439#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")]
440#[proto_query(
441    path = "/cosmos.distribution.v1beta1.Query/DelegationRewards",
442    response_type = QueryDelegationRewardsResponse
443)]
444pub struct QueryDelegationRewardsRequest {
445    /// delegator_address defines the delegator address to query for.
446    #[prost(string, tag = "1")]
447    pub delegator_address: ::prost::alloc::string::String,
448    /// validator_address defines the validator address to query for.
449    #[prost(string, tag = "2")]
450    pub validator_address: ::prost::alloc::string::String,
451}
452/// QueryDelegationRewardsResponse is the response type for the
453/// Query/DelegationRewards RPC method.
454#[allow(clippy::derive_partial_eq_without_eq)]
455#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
456#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")]
457pub struct QueryDelegationRewardsResponse {
458    /// rewards defines the rewards accrued by a delegation.
459    #[prost(message, repeated, tag = "1")]
460    pub rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
461}
462/// QueryDelegationTotalRewardsRequest is the request type for the
463/// Query/DelegationTotalRewards RPC method.
464#[allow(clippy::derive_partial_eq_without_eq)]
465#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
466#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")]
467#[proto_query(
468    path = "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards",
469    response_type = QueryDelegationTotalRewardsResponse
470)]
471pub struct QueryDelegationTotalRewardsRequest {
472    /// delegator_address defines the delegator address to query for.
473    #[prost(string, tag = "1")]
474    pub delegator_address: ::prost::alloc::string::String,
475}
476/// QueryDelegationTotalRewardsResponse is the response type for the
477/// Query/DelegationTotalRewards RPC method.
478#[allow(clippy::derive_partial_eq_without_eq)]
479#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
480#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")]
481pub struct QueryDelegationTotalRewardsResponse {
482    /// rewards defines all the rewards accrued by a delegator.
483    #[prost(message, repeated, tag = "1")]
484    pub rewards: ::prost::alloc::vec::Vec<DelegationDelegatorReward>,
485    /// total defines the sum of all the rewards.
486    #[prost(message, repeated, tag = "2")]
487    pub total: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
488}
489/// QueryDelegatorValidatorsRequest is the request type for the
490/// Query/DelegatorValidators RPC method.
491#[allow(clippy::derive_partial_eq_without_eq)]
492#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
493#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")]
494#[proto_query(
495    path = "/cosmos.distribution.v1beta1.Query/DelegatorValidators",
496    response_type = QueryDelegatorValidatorsResponse
497)]
498pub struct QueryDelegatorValidatorsRequest {
499    /// delegator_address defines the delegator address to query for.
500    #[prost(string, tag = "1")]
501    pub delegator_address: ::prost::alloc::string::String,
502}
503/// QueryDelegatorValidatorsResponse is the response type for the
504/// Query/DelegatorValidators RPC method.
505#[allow(clippy::derive_partial_eq_without_eq)]
506#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
507#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")]
508pub struct QueryDelegatorValidatorsResponse {
509    /// validators defines the validators a delegator is delegating for.
510    #[prost(string, repeated, tag = "1")]
511    pub validators: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
512}
513/// QueryDelegatorWithdrawAddressRequest is the request type for the
514/// Query/DelegatorWithdrawAddress RPC method.
515#[allow(clippy::derive_partial_eq_without_eq)]
516#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
517#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")]
518#[proto_query(
519    path = "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress",
520    response_type = QueryDelegatorWithdrawAddressResponse
521)]
522pub struct QueryDelegatorWithdrawAddressRequest {
523    /// delegator_address defines the delegator address to query for.
524    #[prost(string, tag = "1")]
525    pub delegator_address: ::prost::alloc::string::String,
526}
527/// QueryDelegatorWithdrawAddressResponse is the response type for the
528/// Query/DelegatorWithdrawAddress RPC method.
529#[allow(clippy::derive_partial_eq_without_eq)]
530#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
531#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")]
532pub struct QueryDelegatorWithdrawAddressResponse {
533    /// withdraw_address defines the delegator address to query for.
534    #[prost(string, tag = "1")]
535    pub withdraw_address: ::prost::alloc::string::String,
536}
537/// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC
538/// method.
539#[allow(clippy::derive_partial_eq_without_eq)]
540#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
541#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryCommunityPoolRequest")]
542#[proto_query(
543    path = "/cosmos.distribution.v1beta1.Query/CommunityPool",
544    response_type = QueryCommunityPoolResponse
545)]
546pub struct QueryCommunityPoolRequest {}
547/// QueryCommunityPoolResponse is the response type for the Query/CommunityPool
548/// RPC method.
549#[allow(clippy::derive_partial_eq_without_eq)]
550#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
551#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryCommunityPoolResponse")]
552pub struct QueryCommunityPoolResponse {
553    /// pool defines community pool's coins.
554    #[prost(message, repeated, tag = "1")]
555    pub pool: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
556}
557/// MsgSetWithdrawAddress sets the withdraw address for
558/// a delegator (or validator self-delegation).
559#[allow(clippy::derive_partial_eq_without_eq)]
560#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
561#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress")]
562pub struct MsgSetWithdrawAddress {
563    #[prost(string, tag = "1")]
564    pub delegator_address: ::prost::alloc::string::String,
565    #[prost(string, tag = "2")]
566    pub withdraw_address: ::prost::alloc::string::String,
567}
568/// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response
569/// type.
570#[allow(clippy::derive_partial_eq_without_eq)]
571#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
572#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse")]
573pub struct MsgSetWithdrawAddressResponse {}
574/// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator
575/// from a single validator.
576#[allow(clippy::derive_partial_eq_without_eq)]
577#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
578#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")]
579pub struct MsgWithdrawDelegatorReward {
580    #[prost(string, tag = "1")]
581    pub delegator_address: ::prost::alloc::string::String,
582    #[prost(string, tag = "2")]
583    pub validator_address: ::prost::alloc::string::String,
584}
585/// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward
586/// response type.
587#[allow(clippy::derive_partial_eq_without_eq)]
588#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
589#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")]
590pub struct MsgWithdrawDelegatorRewardResponse {
591    /// Since: cosmos-sdk 0.46
592    #[prost(message, repeated, tag = "1")]
593    pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
594}
595/// MsgWithdrawValidatorCommission withdraws the full commission to the validator
596/// address.
597#[allow(clippy::derive_partial_eq_without_eq)]
598#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
599#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")]
600pub struct MsgWithdrawValidatorCommission {
601    #[prost(string, tag = "1")]
602    pub validator_address: ::prost::alloc::string::String,
603}
604/// MsgWithdrawValidatorCommissionResponse defines the
605/// Msg/WithdrawValidatorCommission response type.
606#[allow(clippy::derive_partial_eq_without_eq)]
607#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
608#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")]
609pub struct MsgWithdrawValidatorCommissionResponse {
610    /// Since: cosmos-sdk 0.46
611    #[prost(message, repeated, tag = "1")]
612    pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
613}
614/// MsgFundCommunityPool allows an account to directly
615/// fund the community pool.
616#[allow(clippy::derive_partial_eq_without_eq)]
617#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
618#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgFundCommunityPool")]
619pub struct MsgFundCommunityPool {
620    #[prost(message, repeated, tag = "1")]
621    pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
622    #[prost(string, tag = "2")]
623    pub depositor: ::prost::alloc::string::String,
624}
625/// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type.
626#[allow(clippy::derive_partial_eq_without_eq)]
627#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
628#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse")]
629pub struct MsgFundCommunityPoolResponse {}
630/// MsgUpdateParams is the Msg/UpdateParams request type.
631///
632/// Since: cosmos-sdk 0.47
633#[allow(clippy::derive_partial_eq_without_eq)]
634#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
635#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgUpdateParams")]
636pub struct MsgUpdateParams {
637    /// authority is the address that controls the module (defaults to x/gov unless overwritten).
638    #[prost(string, tag = "1")]
639    pub authority: ::prost::alloc::string::String,
640    /// params defines the x/distribution parameters to update.
641    ///
642    /// NOTE: All parameters must be supplied.
643    #[prost(message, optional, tag = "2")]
644    pub params: ::core::option::Option<Params>,
645}
646/// MsgUpdateParamsResponse defines the response structure for executing a
647/// MsgUpdateParams message.
648///
649/// Since: cosmos-sdk 0.47
650#[allow(clippy::derive_partial_eq_without_eq)]
651#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
652#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse")]
653pub struct MsgUpdateParamsResponse {}
654/// MsgCommunityPoolSpend defines a message for sending tokens from the community
655/// pool to another account. This message is typically executed via a governance
656/// proposal with the governance module being the executing authority.
657///
658/// Since: cosmos-sdk 0.47
659#[allow(clippy::derive_partial_eq_without_eq)]
660#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
661#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend")]
662pub struct MsgCommunityPoolSpend {
663    /// authority is the address that controls the module (defaults to x/gov unless overwritten).
664    #[prost(string, tag = "1")]
665    pub authority: ::prost::alloc::string::String,
666    #[prost(string, tag = "2")]
667    pub recipient: ::prost::alloc::string::String,
668    #[prost(message, repeated, tag = "3")]
669    pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
670}
671/// MsgCommunityPoolSpendResponse defines the response to executing a
672/// MsgCommunityPoolSpend message.
673///
674/// Since: cosmos-sdk 0.47
675#[allow(clippy::derive_partial_eq_without_eq)]
676#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
677#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse")]
678pub struct MsgCommunityPoolSpendResponse {}
679/// DepositValidatorRewardsPool defines the request structure to provide
680/// additional rewards to delegators from a specific validator.
681///
682/// Since: cosmos-sdk 0.50
683#[allow(clippy::derive_partial_eq_without_eq)]
684#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
685#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool")]
686pub struct MsgDepositValidatorRewardsPool {
687    #[prost(string, tag = "1")]
688    pub depositor: ::prost::alloc::string::String,
689    #[prost(string, tag = "2")]
690    pub validator_address: ::prost::alloc::string::String,
691    #[prost(message, repeated, tag = "3")]
692    pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
693}
694/// MsgDepositValidatorRewardsPoolResponse defines the response to executing a
695/// MsgDepositValidatorRewardsPool message.
696///
697/// Since: cosmos-sdk 0.50
698#[allow(clippy::derive_partial_eq_without_eq)]
699#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
700#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse")]
701pub struct MsgDepositValidatorRewardsPoolResponse {}
702pub struct DistributionQuerier<'a, Q: cosmwasm_std::CustomQuery> {
703    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
704}
705impl<'a, Q: cosmwasm_std::CustomQuery> DistributionQuerier<'a, Q> {
706    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
707        Self { querier }
708    }
709    pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
710        QueryParamsRequest {}.query(self.querier)
711    }
712    pub fn validator_distribution_info(
713        &self,
714        validator_address: ::prost::alloc::string::String,
715    ) -> Result<QueryValidatorDistributionInfoResponse, cosmwasm_std::StdError> {
716        QueryValidatorDistributionInfoRequest { validator_address }.query(self.querier)
717    }
718    pub fn validator_outstanding_rewards(
719        &self,
720        validator_address: ::prost::alloc::string::String,
721    ) -> Result<QueryValidatorOutstandingRewardsResponse, cosmwasm_std::StdError> {
722        QueryValidatorOutstandingRewardsRequest { validator_address }.query(self.querier)
723    }
724    pub fn validator_commission(
725        &self,
726        validator_address: ::prost::alloc::string::String,
727    ) -> Result<QueryValidatorCommissionResponse, cosmwasm_std::StdError> {
728        QueryValidatorCommissionRequest { validator_address }.query(self.querier)
729    }
730    pub fn validator_slashes(
731        &self,
732        validator_address: ::prost::alloc::string::String,
733        starting_height: u64,
734        ending_height: u64,
735        pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
736    ) -> Result<QueryValidatorSlashesResponse, cosmwasm_std::StdError> {
737        QueryValidatorSlashesRequest {
738            validator_address,
739            starting_height,
740            ending_height,
741            pagination,
742        }
743        .query(self.querier)
744    }
745    pub fn delegation_rewards(
746        &self,
747        delegator_address: ::prost::alloc::string::String,
748        validator_address: ::prost::alloc::string::String,
749    ) -> Result<QueryDelegationRewardsResponse, cosmwasm_std::StdError> {
750        QueryDelegationRewardsRequest {
751            delegator_address,
752            validator_address,
753        }
754        .query(self.querier)
755    }
756    pub fn delegation_total_rewards(
757        &self,
758        delegator_address: ::prost::alloc::string::String,
759    ) -> Result<QueryDelegationTotalRewardsResponse, cosmwasm_std::StdError> {
760        QueryDelegationTotalRewardsRequest { delegator_address }.query(self.querier)
761    }
762    pub fn delegator_validators(
763        &self,
764        delegator_address: ::prost::alloc::string::String,
765    ) -> Result<QueryDelegatorValidatorsResponse, cosmwasm_std::StdError> {
766        QueryDelegatorValidatorsRequest { delegator_address }.query(self.querier)
767    }
768    pub fn delegator_withdraw_address(
769        &self,
770        delegator_address: ::prost::alloc::string::String,
771    ) -> Result<QueryDelegatorWithdrawAddressResponse, cosmwasm_std::StdError> {
772        QueryDelegatorWithdrawAddressRequest { delegator_address }.query(self.querier)
773    }
774    pub fn community_pool(&self) -> Result<QueryCommunityPoolResponse, cosmwasm_std::StdError> {
775        QueryCommunityPoolRequest {}.query(self.querier)
776    }
777}